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

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

ROI Processing in Geometric Transforms

All the transform functions described in this chapter operate in rectangular regions of interest (ROIs) that are defined in both the source and destination images. The procedures for handling ROIs in geometric transform functions differ from those used in other functions (see Regions of Interest in Intel IPP). The main difference is that operations take place in the intersection of the transformed source ROI and the destination ROI. More specifically, all geometric transform functions (except those which perform inverse warping operations) handle ROIs with the following sequence of operations (see figure below):

  • transform the rectangular ROI of the source image to quadrangle in the destination image;
  • find the intersection of this quadrangle and the rectangular ROI of the destination image;
  • update the destination image in the intersection area.



The coordinates in the source and destination images must have the same origin.

When using functions with ROI, every scan line of a source image has a stride. It is padded with zeroes for alignment, so the actual size of a scan line in bytes is often greater than the image width. The size of each row of image data in bytes is determined by the value of srcStep parameter, which gives distance in bytes between the starts of consecutive lines of an image.

To fully describe a rectangular ROI, both its origin (coordinates of top left corner) and size must be referenced. For geometrical transform functions, the source image ROI is specified by srcRoi parameter of IppiRect type, meaning that all four values describing the rectangular ROI are given explicitly.

The destination image ROI for different functions can be specified either by dstRoi parameter of IppiRect type, or dstRoiSize parameter of IppiSize type. In the latter case, only the destination ROI size is passed, while its origin is referenced by pDst pointer.

The destination image origin ROI for different functions can be specified by dstOffset parameter of IppiPoint type and dstSize parameter of IppiSize type. In this case, the processed destination image coressponds to the processed ROI of the destination image origin.