Back to Aurora Vision Library Lite website

You are here: Start » Image » Image Spatial Transforms » RotateImage

RotateImage


Header: AVL.h
Namespace: avl

Rotates an image clockwise.

Syntax

void avl::RotateImage
(
	const avl::Image& inImage,
	float inAngle,
	avl::RotationSizeMode::Type inSizeMode,
	avl::InterpolationMethod::Type inInterpolationMethod,
	const bool inInverse,
	avl::Image& outImage,
	atl::Optional<avl::CoordinateSystem2D&> outOutputAlignment = atl::NIL
)

Parameters

Name Type Default Description
Input value inImage const Image& Input image
Input value inAngle float 45.0f Rotation angle (clockwise)
Input value inSizeMode RotationSizeMode::Type
Input value inInterpolationMethod InterpolationMethod::Type Bilinear
Input value inInverse const bool False 'True' changes rotation to counter-clockwise
Output value outImage Image& Output image
Output value outOutputAlignment Optional<CoordinateSystem2D&> NIL Alignment of the output image

Optional Outputs

The computation of following outputs can be switched off by passing value atl::NIL to these parameters: outOutputAlignment.

Read more about Optional Outputs.

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

List of possible exceptions:

Error type Description
DomainError Image dimensions too big in RotateImage.