Developer Reference

  • 2020
  • 07/15/2020
  • Public Content
Contents

Borders in Neighborhood Operations

Filtering functions described in this section perform neighborhood operations. They operate on the assumption that for each pixel to be processed, all neighborhood pixels required for the operation are also available.
The neighborhood for each given pixel is defined by the filter kernel (or mask) size and anchor cell position. For more information about anchors and how to define the anchor cell position refer to Neighborhood Operations.
As the following figure illustrates, if the input pixel is near the horizontal or vertical edge of the image, the overlaid kernel may refer to neighborhood pixels that do not exist within the source image and are located outside the image area.
The set of all boundary source image pixels that require such non-existent pixels to complete the neighborhood operation for the given kernel and anchor is shaded yellow, while the collection of all scanned external pixels (called border pixels) is shaded gray.
If you want to apply some filtering operation to the whole source image, you must figure out what additional border pixels are required for the operation, and define these non-existent pixels. To do this, you can use the Intel IPP functions
ippiCopyConstBorder
,
ippiCopyReplicateBorder
, or
ippiCopyWrapBorder
, which fill the border of the extended image with the pixel values that you define, or you can apply your own extension method.
If the required border pixels are not defined prior to the filtering function call, you may get memory violation errors.
If you want to apply the filtering operation to the part of the source image, or ROI, then the necessity of extending the image area with border pixels depends on the ROI size and position within the image. The figure below shows that if ROI does not cover yellow (internal boundary) pixels, then no external pixels are scanned, and border extension is not required.
If boundary pixels are part of ROI, you still need to extend some area of the source image.
To provide valid results of filtering operations, the application must check the following:
  • ROI parameters passed to the filtering function have such values
  • All required neighborhood pixels actually exist in the image and define the missing pixels when necessary.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804