Increasing processing power combined with the development of sophisticated digital cameras has resulted in equally rapid advances in computer vision. Developers of machine-vision systems must leverage multicore processors with software that can be rapidly implemented. However, while many off-the-shelf software packages currently support high-level image-processing and machine-vision functions, they are primarily targeted toward developers who need to rapidly deploy machine-vision systems. At the same time, developers of the software also face increasingly shorter development cycles. Recognizing this, Intel (Santa Clara, CA, USA; www.intel.com) offers a library of integrated performance primitives (IPPs) that can be used to speed up low-level image-processing functions.
The IPP library is a collection of low-level computational kernels optimized for Intel processors. These consist of separate signal- and image-processing, matrix-processing, computer-vision, and data-compression libraries. Intel’s Image and 2D Signal Processing library, for example, includes functions such as image statistics, filtering, geometric transforms, and arithmetic operations, while Intel’s computer vision library (OpenCV) includes feature detection, pattern recognition, and camera-calibration functions.
In the past, many developers coded vision algorithms that have existed for a number of years. OpenCV provides these people with a software vision infrastructure that allows them to work at a higher level rather than have to code basic image-processing functions. These core functions can be optimized using IPP functions.
OpenCV supports routines for input, display, and storage of image streams and single images. Image processing is performed through convolution, thresholding, morphological operations, histogramming, smoothing, pyramidal subsampling, and a suite of image algebra and arithmetic operations. Geometric functions include Delaunay triangulation, calibration, fundamental and matrix computation, and image alignment. As well, feature detection algorithms include corner detectors, Canny edge operators, and blob finders.
At a higher level, learning-based vision is supported through feature histogram comparison, image statistics, template-based correlation, decision trees, and neural networks. If the IPP library is installed, OpenCV automatically takes advantage of the hand-optimized routines in IPP, speeding up many vision routines (see table). Currently, OpenCV uses more than 300 IPP functions. The increase in performance that is achievable depends on the image type and function parameters. For example, integer images are faster to process than floating-point-based versions. Another timing difference results from different kernel sizes. Small kernels are faster than large kernels, and some common kernels are hand optimized.
To swap in optimized code is simple, since OpenCV uses function pointers and dynamic-library-loading facilities provided by the operating system. For every IPP function that OpenCV can use there is a pointer to a function that is initially set to null and that is assigned to a valid address when the corresponding IPP component is detected and loaded. So, while OpenCV can benefit from using IPPs, it does not depend on it; the functionality is the same, regardless of whether the IPP is installed. That is, for every IPP function there is C code that is included in OpenCV binaries. So, a higher-level external OpenCV function loads a function pointer that calls either optimized IPP code or embedded low-level OpenCV C code depending on which is available.
Already, a number of third-parties are taking advantage of Intel’s libraries in their products. Indeed, sourceforge.net, the world’s largest Open Source software-development Web site, returns multiple entries when queried. While they are far too numerous to be listed here, they include platform-independent C++ libraries, image-processing and video toolboxes, morphological tools, camera calibration, and face identification software packages. Perhaps, however, the most notable of these are AllSeeingI (allseeingi.tigris.org), a visual programming open source framework that uses OpenCV as a computer vision library, and CamCap (www.cs.nott.ac.uk/~jzg/nottsvision/index.html), a program that uses DirectShow and OpenCV for access and modification of image frames in streamed video data.
As a complement to OpenCV, Camellia (camellia.sourceforge.net/) is an open source image-processing and computer vision library written in C. Originally developed by the Ecole des Mines de Paris (ENSMP), Philips Electronics, and others, the software includes functions such as filtering, morphological mathematics, labeling, warping, drawing, back projection, color conversion, and loading/saving images, many of which are speed-optimized.