imtransform, tracking a projection destination of some pixel
Show older comments
Hey Guys,
I am doing imtransform, yet it scale the output image automatically,
And I can not find the destination of a specific feature point.
Could you help me out?
Related codes for checking:
[ imgDouble{1}, ybound, xbound ] = imtransform( imgDouble{1}, tform );
Ap = tformfwd( tform, inlier_array );
Ap = mean(Ap);
ApCord = tformfwd( tform, [ [1, 1]; [height, 1]; [1, width]; [height, width] ] );
ApCord = [ min( ApCord ); max( ApCord ) ];
AppH = xbound(2) - xbound(1) + 1;
ApCordH = ApCord( 2, 1 ) - ApCord( 1, 1 ) + 1;
App(1) = ( Ap(1) - ApCord( 1, 1 ) + 1 ) * AppH / ApCordH + xbound(1) - 1;
AppW = ybound(2) - ybound(1) + 1;
ApCordW = ApCord( 2, 2 ) - ApCord( 1, 2 ) + 1;
App(2) = ( Ap(2) - ApCord( 1, 2 ) + 1 ) * AppW / ApCordW + ybound(1) - 1;
B_Location = mean( dest_array );
A_Location = App - [ xbound(1), ybound(1) ] + [1, 1];
offset_AB = A_Location - B_Location + [1, 1];
putative_off_B = offset_AB ;
2 Comments
Image Analyst
on 27 Mar 2013
You forgot to supply same data so we can help you out. I can't run this snippet of code to even see what's going on.
Accepted Answer
More Answers (0)
Categories
Find more on Generic Geometric Transformations in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!