In imtransform what is the position of input point in the output image.

4 views (last 30 days)
Hi,
I am using imtransform to perform a projective transformation
I = imread('cameraman.tif');
udata = [0 1]; vdata = [0 1];
tform = maketform('projective',[ 0 0; 1 0; 1 1; 0 1],...
[0 -0.1; 1 0 ; 1 1; 0 1.1]);
[B,xdata,ydata] = imtransform(I, tform, 'bicubic', 'udata', udata,'vdata', vdata,'FillValues', 0.5);
imshow(I,'XData',udata,'YData',vdata), ...
axis on
figure
imshow(B,'XData',xdata,'YData',ydata), ...
axis on
but i wanted know to if i have a point suppose (u,v)=(10,10) where will this point go in the output image.

Answers (1)

Walter Roberson
Walter Roberson on 7 Aug 2015
Uvec = 10;
Vvec = 10;
[Uproj, Vproj] = tformfwd(tform, Uvec(:), Vvec(:));
If I interpret the documentation correctly, that is.

Community Treasure Hunt

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

Start Hunting!