OpenCV
From MobileRobots Research and Academic Customer Support
OpenCV is an open image processing library, with particular emphasis on machine vision. More information can be found at http://www.opencv.org, http://sourceforge.net/projects/opencvlibrary/, and http://opencv.willowgarage.com/. OpenCV is available as a C, C++ or Python library.
For documentation on reading images from a computer's video capture device (framegrabber) or IEEE1394 (firewire) device using the OpenCV highgui C++ library, see its VideoCapture class. For the highgui C library, see the image reading and capture functions.
To load images from a network camera into OpenCV, use the cv::imdecode function (highgui C++ library) after getting the image using HTTP (e.g. using libcurl) and saving it in an OpenCV "Mat" structure. Or save it as a file and then load it from that file into OpenCV.
MobileRobots is not involved in OpenCV development and we don't support it directly, but other users on the pioneer-users Mailing List or the aria-users Mailing List may have experience with OpenCV.
Contents |
Installing OpenCV for Debian 5.x
The OpenCV development libraries are already installed on onboard computer systems provided by MobileRobots.
To install on a Debian or Ubuntu system without OpenCV, use the following command when connected to the internet:
sudo apt-get install libcv-dev libhighgui-dev
Installing OpenCV for Debian 3.1
OpenCV 0.9.5 packages for Debian 3.1 (sarge) are available from http://archive.debian.org. Either add http://archive.debian.org/debian sarge main to /etc/apt/sources.list and install the packages with apt-get install libopencv-dev libcvaux-dev libcvcam-dev libhighgui-dev libopencv-doc, or download and install the following packages with dpkg -i package_file:
- http://archive.debian.org/debian/pool/main/o/opencv/libcvaux-dev_0.9.5-10_i386.deb
- http://archive.debian.org/debian/pool/main/o/opencv/libcvaux0.9-5_0.9.5-10_i386.deb
- http://archive.debian.org/debian/pool/main/o/opencv/libcvcam-dev_0.9.5-10_i386.deb
- http://archive.debian.org/debian/pool/main/o/opencv/libcvcam0.9-5_0.9.5-10_i386.deb
- http://archive.debian.org/debian/pool/main/o/opencv/libhighgui-dev_0.9.5-10_i386.deb
- http://archive.debian.org/debian/pool/main/o/opencv/libhighgui0.9-5_0.9.5-10_i386.deb
- http://archive.debian.org/debian/pool/main/o/opencv/libopencv-dev_0.9.5-10_i386.deb
- http://archive.debian.org/debian/pool/main/o/opencv/libopencv0.9-5_0.9.5-10_i386.deb
- http://archive.debian.org/debian/pool/main/o/opencv/libopencv-doc_0.9.5-10_all.deb
Installing OpenCV for Windows and other platforms
Download from http://www.opencv.org
Notes
Configure for different channels or PAL
Sometimes OpenCV needs to be reconfigured to be able to access the framegrabber on a different channel or using PAL resolution: edit cvcap_v4l.cpp to set different values for vc.channel (e.g. 0 instead of 1) and vc.norm and recompile OpenCV.
Using OpenCV with threads and ARIA
Problems reported by people using with OpenCV and threads: It is possible that OpenCV may have problems if you initialized and opened the video capture device (framegrabber) in one thread, but later attempt to access OpenCV in another thread. Note that if you use ArRobot::runAsync() to initiate the ArRobot processing cycle, then user task callbacks and Actions will run in a new thread, seperate from the main thread.
