pub fn rotate<T: HasAfEnum>(
) -> Array<T>
Rotate an Image
Rotating an input image can be done using either NEAREST or BILINEAR interpolations. Nearest interpolation will pick the nearest value to the location, whereas bilinear interpolation will do a weighted interpolation for calculate the new size.
This function does not differentiate between images and data. As long as the array is defined, it will rotate any type or size of array.
The crop option allows you to choose whether to resize the image. If crop is set to false, ie. the entire rotated image will be a part of the array and the new array size will be greater than or equal to the input array size. If crop is set to true, then the new array size is same as the input array size and the data that falls outside the boundaries of the array is discarded.
Any location of the rotated array that does not map to a location of the input array is set to 0.
inputis the input image
thetais the amount of angle (in radians) image should be rotated
cropindicates if the rotated image has to be cropped to original size
methodindicates which interpolation method to use for rotating the image. It uses enum InterpType to identify the interpolation method.