This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

ImagePerspectiveTransformation

ImagePerspectiveTransformation
applies a linear fractional transform specified by a matrix m to the positions of each pixel in image.
ImagePerspectiveTransformation
gives an image of the specified size.
AspectRatioAutomaticaspect ratio of the output image
DataRangeAutomaticrange of coordinates in the original image
PlotRangeAutomaticrange of coordinates in the resulting image
PaddingBlackpadding method
ResamplingAutomaticresampling method
  • DataRange->Automatic is equivalent to a setting of , where represents the aspect ratio of the original image.
  • For possible size specifications, see the reference page for ImageResize.
Transform an image using a perspective transformation:
Transform an image using a perspective transformation:
In[1]:=
Click for copyable input
Out[1]=
Specify the size of the resulting image:
Use a geometric transformation matrix:
Set the input range of the function to be the actual pixel coordinates:
Use a fixed padding while rotating the image:
Use reflected padding:
Use the PlotRange option to show all the transformed pixels from the original image:
Use different resampling methods:
Remove the perspective distortion of the road:
Enhance the perspective effect:
Segment out the building in an image:
Shear the image to straighten up the building:
When the function maps some coordinates to infinity, truncated output is displayed:
New in 8