
And here I would like to offer my C++ implementation of such a solution for the 2D to 2D correspondence. The line of thought with the implementation is as follows:
given: the order-known (with determined order:1 2 3... ) points set
the order-unknown points set
threshold: the minimal distance between the points, if the distance is larger than it, the correspondence determination makes no sense any more
to obtain: the correct correspondence between these two sets
How to run it:
for all red points with known CS
for all green points with known CS
calculate all of the possible distances between each other;
if (Di is smaller than threshold and Di is the minimal distance)
the order of this green point belongs to the ith red point;
end
end
end
The output is below:
We can check the result easily that after the correspondence operation, the order of two sets match each other correctly. And in my another project which is related to the one camera reconstruction problem, this function works also efficiently to improve the transformation matrix. And I will attach my C++ code of the implementation which is run under the Visual Studio 2008. I hope it could help you guys. Enjoy it!!
ontheweg

Posted in: 

0 comments:
Post a Comment