Developer Reference

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

GetAffineTransform

Computes affine transform coefficients to map the source ROI to the quadrangle with the specified vertex coordinates

Syntax

IppStatus ippiGetAffineTransform (IppiRect
srcRoi
, const double
quad
[4][2], double
coeffs
[2][3]
);
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
srcRoi
Region of interest in the source image (of the
IppiRect
type).
quad
Vertex coordinates of the quadrangle, to which the source ROI is mapped by the affine transform function.
coeffs
Output array. Contains the target affine transform coefficients.
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 the coefficients
coeffs
of the affine transform that must be used by the warping function to map the source rectangular ROI to the quadrangle with the specified vertex coordinates
quad
. The first dimension [4] of the array
quad
[4][2] is equal to the number of vertices, and the second dimension [2] means
x
and
y
coordinates of the vertex. Quadrangle vertices have the following meaning:
quad
[0] corresponds to the transformed top-left corner of the source ROI,
quad
[1] corresponds to the transformed top-right corner of the source ROI,
quad
[2] corresponds to the transformed bottom-right corner of the source ROI,
quad
[3] corresponds to the transformed bottom-left corner of the source ROI.
The function computes the coordinates of the 4th vertex of the destination quadrangle that uniquely depends on the three other vertices. If the computed coordinates are not equal to the ones specified in
quad
, the function returns the warning message and continues operation with the computed values.
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.
ippStsCoeffErr
Indicates an error condition if c
00
*c
11
- c
01
*c
10
= 0.
ippStsSizeErr
Indicates an error condition if
srcRoi
has a size field with zero or negative value.
ippStsAffineQuadChanged
Indicates a warning that coordinates of the 4th vertex of the specified quadrangle
quad
are not correct.

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