pub fn transform<T: HasAfEnum>(
) -> Array<T>
Transform(Affine) an Image
The transform function uses an affine transform matrix to tranform an input image into a new one. The transform matrix tf is a 3x2 matrix of type float. The matrix operation is applied to each location (x, y) that is then transformed to (x', y') of the new array. Hence the transformation is an element-wise operation.
The operation is as below: tf = [r00 r10 r01 r11 t0 t1]
x' = x * r00 + y * r01 + t0; y' = x * r10 + y * r11 + t1;
This function can also handle batch operations.
inputis the image to be resized
transis the transformation matrix to be used for image transformation
odim0is the output height
odim1is the output width
methodindicates which interpolation method to use for resizing. It uses enum InterpType to identify the interpolation method.
is_inverseindicates if to apply inverse/forward transform