import cv
capture = cv.CaptureFromCAM(0)
img = cv.QueryFrame(capture)
cv.SaveImage("test.JPG", img)
嗨, 我只是想保存在我的Ubuntu 10 的OpenCV从我用的OpenCV和Python摄像头拍照可以与摄像头连接。错误,而试图挽救摄像头画面与OpenCV的
但我得到这个错误:
OpenCV Error: Null pointer (NULL array pointer is passed) in cvGetMat, file /build/buildd/opencv-2.1.0/src/cxcore/cxarray.cpp, line 2376
Traceback (most recent call last):
File "video.py", line 5, in <module>
cv.SaveImage("test.JPG", img)
cv.error: NULL array pointer is passed