Beruflich Dokumente
Kultur Dokumente
Intel libraries
Jerome Landrea and Frederic Truchetetb
a CReSTIC,
b Le2i,
ABSTRACT
This paper presents optimized signal and image processing libraries from Intel Corporation. Intel Performance
Primitives (IPP) is a low-level signal and image processing library developed by Intel Corporation to optimize
code on Intel processors. Open Computer Vision library (OpenCV) is a high-level library dedicated to computer
vision tasks. This article describes the use of both libraries to build flexible and efficient signal and image
processing applications.
1. INTRODUCTION
When creating a signal or image processing application, code optimization is very important to ensure overall
performances.1 FPGA (Field Programmable Gate Array) and DSP (Digital Signal Processors) reconfigurable
processors allow hardware optimizations24 leading to real-time image processing applications. However, these
processors are expensive and reconfiguration is not easy when they are used on a production line.
Due to multimedia needs, personal computers are more and more powerful and less and less expensive. With
64 bits processors and operating systems, new perspectives of real-time image processing tasks are emerging.
With new digital cameras and video cameras, size of images is increasing critically (from four to more than ten
megapixels per image). Image processing programmers need tools to optimize their code to perform real-time
operations on big images. Intel Corporation develops efficient processors and efficient tools to get the best
performances from these processors.
Intel Corporation proposes IPP5 and OpenCV6 to use low-level and high-level computer vision and image
processing functions. IPP is a commercial proprietary library working only on Intel processors (x86, pentium,
II, III, 4, Xeon, Itanium, Itanium 2, Core Duo, Core 2 Duo. . . ) for several platforms (Windows, Linux and
MacOS). OpenCV is free and opensource and can be compiled on many different platforms (Windows, Linux,
MacOS, freeBSD,. . . ). Both openCV and IPP can work on full image, on a region of interest (ROI) or on a
channel of interest (COI) where operations are performed on a subset of image.
Within Intel processors, many advanced signal processing methods are wired: MMX (Multimedia Extensions),
MMX2, SSE (Streaming Single instruction multiple data Extensions), SSE2, SSE3, . . . IPP offers a software
layer able to use hardware wired functions.
Figure 1 shows how OpenCV and IPP interact. Applications using OpenCV interact directly with nonIntel processor (d) or with Intel processor when IPP is unavailable (c). When IPP is present, OpenCV uses
automatically IPP optimized functions on Intel processors (b). Applications can also use IPP without OpenCV
on Intel processors (a).
IPP and OpenCV libraries are an important part of my Ph.D. thesis in which I have applied these libraries to
image indexing and retrieval using wavelets. A first tutorial was proposed to IPP and OpenCV programmers.7
Our paper is divided into different sections. Section 2, is a description of IPP library. Section 3 introduces
Intel OpenCV library. In section 4, a set of performance test is given to illustrate computing time optimization.
Section 5 describes the speedup obtained with a recent processor for our tests. Section 6 is a general conclusion
on Intel libraries.
2.4. Cryptography
Cryptography functions are composed of many different types of cryptographic algorithms: DES, blowfish, AES
. . . There are many hashing functions available: MD5, SHA1, SHA256, RSA . . .
Big number arithmetic, prime number generation functions are also present. Cryptography library is an
extension of signal processing library. Intel Centrino processors dedicated to wireless networks connection can
use these wired functions for wireless security cryptography.
3. OPENCV
OpenCV is a high-level image processing and computer vision library developed by Intel Corporation. It is
available free for many platforms: Intel architecture, AMD processors, Unix systems. . .
OpenCV offers functions working on high-level data structure like sets, trees, graphs, vectors, matrices and
images. OpenCV supports many datatypes from unsigned 8 bits integer to 64 bits floating point values. OpenCV
allows any number of channels for an image which is useful when working on multichannel images.
OpenCV offers computer vision methods. It also offers a graphical user interface (GUI) to read, visualize and
save images from an image file but also from any video stream. It allows video processing on-the-fly by applying
transforms directly to video buffers before visualization.
4. PERFORMANCE EVALUATION
Four performances tests have been realized to prove IPP and OpenCV efficiency. Several image processing tasks
have been applied to images with increasing sizes. There are four images, the first one is a 1024x768 pixels RGB
color image which is a standard size for computer displays (XGA). The other sizes considered are 1600x1200,
2048x2048 and 4096x4096 to show IPP performances on big images.
Tests were performed on a 32 bits Pentium 4, 2 GHz with 512 Mb RAM running Linux Fedora core 5,
GCC 4.0, IPP 5.0 and OpenCV 0.9.9, which is a relatively slow configuration compared with recent 64 bits
processors. However, computing time is very good despite of this processor. A comparison between OpenCV
alone, OpenCV+IPP and IPP alone is proposed to show the advantages of IPP for real-time imaging.
Figure 4a shows wavelet transform computing time for our images. Again IPP is more rapid than OpenCV.
5. TOWARDS 64 BITS
Tests were ported to an Intel Core Duo (64 bits) 2GHz processor with 1Gb RAM running Linux Fedora Core 5
(32 bits because 64 bits version of this operating system was not available at the time of redaction of this paper)
in order to compare computing time. Results are presented in the table 5. Results are expressed as a mean
of speedup obtained on each image size (test 1, test 2 and test 3) and as a mean of speedup obtained on each
cluster size (test 4).
% of speedup
OpenCV
OpenCV+IPP
IPP
test 1
22.78%
27.11%
38.7%
test 2
17.34%
19.55%
23.31%
test 3
24.19%
26.13%
26.76%
test 4
23.28%
25.20%
NA
The amount of RAM is not the same on the two processors, but it does not influence computing time because
images are stored in RAM without using memory swap in the two cases. The second level cache memory was
2Mb on Core Duo and only 512Kb on P4 processor, which increases computing power of Core Duo. IPP is much
more efficient on 64 bits processors than on 32 bits ones allowing real-time image processing tasks on images up
to 1600x1200 pixels.
6. CONCLUSION
This article presents Intel libraries available for programmers to build efficient image processing applications.
Several tests have been performed to prove IPP and OpenCV efficiency and interoperability. On a 64 bits
hardware architecture (and a 32 bits operating system), the maximum speedup between P4 and Core Duo is
about 38% which is a good result. It means new processors are able to work on very big image (up to 1600x1200)
at real-time.
IPP can be used without OpenCV, but OpenCV offers to IPP a GUI for visualisation and several highlevel computer vision techniques not available in IPP. For every computation made by OpenCV, optimized IPP
functions are used if available to get the best results in terms of computing time and accuracy.
OpenCV and IPP are very powerful tools to build real-time image processing application taking advantage
of Intel technologies: Hyper-threading, SSE3, Core Duo, 64 bits architecture . . . Another advantage is that
every processor from Intel Corporation can run IPP and OpenCV which guarantees a upward compatibility.
Your applications written for pentium 4 processor will work on next generation processors from Intel without
changing the code (but you will have to recompile the source code). It is a very important advantage for industrial
applications to have real-time computing and real upward compatibility.
Intel develops a compiler to enhance C/C++ code optimization at the software level. In a future publication,
Intel C++ compiler will be tested to compare performances to those of GCC compiled code.
REFERENCES
1. M. Sonka, V. Hlavac, and R. Boyle, Image Processing, Analysis and Machine Vision, PWS Publishing, second
edition ed., 1999.
2. M. Leeser, S. Coric, E. Miller, H. Yu, and M. Trepanier, Parallel-beam backprojection: an fpga implementation optimized for medical imaging, J. VLSI Signal Process. Syst. 39(3), pp. 295311, 2005.
3. B. Girau and C. Torres-Huitzil, FPGA implementation of an integrate-and-fire LEGION model for image
segmentation, in European Symposium on Artificial Neural Networks, pp. 173178, 2006.
4. S. Qureshi, Embedded image processing on the TMS320C6000 DSP: examples in code composer studio and
MATLAB, Springer Science+Business Media, New York, 2005.
5. INTEL, Integrated Performance Primitives for Intel Architecture, INTEL Corporation, 2000-2006.
http://www.intel.com/software/products/perflib.
6. INTEL,
Open
Source
Computer
Vision
Library,
INTEL
Corporation,
1999-2006.
http://www.sourceforge.net/projects/opencvlibrary.
7. J. Landre, Programming with intel ipp (integrated performance primitives) and intel opencv (open computer
vision) under gnu linux, http://jlandre.ifrance.com, july 2003. version 0.4.
8. R. Calderbank, I. Daubechies, W. Sweldens, and B.-L. Yeo, Wavelet transforms that map integers to integers, Applied and Computational Harmonic Analysis (ACHA) 5(3), pp. 332369, 1998.