Performs an affine transformation of a 2D, 3D, or 4D vector or array of vectors in a Homogeneous coordinate space.
IppStatus ippmAffineTransform_m4v2_32f (const Ipp32f* pSrc1, const Ipp32f* pSrc2, Ipp32f* pDst);
IppStatus ippmAffineTransform_m4v3_32f (const Ipp32f* pSrc1, const Ipp32f* pSrc2, Ipp32f* pDst);
IppStatus ippmAffineTransform_m4v4_32f (const Ipp32f* pSrc1, const Ipp32f* pSrc2, Ipp32f* pDst);
IppStatus ippmAffineTransform_m4v2a_32f (const Ipp32f* pSrc1, const Ipp32f* pSrc2, int src2Stride0, Ipp32f* pDst, int dstStride0, int count);
IppStatus ippmAffineTransform_m4v3a_32f (const Ipp32f* pSrc1, const Ipp32f* pSrc2, int src2Stride0, Ipp32f* pDst, int dstStride0, int count);
IppStatus ippmAffineTransform_m4v4a_32f (const Ipp32f* pSrc1, const Ipp32f* pSrc2, int src2Stride0, Ipp32f* pDst, int dstStride0, int count);
The functions ippmAffineTransform_m4v2_32f, ippmAffineTransform_m4v3_32f, ippmAffineTransform_m4v4_32f, ippmAffineTransform_m4v2a_32f, ippmAffineTransform_m4v3a_32f, and ippmAffineTransform_m4v4a_32f are declared in the ippm.h file. These functions perform an affine transformation of a vector or array of vectors in a Homogeneous coordinate space. The transformation is determined by the src1 matrix. The functions whose names contain the v2, v3, or v4 characters in the descriptor, operate on 2D, 3D, or 4D vectors, respectively. The functions whose names contain the a character before the underscore transform vector arrays, whereas the other functions transform vectors.
Provided that the 4x4 matrix src1 is represented as a 16-element array, the transformation uses the following formulae, depending on the dimension of the vectors:
For 2D vectors,
dst[0] = src1[0] * src2[0] + src1[4] * src2[1] + src1[12]
dst[1] = src1[1] * src2[0] + src1[5] * src2[1] + src1[13]
dst[2] = src1[2] * src2[0] + src1[6] * src2[1] + src1[14]
dst[3] = src1[3] * src2[0] + src1[7] * src2[1] + src1[15]
For 3D vectors,
dst[0] = src1[0] * src2[0] + src1[4] * src2[1] + src1[ 8] * src2[2] + src1[12]
dst[1] = src1[1] * src2[0] + src1[5] * src2[1] + src1[ 9] * src2[2] + src1[13]
dst[2] = src1[2] * src2[0] + src1[6] * src2[1] + src1[10] * src2[2] + src1[14]
dst[3] = src1[3] * src2[0] + src1[7] * src2[1] + src1[11] * src2[2] + src1[15]
For 4D vectors,
dst[0] = src1[0] * src2[0] + src1[4] * src2[1] + src1[ 8] * src2[2] + src1[12] * pSrc2[3]
dst[1] = src1[1] * src2[0] + src1[5] * src2[1] + src1[ 9] * src2[2] + src1[13] * pSrc2[3]
dst[2] = src1[2] * src2[0] + src1[6] * src2[1] + src1[10] * src2[2] + src1[14] * pSrc2[3]
dst[3] = src1[3] * src2[0] + src1[7] * src2[1] + src1[11] * src2[2] + src1[15] * pSrc2[3]
Copyright © 2000 - 2011, Intel Corporation. All rights reserved.