Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

Question on Image transformation

Asked by Mubeen

Mubeen (view profile)

on 29 Mar 2013

Hey guys. I have a question on changing the perspective of an image. Using this resource: I found a way to calculate the transformation matrix, but how do I use this to create a new image with the change in perspective?

Thanks for the help!



Mubeen (view profile)

3 Answers

Answer by Alex Taylor

Alex Taylor (view profile)

on 2 Apr 2013
Accepted answer

Hi Mubeen,

If you have R2013a, you should look at the class projective2d and the function imwarp.

You can use projective2d to compute forward and inverse point transformations. You can use imwarp and projective2d together to form the resampled output image that is produced by applying a projective transformation.

If you are using previous versions of the Image Procesing Toolbox, you should use the analogous workflow with maketform('projective',___) and imtransform.

We refer the transformation you are referring to as a projective transformation in the Image Processing Toolbox.


Alex Taylor

Alex Taylor (view profile)

Answer by Sean de Wolski

Sean de Wolski (view profile)

on 29 Mar 2013
doc imwarp
doc imtransform


Sean de Wolski

Sean de Wolski (view profile)

Contact us