title: Displaying Webcam using OpenCV
body: <p>I tried to interface Webcam using OpenCV 3.1 in Ubuntu.
  My program is as follow.</p>
  
  <pre><code>void main(){
  
      VideoCapture camera(0);
      Mat frame;
  
      while(true){
          camera &gt;&gt; frame;
          imshow("test", frame);
          int key = waitKey(10);
          if(key == 27){
              break;
          }
      }
  
      return 0;
  }
  </code></pre>
  
  <p>The error is </p>
  
  <pre><code>GStreamer Plugin: Embedded video playback halted; module v4l2src0 reported: Devi
  ce '/dev/video0' cannot capture at 1280x720
  OpenCV Error: Unspecified error (GStreamer: unable to start pipeline
  ) in cvCaptureFromCAM_GStreamer, file /home/nn/Softwares/opencv/opencv/modules
  /videoio/src/cap_gstreamer.cpp, line 818
  terminate called after throwing an instance of 'cv::Exception'
    what():  /home/nn/Softwares/opencv/opencv/modules/videoio/src/cap_gstreamer.
  cpp:818: error: (-2) GStreamer: unable to start pipeline
   in function cvCaptureFromCAM_GStreamer
  </code></pre>