The C++ interface for affine transformation. More...

array transform (const array &image, const array &transform, const unsigned oh=0, const unsigned ow=0, const bool inverse=true)
 

Detailed Description

The C++ interface for affine transformation.

Affine transformations allow transformation of images using a transform matrix. The matrix represents the operation to be performed on the image. The transformation matrix is a 3x2 matrix consisting of a 2x2 rotation matrix R combined with a 1x2 translation matrix T.

Matrix Transform = | R | = | r00 r01 | | T | | r10 r11 | | t00 t01 |

The operations that can be represented using this matrix form include rotation, translation, scaling and skew among others.

For more on warp affine transforms, see: Warp Affine Transformations

Function Documentation

array af::transform ( const array &  image,
const array &  transform,
const unsigned  oh = 0,
const unsigned  ow = 0,
const bool  inverse = true 
)
Parameters
[in]imageinput image
[in]transformaffine transform matrix of size 3x2
[in]ohspecify output height of image, if (0, default) then output height is equal to input height
[in]owspecify output width of image, if (0, default) then output width is equal to input width
[in]inverseforward transform (false) or inverse transform (true, default)
Returns
transformed image