OpenCV: Difference between revisions
m (→Problems: punctuation) |
|||
Line 27: | Line 27: | ||
Currently, OpenCV fails to interface with the XO's [[Camera]]. It is therefore necessary to use [[xawtv]] or [[Gstreamer]] to capture video or images, and feed the results to OpenCV. |
Currently, OpenCV fails to interface with the XO's [[Camera]]. It is therefore necessary to use [[xawtv]] or [[Gstreamer]] to capture video or images, and feed the results to OpenCV. |
||
The problem is fixed in the latest CVS source, or can be fixed by changing the following at line 415 in otherlibs/highgui/cvcap_v4l.cpp in the opencv 1.0.0 source. |
|||
The problem appears to rise from the interaction between OpenCV and the OV7670 driver in negotiating over what color palette to use. In theory, OpenCV should suggest fmt.pix.pixelformat values, and the driver should respond with acceptable versions of them. Somehow, OpenCV is sending values that the driver can't deal with. The temporary fix is to let the driver tell OpenCV what palette it wants by changing VIDIOC_C_FMT to VIDIOC_G_FMT. To do that to edit line 419 in otherutils/highgui/cvcap_v4l.cpp to the following |
|||
<pre> |
<pre> capture->form.fmt.pix.field = V4L2_FIELD_INTERLACED;</pre> |
||
to |
|||
<pre> capture->form.fmt.pix.field = V4L2_FIELD_ANY;</pre> |
|||
Note that the packages required to compile OpenCV include gtk2-devel, which currently is not installable, a [http://dev.laptop.org/ticket/6650 known bug]. I got around it with the following, though your milage may vary. |
Note that the packages required to compile OpenCV include gtk2-devel, which currently is not installable, a [http://dev.laptop.org/ticket/6650 known bug]. I got around it with the following, though your milage may vary. |
Revision as of 06:46, 11 April 2008
About
Wikipedia: OpenCV
- OpenCV is an open source computer vision library originally developed by Intel. It is free for commercial and research use under a BSD license. The library is cross-platform, and runs on Mac OS X, Windows and Linux. It focuses mainly on real-time image processing, as such, if it finds Intel's Integrated Performance Primitives (IPP) on the system, it will use these commercial optimized routines to accelerate itself.
- OpenCV's application areas include:
- Human-Computer Interface (HCI)
- Object Identification
- Segmentation and Recognition
- Face Recognition
- Gesture Recognition
- Motion Tracking
- ...
Face Recognition
Nirav Patel reports success in basic image recognition on the XO Laptop (with xo-cam) with good timings using OpenCV and xawtv.
Sources: face.py haarcascade_frontalface_alt.xml
Downloads
The source can be downloaded from sourceforge, or OpenCV can be installed from the opencv package in the Fedora repository. To use OpenCV with python, also install the opencv-python package.
$ yum install opencv opencv-python
Problems
Currently, OpenCV fails to interface with the XO's Camera. It is therefore necessary to use xawtv or Gstreamer to capture video or images, and feed the results to OpenCV.
The problem is fixed in the latest CVS source, or can be fixed by changing the following at line 415 in otherlibs/highgui/cvcap_v4l.cpp in the opencv 1.0.0 source.
capture->form.fmt.pix.field = V4L2_FIELD_INTERLACED;
to
capture->form.fmt.pix.field = V4L2_FIELD_ANY;
Note that the packages required to compile OpenCV include gtk2-devel, which currently is not installable, a known bug. I got around it with the following, though your milage may vary.
yum -t --enablerepo=* install libXI-devel yum -t --enablerepo=* install gtk2-devel
An easier but even dirtier fix is available here.
Links
- OpenCV Documentation Wiki
- OpenCV SourceForge site
- OpenCV homepage at intel