imrotate
Rotate image
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.
Examples
Input Arguments
Output Arguments
Tips
This function changed in version 9.3 (R2015b). Previous versions of the Image Processing Toolbox™ use different spatial conventions. If you need the same results produced by the previous implementation, use the function
imrotate_old
.In some instances, this function takes advantage of hardware optimization for data types
uint8
,uint16
,single
, anddouble
to run faster.
Extended Capabilities
Version History
Introduced before R2006aSee Also
imcrop
| imrotate3
| imresize
| imtransform
| tformarray