13

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
11

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

  • 1
    Excellent. Exactly what I was looking for. Thanks so much. – Ryan Jun 1 '14 at 21:15
0

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 May 23 '14 at 3:22
  • Yeah my bad.. sorry clearly didn't read your Question probably :S – mrwhale May 23 '14 at 3:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.