OpenCV Q&A Forum - RSS feedhttp://answers.opencv.org/questions/OpenCV answersenCopyright <a href="http://www.opencv.org">OpenCV foundation</a>, 2012-2018.Tue, 28 Aug 2012 02:45:39 -0500RANSAC and 2D point cloudshttp://answers.opencv.org/question/1834/ransac-and-2d-point-clouds/I have 2 point clouds in 2D and I want to use RANSAC to determine transformation matrix between them.
I have no pairs of points, just 2 sets of points.
How can I do this in OpenCV?
----------
I tried to write ransac-like scheme for my purposes.
1. Get 4 random points from 1st set and from 2nd set.
2. Compute transform matrix H using getPerspectiveTransform.
3. Warp 1st set of points using H and test how they aligned to the 2nd set of points using some metric(I don't know what metric I should use I tried sum of min distance for all points in 1st set, but it seems it's not work good if points group together after transform)
4. Repeat 1-3 N times and choose best transform according to metric.
maybe I should use different metric?
Also I have idea that I can match points using shape context algorithm and only then use RANSAC(or some other algorithm) to determine transformation.mrgloomTue, 28 Aug 2012 02:45:39 -0500http://answers.opencv.org/question/1834/