title: segmentation fault (core dumped) in opencv
body: <p>i am trying to execut a program to display  a video file using opencv. the program compiles properly. but wen i execute it i get the error : segmentation fault(core dumped). can u please find the error..</p>
  
  <pre><code>    #include &lt;opencv2/core/core.hpp&gt;
      #include &lt;opencv2/highgui/highgui.hpp&gt;
      #include &lt;stdlib.h&gt;
      #include &lt;opencv2/imgproc/imgproc.hpp&gt;
      #include &lt;opencv2/opencv.hpp&gt;
      #include &lt;iostream&gt;
      #include &lt;fstream&gt;
      #include &lt;stdio.h&gt;
  
      using namespace cv;
      using namespace std;
  
      int main(int argc, char *argv[])
      {
          if (argc != 2)
          {
                printf("Usage:video\n");
                return -1;
          }
          VideoCapture capture("Home//cuda-workspace//DisplayVideo//video_1.avi");
          namedWindow("display", cv::WINDOW_AUTOSIZE);
  
  
          if(!capture.isOpened())
          {
                printf("Failed to open the video\n");
                return -1;
          }
  
          for(;;)
          {
                Mat frame;
                capture &gt;&gt; frame; // get a new frame from camera
                imshow("display",frame);
          }
  
      return 0;
          }
  </code></pre>