Herror ::rotate_image (
    Hobject Image,
    Hobject *ImageRotate,
    const HTuple &Phi,
    const HTuple &Interpolation
)
HImage HImage::RotateImage (
    const HTuple &Phi,
    const HTuple &Interpolation
) const
HImageArray HImageArray::RotateImage (
    const HTuple &Phi,
    const HTuple &Interpolation
) const

Rotate an image about its center.

::rotate_image rotates the image Image counterclockwise by Phi degrees about its center. This operator is much faster if Phi is a multiple of 90 degrees than the general operator ::affine_trans_image. For rotations by 90, 180, and 270 degrees, the region is rotated accordingly. For all other rotations the region is set to the maximum region, i.e., to the extent of the resulting image. The effect of the parameter Interpolation is the same as in ::affine_trans_image. It is ignored for rotations by 90, 180, and 270 degrees. The size of the resulting image is the same as that of the input image, with the exception of rotations by 90 and 270 degrees, where the width and height will be exchanged.


Attention

The angle Phi is given in degrees, not in radians.


Parameters

Image (input_object)
(multichannel-)image(-array) -> Hobject: HImage(Array) ( byte / int2 )
Input image.

ImageRotate (output_object)
(multichannel-)image(-array) -> Hobject * : HImage(Array) ( byte / int2 )
Rotated image.

Phi (input_control)
angle.deg -> HTuple.double / long
Rotation angle.
Default value: 90
Suggested values: 90, 180, 270
Typical range of values: 0 <= Phi <= 360
Minimum increment: 0.001
Recommended increment: 0.2

Interpolation (input_control)
string -> HTuple.char *
Type of interpolation.
Default value: 'constant'
List of values: 'none', 'constant', 'weighted'


Example
read_image(&Image,"affe");
disp_image(Image,WindowHandle);
rotate_image(Image,&RotImage,270);
disp_image(RotImage,WindowHandle);

Alternatives

::hom_mat2d_rotate, ::affine_trans_image


See also

::mirror_image


Module

Image filters



Copyright © 1996-2002 MVTec Software GmbH