0

I am using Windows 7 64 bit operation system together with Python 3 and OpenCV. My computer is interfaced to two Logitech webcam of the following model:

1) Logitech HD Webcam C615 2) Logitech QuickCam Pro 9000

In Python I am running the below script

import cv2
cap1 = cv2.VideoCapture()
cap2 = cv2.VideoCapture()
cap1.set(cv2.CAP_PROP_AUTOFOCUS,0) # I want to change the focus manually myself
cap1.set(cv2.CAP_PROP_FOCUS,10)
cap2.set(cv2.CAP_PROP_FOCUS,10)
cap1.set(cv2.CAP_PROP_EXPOSURE,25)
cap2.set(cv2.CAP_PROP_EXPOSURE,25)

#get frame
ret, frame1 = cap1.read()
ret, frame2 = cap2.read()

#display result
cv2.imshow('cam 1',frame1)
cv2.imshow('cam 2',frame2)

The problem is, regardless on how I change the parameters in my cv2.set, I don't see the change being reflected in the captured image.

I then went to download Logitech's driver for the camera called Logitech Webcam Software. Using their software I can make the appropriate settings in both of the cameras. When closing the software, and restart python and running the script, the captured images appear exactly according to the settings that I have set in the Logitech Webcam Software.

My questions are:

1) Why can I not set the camera settings directly using Python and OpenCV?

2) How should I change my script in order to interface the camera settings direct from Python?

Thanks!

jxw
  • 586
  • 2
  • 6
  • 36
  • 2
    Possible duplicate of [Setting Camera Parameters in OpenCV/Python](https://stackoverflow.com/questions/11420748/setting-camera-parameters-in-opencv-python) – LeopoldVonBuschLight Jun 26 '17 at 19:51
  • Can you elaborate more on that? Do you mean that when I call cv2.set(....), it is actually not communicate with the camera? – jxw Jun 27 '17 at 05:21
  • It is possible that your camera is not entirely supported by OpenCV, not all features of all cameras are enabled in OpenCV. You may set some of this things, but not all. You can try to do a patch to make it supported :) – api55 Jun 28 '17 at 07:28
  • How do I make a patch in order to make it supported? Can you detail the procedure of patch making? Sorry but I am really a new user of both Python and Opencv. – jxw Jul 01 '17 at 13:03

0 Answers0