title: Cannot set backend for VideoCapture in Opencv 3.2.0
body: <p>I like to catch a video given by a usb webcam with opencv. For this I try to use the VideoCapture class, with the v4l2 backend. Following the example at <a href="https://docs.opencv.org/3.2.0/d8/dfe/classcv_1_1VideoCapture.html" rel="nofollow noreferrer">https://docs.opencv.org/3.2.0/d8/dfe/classcv_1_1VideoCapture.html</a> I call the constructor in a the following way:</p>
  
  <pre><code>VideoCapture vc(id + CAP_V4L2);
  </code></pre>
  
  <p>where id indicates my camera (here 0).</p>
  
  <p>To check for success I did something like this:</p>
  
  <pre><code>cout &lt;&lt; vc.get(CAP_PROP_MODE)&lt;&lt;endl; // return 0 instead of the value of CAP_V4L2
  </code></pre>
  
  <p>I also make sure to compile opencv with V4L/V4L2. getBuildInformation() shows the following line:</p>
  
  <p>V4L/V4L2:                    Using libv4l1 (ver 1.14.2) / libv4l2 (ver 1.14.2))</p>
  
  <p>Currently  I'm working in a Virtualbox 6.0.4 with a Ubuntu 18.04 guest system and also a Ubuntu 18.04 system as host.</p>
  
  <p>Here is a minimum example:</p>
  
  <pre><code>int main() {
      int id = 0;
      VideoCapture vc(id + CAP_V4L2);
      if(!vc.isOpened()) {
          std::cerr &lt;&lt; "Unable to open cam " &lt;&lt; std::endl;
          exit(-1);    
      } 
      cout &lt;&lt; vc.get(CAP_PROP_MODE) &lt;&lt; " | " &lt;&lt; CAP_V4L2 &lt;&lt;endl; // 0 | 200
  }
  </code></pre>
  
  <p>I am thankful for every help</p>