6

I connected a Rpi-camera board to the camera socket on my RPi (not a usb webcam). I have been searching the internet on how to call the camera in Python. The camera works (raspistill and raspivid both work).

To be more specific, I'm using the qr-tools library and I'm trying to use the decode_webcam function.

decode_webcam(self, callback=lambda s:None, device='/dev/video0')

When using /dev/video0, I get errors saying the device was not found. So what do I fill in after device=?

Thanks!

  • try ls /dev/ to get a look at what's in there – les Jan 8 '14 at 7:09
4

There are now a couple of V4L drivers for the Pi's camera module including an official one; using such a driver should cause the camera module to show up as /dev/video0 (though you may find you need to fiddle with some settings using v4l2-ctl, as per the linked forum thread).

5

It does not seem that the Pi Camera shows up as a standard Linux Video device (/dev/video0 or other).

However there is a python library that you can use to access the camera on the Pi via Python.

The Python library is called picamera, and there is plenty of discussion on using it over at the Raspberry Pi forum.

I am not sure how this will work with the decode_webcam function you are trying to use though.

  • I already found that library and I've searched through it but it doesn't help me. Thanks anyway! – gieldops Oct 10 '13 at 16:22

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.