imrotate
R2026bRotate image
Syntax
Description
rotates image J = imrotate(I,angle)I by angle degrees in a
counterclockwise direction around its center point. To rotate the image clockwise,
specify a negative value for angle.
imrotate makes the output image J
large enough to contain the entire rotated image. By default,
imrotate uses nearest neighbor interpolation, setting the
values of pixels in J that are outside the rotated image to
0 for numeric and logical images and
missing for categorical images.
assigns a fill value to output pixels outside the
rotated image (since R2026b). Specify the J = imrotate(___,FillValues=fillValues)FillValues name-value
argument in addition to any combination of input arguments from previous
syntaxes.
Examples
Input Arguments
Output Arguments
Tips
In some instances, this function takes advantage of hardware optimization for data types
uint8,uint16,single, anddoubleto run faster.
Extended Capabilities
Version History
Introduced before R2006aSee Also
imcrop | imrotate3 | imresize | imtransform | tformarray

