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

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

GetAffineSrcRoi

Computes ROI of an image for affine transform.

Syntax

IppStatus ippiGetAffineSrcRoi (IppiSize srcSize, const double coeffs[2][3], IppiWarpDirection direction, IppiPoint dstRoiOffset, IppiSize dstRoiSize, IppiRect *srcRoi);

Include Files

ippi.h

Flavors with the _L suffix: ippi_l.h

Domain Dependencies

Headers: ippcore.h, ippvm.h, ipps.h

Libraries: ippcore.lib, ippvm.lib, ipps.lib

Parameters

srcSize

Size of the source image, in pixels.

coeffs

Coefficients for affine transform.

direction

Transformation direction. Supported values:

ippWarpForward

Forward transformation.

ippWarpBackward

Backward transformation.

dstRoiSize

Size of the ROI of destination image.

dstRoiOffset

Offset of the destination image ROI.

srcRoi

Pointer to the computed region of interest in the source image.

Description

This function operates with ROI (see ROI Processing in Geometric Transforms).

This function is used as a support function for the ippiWarpAffineLinear, WarpAffineNearest, and WarpAffineCubic functions. It computes ROI of the source image to perform affine transformation for a given destination ROI. To process the given destination ROI, the computed source ROI with borders must be accessible in memory. If the source ROI outside pixels are out of the source image origin, the border pixels are processed according to the border flag that is passed to the ippiWarpAffineLinear, WarpAffineNearest, and WarpAffineCubic functions.

Return Values

ippStsNoErr

Indicates no error. Any other value indicates an error or warning.

ippStsRectErr

Indicates an error condition if width or height of the srcRoi is less than or equal to 1.

ippStsOutOfRangeErr

Indicates an error if the destination image offset has a field with a negative value.

ippStsSizeErr

Indicates an error condition if width or height of the source or destination image is less than, or equal to zero.

ippStsWrongIntersetQuad

Indicates a warning that no operation is performed because the transformed source image has no intersection with the destination ROI.

ippStsNullPtrErr

Indicates an error if one of the specified pointers is NULL.

ippStsWarpDirectionErr

Indicates an error when the direction value is illegal.

ippStsCoefErr

Indicates an error condition, if affine transformation is singular.