[][src]Function arrayfire::rotate

pub fn rotate<T: HasAfEnum>(
    input: &Array<T>,
    theta: f64,
    crop: bool,
    method: InterpType
) -> 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.

Parameters

Return Values

Rotated Array