Calling Intel® IPP Functions
Calling Intel IPP functions is as simple as calling any other C function:
- Include the ipp.h header file
- Set up the function parameters
- Call the function
- link ippi library
For select the ippi function for your application, please refer to Descriptor Codes and Parameters for ippi Functions
For link ippi library in your application, please refere to Compiling and Linking with Microsoft* Visual C++* and Intel® C++ Compiler
The multiple versions of optimized code for each function are concealed under a single entry point.
See sample code at Source Code Examples from Intel IPP book
Color conversion from YUV 420 to RGB results in an upside-down image or in an BGR image
In some imaging pipelines, the interpretations of YUV images and RGB images are flipped relative to each other. The Intel IPP YUVToRGB function does not flip the image. However, Intel IPP does provide routines to perform the flip operation. One solution is to apply the function ippiMirror to flip the result before or after calling the YUVToRGB color conversion function.
If the conversion ippiYUV422ToRGB_8u_C2C3R result in an BGR image, please use call
instead of call ippiYUV422ToRGB_8u_C2C3R
How can I convert a 24-bit RGB bitmap to a 32-bit RGBA bitmap?
Create a new 32-bit (4-channel) image and copy the 24-bit (3-channel) image to the 32-bit image:
How can I convert raw YUV data to RGB data?ng>
Use the routine ippiYUV422ToRGB_8u_P3C3R to convert raw YUV to RGB.
and some new ipp color conversion (ippcc) function are avaiable
How do I read an image file so it can be used with the Intel IPP?
To read an image file, you must understand the structure of the file format you are working with. From this information, you can determine the properties of the image and then store the image data into an Intel IPP buffer. The following is a general outline for loading an image:
- Retrieve the image properties (width, height, data type, etc.) from the image file header.
- Based on those properties, create a buffer of the appropriate Intel IPP data type and size.
- Read/copy the image data into the buffer.
- Use Intel IPP image processing functions to perform the desired operations on the image data buffer.
For a specific example using Windows* bitmap format, please refer to the ipLoad function from the Tiled Image Processing sample ( ippview.cpp). Read more about Intel IPP image and data type support in the Image Processing Reference Manual, Chapter 2. For image compression, please refer to the Intel IPP JPEG sample code.
Which functions can be used to calculate quality differences between two images?
The Intel IPP contains several functions to measure quality differences between images, including the set of Cross Correlation ( ippiCrossCorXxxx) and Square Distance ( ippiSqrDistanceXxxx) functions. Please refer to Chapter 11 of the Intel IPP Reference Manual: Volume 2 for more details.
How can I resolve runtime errors and access violations related to image filtering functions?
Intel IPP filtering functions assume that all outstanding ROI data exists. The application is required to check that ROI values are set such that all required border pixels exist in the image. If the pixels do not exist then a runtime error will occur. For more information, please refer to the following documents:
|Red Hat* Enterprise Linux Desktop 4, Windows Server* 2003 Standard x64 Edition, Red Hat* Enterprise Linux Desktop 3 Update 5, Mac OS*, Red Hat* Enterprise Linux 2.1, SUSE* Linux 9.1, SUSE* Linux Enterprise Server 8.0, SUSE* Linux Enterprise Server 9.0, Windows* XP Professional, Red Hat* Linux 7.3, Red Hat* Linux 8.0, Windows Server* 2003, Red Hat* Linux 9.0, SUSE* Linux* 8.2, Windows* XP 64-Bit Edition Version 2003