I compiled OpenCV in Python on my pi (without a GUI) and it recognizes my ps3 eye cam (i've streamed/saved video from it through the pi) but whenever i try some simple code it captures the video but fails to do frame = cv.QueryFrame(capture)...ihave no idea why. any help? the code works just fine on my pc. the code is:
import cv2.cv as cv
#cv.NamedWindow("w1", cv.CV_WINDOW_AUTOSIZE)
camera_index = 0
capture = cv.CaptureFromCAM(camera_index)
if not capture:
print "error opening capture device"
#count = 0
while True:
frame = cv.QueryFrame(capture)
if frame is None:
print "fail with putting in frame"
break
# print "image"
# cv.ShowImage("w1", frame)
# c = cv.WaitKey(100)
# if c == 0x1b: #ESC
#print 'esc pressed,goodbye'
#break
# if c == 0x63 or c == 0x43:
else:
c = cv.WaitKey(100)
print 'capturing!'
cv.SaveImage("pictest.jpg",frame)
# count = count + 1
# if count == 10:
# break