Intel® Integrated Performance Primitives (Intel® IPP) Developer Guide and Reference

ID 790148
Date 3/22/2024
Public
Document Table of Contents

General Linear Filters

These functions use a general rectangular kernel to filter an image. The kernel is a matrix of signed integers or single-precision real values. For each input pixel, the kernel is placed on the image in such a way that the fixed anchor cell within the kernel coincides with the input pixel. The anchor cell is usually a geometric center of the kernel, but can be skewed with respect to the geometric center.

A pointer to an array of kernel values is passed to filtering functions. These values are read in row-major order starting from the top left corner. This array must exactly have kernelSize.width * kernelSize.height entries. The anchor cell is specified by its coordinates anchor.x and anchor.y in the coordinate system associated with the lower right corner of the kernel.

The output value is computed as a sum of neighbor pixels values, with kernel matrix elements used as weight factors. Summation formulas implement a convolution operation, which means that kernel coefficients are used in direct order.

NOTE:

In Intel IPP 8.2 and lower versions, kernel coefficients are used in inverse order.

Optionally, the output pixel values may be scaled. To ensure valid operation when image boundary pixels are processed, the application should correctly define additional border pixels (see Borders in Neighborhood Operations).