Rotate an image by a given angle. More...

Modules

 rotate
 The C++ interface for rotate.
 
 af_rotate
 The C interface for rotate.
 

Detailed Description

Rotate an image by a given angle.

Rotate the input image by theta radians. Positive indicates clockwise rotatoin and a negative angle rotates the image counter-clockwise.

// Rotate an image counter-clockwise 60 degrees
// and set output size to be same as input (cropping)
array img_out_crop = rotate(img_in, -Pi/3.f);
// Perform the same transformation but skip the cropping
// operation. The output will be larger than the input
array img_out_nocrop = rotate(img_in, -Pi/3.f, false);
// Rotate an image clockwise 90 degrees
// and adjust output image size as needed (no cropping)
array img_out = rotate(img_in, Pi/2.f, false);
img_in
img_in
img_out_nocrop
img_out_nocrop
img_out_crop
img_out_crop
img_out
img_out