Clear Filters
Clear Filters

Difference between two Computer vision functions - fitgeotform2d and estgeotform2d

4 views (last 30 days)
Hi,
It seems that with the same input (using the filtered points given from a prior use of [tform,inlierIndex] = estgeotform2d(___) ) The two outputs for "affine" transformation are very different.
I can't find in the docs which algorithm is used for each function.
How can I figure what causes the difference, and how should I use each transformation if I want to transform individual points, and not whole images?
Thank you

Answers (1)

Rasmita
Rasmita on 14 Mar 2023
Edited: Rasmita on 14 Mar 2023
Hi Etamar,
It is my understanding that, you want to know the difference between ‘fitgeotform2d’ and ‘estgeotform2d’ functions and which algorithms are used for them, also how to transform individual points and not the whole image.
The function 'estgeotform2d' estimates 2-D geometric transformation from matching point pairs, whereas 'fitgeotform2d' fits a transformation to the control point pairs. There is also a difference in the types of geometric transformation objects returned in both cases. You can refer to following documentation pages for more information on this:
The algorithm used for function 'estgeotform' is M-estimator sample consensus (MSAC) to exclude outliers(refer https://www.mathworks.com/help/vision/ref/estgeotform2d.html?s_tid=answers_rc2-2_p5_MLT#mw_884abd94-6959-485b-8a56-8d027548518e). And to know about the algorithm for 'fitgeotform' refer https://www.mathworks.com/help/images/ref/fitgeotform2d.html?s_tid=doc_ta#mw_bbf65ade-c8b1-456a-b5bc-dd822a6ceb83
And, to transform individual points instead of whole image in each case, use 'transformPointsForward' function that you can use on those points. Also, you must use 'worldToIntrinsic' function to convert the output of above function in world coordinates to intrinsic coordinates, as follows:
[B,RB]= imwarp(A,tform);
[x,y]= transformPointsForward(tform, u, v);
[xIntrinsic, yIntrinsic]= worldToIntrinsic(RB,x,y);
where 'tform' is the output from 'estgeotform' or 'fitgeotform' and RB is a spacial referencing object.
Please refer the below documentations links for more information on above functions:
Hope this helps!
Regards,
Rasmita

Community Treasure Hunt

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

Start Hunting!