Question on Image transformation

2 ビュー (過去 30 日間)
Mubeen
Mubeen 2013 年 3 月 29 日
コメント済み: Image Analyst 2017 年 2 月 14 日
Hey guys. I have a question on changing the perspective of an image. Using this resource: http://mopage.de/2011/10/perspective/ 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!

採用された回答

Alex Taylor
Alex Taylor 2013 年 4 月 2 日
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.

その他の回答 (2 件)

Sean de Wolski
Sean de Wolski 2013 年 3 月 29 日
doc imwarp
doc imtransform

Image Analyst
Image Analyst 2013 年 3 月 31 日
  2 件のコメント
usman arif
usman arif 2017 年 2 月 14 日
Hi guys, I am working on the same thing, I want to rotate image I which is gray scale image, by rotation matrix R which is 3x3 matrix. I am trying to use imwarp with projective2d. but the problem is imwarp changes the size of image.. I want the image size to remain same
Image Analyst
Image Analyst 2017 年 2 月 14 日
Call imcrop() or imresize() to make it whatever you want after you've warped it.

サインインしてコメントする。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by