OpenCV with Logitech Pro 4000 on the Raspberry Pi
Hello everyone!
I have been attempting to use OpenCV to take pictures on the Raspberry Pi (Raspbian), but it does not seem to work for me. Whenever I run any camera-related programs, the window opens correctly, but only a grey image is displayed.
I have tested the webcam on my computer and it works fine. Additionally, the camera works with other, different webcam programs (Specifically, GuvCview). Here is the code I am currently using:
import cv2.cv as cv
import time
cv.NamedWindow("w1", cv.CV_WINDOW_AUTOSIZE)
capture = cv.CaptureFromCAM(0)
while True:
frame = cv.QueryFrame(capture)
cv.ShowImage("w1", frame)
if cv.WaitKey(10) == 27: #Break on ESC
break
cv.DestroyAllWindows()
Thank you for your help!