|
SOLUTIONS
|
BUILT-IN MATHEMATICA SYMBOL
ImagePerspectiveTransformation
ImagePerspectiveTransformation[image, m]
applies a linear fractional transform specified by a matrix m to the positions of each pixel in image.
ImagePerspectiveTransformation[image, m, size]
gives an image of the specified size.
Details and OptionsDetails and Options
- For a 2×2 matrix m, ImagePerspectiveTransformation[image, m] applies AffineTransform[m] to image.
- ImagePerspectiveTransformation[image, {m, v}] applies AffineTransform[{m, v}] to image.
- For a 3×3 matrix m, ImagePerspectiveTransformation[image, m] applies LinearFractionalTransform[m] to image.
- In ImagePerspectiveTransformation[image, {a, b, c, d}], where a is a 2×2 matrix, b and c are vectors of length 2, and d is a scalar, a LinearFractionalTransform[{a, b, c, d}] is applied to image.
- ImagePerspectiveTransformation also works with TransformationFunction objects.
- ImagePerspectiveTransformation can take the following options:
-
AspectRatio Automatic aspect ratio of the output image DataRange Automatic range of coordinates in the original image PlotRange Automatic range of coordinates in the resulting image Padding Black padding method Resampling Automatic resampling method - DataRange->Full and PlotRange->Full assume the range
. - DataRange->Automatic is equivalent to a setting of
, where
represents the aspect ratio of the original image. - PlotRange->All tries to include all of the target pixels.
- PlotRange->Automatic takes PlotRange to be equal to DataRange.
- When PlotRange is not Automatic, size is chosen based on the size of the original image and the ratio of PlotRange and DataRange.
- For possible size specifications, see the reference page for ImageResize.
ExamplesExamplesopen allclose all
Basic Examples (1)Basic Examples (1)
Transform an image using a perspective transformation:
| In[1]:= |
| Out[1]= | ![]() |
New in 8
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »


