Rotate image
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. imrotate
uses nearest neighbor interpolation,
setting the values of pixels in J
that are outside the rotated
image to 0
(zero).
You optionally can perform the rotation
rotates image J
= imrotate(I
,angle
,method
,bbox
)I
, where bbox
specifies the
size of the output image. If you specify 'crop'
, then
imrotate
makes the output image the same size as the input
image. If you specify 'loose'
, then imrotate
makes the output image large enough to include the entirety of the rotated
image.
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
,
and double
to run faster.
imcrop
| imresize
| imrotate3
| imtransform
| tformarray