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
Ryan
  • 233
  • 1
  • 2
  • 5

2 Answers2

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

mpromonet
  • 1,124
  • 18
  • 37
0

If you like reading, this guys tutorial is pretty comprehensive. http://thinkrpi.wordpress.com/opencv-and-pi-camera-board/

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