Has any one been able to get OpenCV to directly play video from the RasPiCam board using python?
I've seen some projects involving workarounds, but what I'm interested in is being able to use the RasPiCam board with OpenCV as if it were a USB cam.
Ideally, I'd like to do something like this:
import cv2.cv as cv
capture = cv.CreateCameraCapture(-1)
#some other code to actually display the video
2 Answers 2
You will be able to access to the raspi camera like other V4L2 device using :
sudo modprobe bcm2835-v4l2
uv4l --driver raspicam --auto-video_nr
-
1Excellent. Exactly what I was looking for. Thanks so much.Ryan– Ryan2014年06月01日 21:15:22 +00:00Commented Jun 1, 2014 at 21:15
If you like reading, this guys tutorial is pretty comprehensive. http://thinkrpi.wordpress.com/opencv-and-pi-camera-board/
-
I looked at that tutorial, but it seems to me like that is geared for using OpenCV with C, not python. It wasn't clear to me after reading it how the tutorial would be useful for using OpenCV with python.Ryan– Ryan2014年05月23日 03:22:01 +00:00Commented May 23, 2014 at 3:22
-
Yeah my bad.. sorry clearly didn't read your Question probably :Smrwhale– mrwhale2014年05月23日 03:23:16 +00:00Commented May 23, 2014 at 3:23