title: How to programatically disable the auto-focus of two webcams in opencv
body: <p>i have big trouble calibrate two cameras and get the pose of them because of the autofocus. I am useing two logitech webcams of same type, openCV and C++.</p>
  
  <p>I tried this:</p>
  
  <pre><code>cv::Size imageSize(1600,1200);      
  cv::VideoCapture cap1(0);
  cap1.set(CV_CAP_PROP_FRAME_WIDTH,imageSize.width);
  cap1.set(CV_CAP_PROP_FRAME_HEIGHT,imageSize.height);
  
  cv::VideoCapture cap2(1);
  cap2.set(CV_CAP_PROP_FRAME_WIDTH,imageSize.width);
  cap2.set(CV_CAP_PROP_FRAME_HEIGHT,imageSize.height);
  
  
  
  
  IAMCameraControl *pCameraControl; 
  HRESULT hr; 
  if (hr == S_OK) {
    long defaultFocusValue = 0;
    hr = pCameraControl-&gt;Set(CameraControl_Focus, // property 
                          defaultFocusValue, // value
                          CameraControl_Flags_Manual //Flag
                                  ); 
  }   
  </code></pre>
  
  <p>Useing only one camera its working but with two - its not.</p>
  
  <p>Who can help me out here?</p>