The C interface for rotate. More...

afError af_rotate_S (float *d_out, unsigned xo, unsigned yo, const float *d_in, unsigned xi, unsigned yi, float theta, unsigned batch)
 Rotate a given image by a specified amount. More...

Detailed Description

The C interface for rotate.

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);

Function Documentation

afError af_rotate_S ( float *  d_out,
unsigned  xo,
unsigned  yo,
const float *  d_in,
unsigned  xi,
unsigned  yi,
float  theta,
unsigned  batch 

Rotate a given image by a specified amount.

[in]xoNumber of rows in the output
[in]yoNumber of columns in the output
[out]d_outThe rotated image
[in]xiNumber of rows in input image
[in]yiNumber of columns in input image
[in]d_inInput image
[in]thetaValue in radians the image is to be rotated
[in]batchNumber of input images (1)