I’ve been writing xeyes with face detection using opencv as a crash course in pygame. Pictures and code tomorrow.
April 10, 2008 at 2:31 am - 1 commentsTag Archive for 'opencv'
OpenCV has issues using the camera on the XO, rising from the way it negotiates color palette settings with the OV7670 v4l2 driver. I haven’t delved deep enough into v4l2 yet to come up with a proper fix for either the driver or OpenCV. However, I have a temporary fix that (probably) works fine but is very ugly.
The easy and dirty solution is to install the opencv, opencv-devel, and opencv-python packages with yum, to download the libhighgui.so.1.0.0 that I compiled, and to copy it to /usr/lib/libhighgui.so.1.0.0. In short:
sudo yum install opencv opencv-devel opencv-python
sudo wget http://eclecti.cc/files/2008/03/libhighguiso100 -O /usr/lib/libhighgui.so.1.0.0
Continue for details on the problem and the actual temporary fix that I did

Ok, here is some working code for face detection using the XO’s webcam. It requires the opencv, opencv-python, and xawtv packages. Xawtv can be skipped if you change it to use gstreamer instead, but gstreamer takes around 3 seconds to initialize the camera, take a picture, and save it. Xawtv, on the other hand, takes about a half second. The face detection algorithm, from OpenCV itself takes anywhere from 0.1 seconds to 3 seconds depending on what parameters you choose. I chose ones that seem to work almost all of the time and take about 0.25 seconds.
I’m working on face detection and tracking using the webcam on the XO. Expect code and pictures soon.
March 20, 2008 at 12:10 am - 0 comments