title: VIDIOC_QUERYMENU: Invalid argument
body: <p>I am using my builtin laptop webcam on Ubuntu 12.04</p>
  
  <p>It was working fine at the beginning but now it gives me constant errors</p>
  
  <p>CODE:</p>
  
  <pre><code>using namespace cv;
  /** @function main */
  int main(int argc, char** argv)
  {
  
  /// Read Video
  
  VideoCapture cap(0); // open the default camera
      if(!cap.isOpened())  // check if we succeeded
      return -1;
  
  Mat edges;
  namedWindow("edges",1);
  for(;;)
  {
      Mat frame;
      cap &gt;&gt; frame; // get a new frame from camera
      cvtColor(frame, edges, CV_BGR2GRAY);
      GaussianBlur(edges, edges, Size(7,7), 1.5, 1.5);
      Canny(edges, edges, 0, 30, 3);
      imshow("edges", edges);
      if(waitKey(30) &gt;= 0) break;
  }
  
  cv::waitKey(0);
  return 0;
  }
  </code></pre>
  
  <p>ERRORS:</p>
  
  <pre><code>VIDIOC_QUERYMENU: Invalid argument
  VIDIOC_QUERYMENU: Invalid argument
  VIDIOC_QUERYMENU: Invalid argument
  VIDIOC_QUERYMENU: Invalid argument
  VIDIOC_QUERYMENU: Invalid argument
  VIDIOC_QUERYMENU: Invalid argument
  VIDIOC_QUERYMENU: Invalid argument
  libv4l2: error turning on stream: Invalid argument
  VIDIOC_STREAMON: Invalid argument
  </code></pre>
  
  <p>Thanks in advance</p>