Performs an inverse affine transform of an image.
Case 1: Operation on pixel-order data
IppStatus ippiWarpAffineBack_<mod>(const Ipp<datatype>* pSrc, IppiSize srcSize, int srcStep, IppiRect srcRoi, Ipp<datatype>* pDst, int dstStep, IppiRect dstRoi, const double coeffs[2][3], int interpolation);
Supported values for mod:
8u_C1R |
16u_C1R |
32f_C1R |
8u_C3R |
16u_C3R |
32f_C3R |
8u_C4R |
16u_C4R |
32f_C4R |
8u_AC4R |
16u_AC4R |
32f_AC4R |
Case 2: Operation on planar-order data
IppStatus ippiWarpAffineBack_<mod>(const Ipp<datatype>* const pSrc[3], IppiSize srcSize, int srcStep, IppiRect srcRoi, Ipp<datatype>* const pDst[3], int dstStep, IppiRect dstRoi, const double coeffs[2][3], int interpolation);
Supported values for mod:
8u_P3R |
16u_P3R |
32f_P3R |
IppStatus ippiWarpAffineBack_<mod>(const Ipp<datatype>* const pSrc[4], IppiSize srcSize, int srcStep, IppiRect srcRoi, Ipp<datatype>* const pDst[4], int dstStep, IppiRect dstRoi, const double coeffs[2][3], int interpolation);
Supported values for mod:
8u_P4R |
16u_P4R |
32f_P4R |
pSrc |
Pointer to the source image origin. An array of separate pointers to each plane in case of data in planar format. | ||||||
srcSize |
Size in pixels of the source image. | ||||||
srcStep |
Distance in bytes between starts of consecutive lines in the source image buffer. | ||||||
srcRoi |
Region of interest in the source image (of the IppiRect type). | ||||||
pDst |
Pointer to the destination image origin. An array of separate pointers to each plane in case of data in planar format. | ||||||
dstStep |
Distance in bytes between starts of consecutive lines in the destination image buffer. | ||||||
dstRoi |
Region of interest in the destination image (of the IppiRect type). | ||||||
coeffs |
The affine transform coefficients. | ||||||
interpolation |
Specifies the interpolation mode. Use one of the following values:
|
The function ippiWarpAffineBack is declared in the ippi.h file. It operates with ROI (see ROI Processing in Geometric Transforms).
This function performs the inverse transform to that defined by ippiWarpAffine function. Pixel coordinates x' and y' in the transformed image are obtained from the following equations:
c00* x' + c01* y' + c02 = x
c10* x' + c11* y' + c12 = y
where x and y denote the pixel coordinates in the source image, and coefficients cij are given in the array coeffs. Thus, you do not need to invert transform coefficients in your application program before calling ippiWarpAffineBack.
Note that inverse transform functions handle source and destination ROI in a different way than other geometric transform functions. Their implementation include the following logic:
The above algorithm can be represented in pseudocode as follows:
for (j = dstRoi.y; j < dstRoi.y + dstRoi.height; j ++) {
for (i = dstRoi.x; i < dstRoi.x + dstRoi.width; i ++) {
sx = TransformX(i, j); sy = TransformY(i, j);
if (sx >= srcRoi.x && sx < srcRoi.x + srcRoi.width && sy >= srcRoi.y && sy < srcRoi.y + srcRoi.height) {
dst[i, j] = Interpolate(sx, sy);} } }
Example “Using the function ippiShear” shows how to use the function ippiWarpAffineBack_32f_C1R.
ippStsNoErr |
Indicates no error. Any other value indicates an error or a warning. |
ippStsNullPtrErr |
Indicates an error condition if one of the specified pointers is NULL. |
ippStsSizeErr |
Indicates an error condition if any image dimension has zero or negative value. |
ippStsStepErr |
Indicates an error condition if srcStep or dstStep has a zero or negative value. |
ippStsInterpolationErr |
Indicates an error condition if interpolation has an illegal value. |
ippStsCoeffErr |
Indicates an error condition if c00*c11 - c01*c10 = 0. |
ippStsWrongIntersectROIErr |
Indicates an error condition if srcRoi has no intersection with the source image. |
ippStsWrongIntersectQuad |
Indicates a warning that no operation is performed if the transformed source ROI has no intersection with the destination ROI. |
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.