ImageRotate
ImageRotate[image]
rotates image by 90° about its center in the - plane.
ImageRotate[image,θ]
rotates image by θ radians.
ImageRotate[image,{θ,w}]
rotates a 3D image around the 3D vector w.
ImageRotate[image,…,size]
gives an image of the specified size.
ImageRotate[video,…]
rotate frames of video.
Details and Options
- ImageRotate rotates an image about its center or any other point of rotation. It is commonly used to fix the image orientation or align it with the horizon.
- ImageRotate[image,…] rotates image about its center.
- For video inputs, the rotation specification can be a fixed specification for all frames or a function of time (in seconds from the start).
- For 2D images and videos, ImageRotate[input,side] rotates input to make the top of the image be on the specified side. ImageRotate[input,side1->side2] rotates input to make side1 be on side2. Possible side specifications are: Top, Bottom, Left, Right.
- ImageRotate[image,side] is equivalent to ImageRotate[image,Top->side].
- Possible specifications for size include:
-
width crop to width {width,height} crop to {width,height} {width,depth,height} crop a 3D image to {width,depth,height} Automatic smallest rectangle to enclose all of the rotated image All smallest square to accommodate the rotated image for any rotation angle Full use the dimensions of the input image "MaxAreaCropping" crop to include only input pixels while maximizing area "SameRatioCropping" crop to include only input pixels while preserving ratios - The following options are supported:
-
Background 0 background color to use Masking All region of interest to be rotated Padding 0 padding of the original image Resampling Automatic resampling method - Masking option can be one of the following:
-
All input image only Full input image and padding mask any mask image
Examples
open allclose allBasic Examples (2)
Scope (8)
Data (4)
Rotation Angle (3)
Output Size (1)
By default, padding is used to show the smallest rectangle that encloses all of the rotated image:
Crop to the size of the original image:
Crop to the input image pixels while preserving aspect ratio:
Crop to the input image pixels while maximizing area:
Crop to the smallest square that accommodates all rotation angles:
Options (5)
Background (1)
Masking (1)
Padding (1)
Applications (2)
Properties & Relations (2)
ImageRotate performs a rotation about the center:
Use ImageTransformation and RotationTransform to rotate the image:
Rotate about a different center using ImageTransformation:
Rotate a 3D image around the x-axis:
Use ImageTransformation and RotationTransform to rotate the image:
Text
Wolfram Research (2008), ImageRotate, Wolfram Language function, https://reference.wolfram.com/language/ref/ImageRotate.html (updated 2021).
CMS
Wolfram Language. 2008. "ImageRotate." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/ImageRotate.html.
APA
Wolfram Language. (2008). ImageRotate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ImageRotate.html