Although installing OpenCV on the Raspberry Pi was made very easy by Arch Linux (see previous blog post), persuading OpenCV to capture images from my webcam was substantially harder. But, eventually I managed to get it working. Here's how.
My first attempt followed a sample program found on Stack Overflow. But what I found was that I was repeatedly receiving select timeout
errors on the cv.QueryFrame(...)
call. I also received 3 VIDIOC_QUERYMENU: Invalid argument
errors every time I called cv.CaptureFromCAM(...)
, and Xlib: extension "RANDR" missing on display "localhost:10.0"
the first time that I called cv.NamedWindow(...)
. Following those errors, the captured frame was displaying as a black screen, so I assumed that one of them was fatal.
Continue reading "Capturing webcam video with OpenCV on Raspberry Pi / Arch Linux"