Tutorial: Image Blurring and Rotation with Intel® Integrated Performance Primitives

ID 751830
Date 6/30/2025
Public

Intel® IPP Image Processing Basics

This section explains some of the basic concepts used in the image processing part of Intel® Integrated Performance Primitives (Intel® IPP):

Representing an Image

An image can be represented as lines of pixels. One pixel can hold one or more integer or floating-point values depending on the image format. Each image row contains the same number of pixels. An image step is a value that is equal to distance, in bytes, between the starting points of consecutive lines in the image.

Processing Regions of Interest (ROIs)

Most Intel IPP image processing functions can operate on entire images and image areas. An image Region of Interest (ROI) is a rectangular area that can be either a part of the image or the whole image. Intel IPP functions that support ROI processing have the R descriptor in their names.

The ROI of an image is defined by its size and offset from the image origin, as shown in the following figure. The origin of the image is in the top left corner, with x values increasing from left to right and y values increasing downwards.

Initializing Function Data

Most Intel IPP functions do not perform memory allocation and require external memory buffers to contain pre-computed values or to keep temporary data for algorithm execution. To get size of required buffers, use the following auxiliary functions:

Function Buffer Information
<processing function>GetSize Get buffer size for precomputed data structure that is initialized by <processing function>Init.
<processing function>GetBufferSize Obtain the size for a temporary buffer that is passed to the processing function.

Setting Image Border Type

Many image processing algorithms sample a pixel by floating point (x, y ) coordinates to compute an intermediate or output image. To improve the image quality, you can apply filters that use neighborhood pixels to calculate the sampled pixel value. Thus, as shown in the following figure, to obtain an image with size 6x6 by using 3x3 filter kernel (8 neighborhood pixels are used), the source image of size 8x8 is required.

Each filtering operation reduces the image size. To keep the image size and process the image border pixels, it is required to extend the image artificially. There are several types of border processing in Intel IPP:

Replicated borders
Border pixels are replicated from the source image edge pixels.
Constant borders
Values of all border pixels are set to a constant.
Transparent borders
Destination pixels that have an inverse transformed location out of the source image are not processed.
Borders in memory
Source image border pixels are obtained from the source image pixels in memory.
Mixed borders
A combination of transparent borders and borders in memory is applied.

To set border processing methods for Intel IPP functions, use the borderType (or border) and borderValue parameters. For more information on the list of supported border types for a particular function, refer to the User-defined Border Types page of the Intel® Integrated Performance Primitives (Intel® IPP) Developer Guide and Reference.