Back to Adaptive Vision Library website
You are here: Start » Function Reference » Image Spatial Transforms » RotateImage
Rotates an image clockwise.
Header: | AVL.h |
---|
Syntax
C++
C#
void avl::RotateImage ( const avl::Image& inImage, float inAngle, avl::RotationSizeMode::Type inSizeMode, avl::InterpolationMethod::Type inInterpolationMethod, const bool inInverse, avl::Image& outImage )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
![]() |
inImage | const Image& | Input image | |
![]() |
inAngle | float | 45.0f | Rotation angle (clockwise) |
![]() |
inSizeMode | RotationSizeMode::Type | ||
![]() |
inInterpolationMethod | InterpolationMethod::Type | Bilinear | |
![]() |
inInverse | const bool | False | 'True' changes rotation to counter-clockwise |
![]() |
outImage | Image& | Output image |
Description
The operation rotates the inImage around its center. Dimensions of the resulting image depends on inSizeMode parameter. In 'Fit' mode size is extended to fit the rotated image. In 'Preserve' mode size of source image is left unchanged and part of rotated image may be lost. Two modes of pixel interpolation are available, the bilinear filtering being more precise and computationally expensive.
Examples
![]() |
![]() |
RotateImage performed on the sample image in Fit mode with inAngle = 20.0.
Hardware Acceleration
This operation supports automatic parallelization for multicore and multiprocessor systems.
Errors
Error type | Description |
---|---|
DomainError | Image dimensions too big in RotateImage. |