开发者

Sorting 2D coordinates

I have got a problem with finding the corresponding points in 开发者_如何学Gomultiple views of the same calibration artifact. Below you can see exemplary images of the calibration target.

Sorting 2D coordinates

Sorting 2D coordinates

I need to sort 2D coordinates of all circular markers and assure that corresponding (the same) markers in all views have the same index in markers' vectors. Can anyone give me a clue how to deal with such a thing? Many Thanks.


I am not sure I entirely understand what you want, but I may help.

Your artifact is nice because it's a plane, so you can go from one image to the other with an homography. Once you have the homography, your problem is more or less finished.

I once wrote a program that did that :

  • Load images (cv::imread())
  • Compute SURF features (cv::surf())
  • Match the features together (using least square between features)
  • Use openCV's findHomography() with CV_RANSAC

Basically, you'll end up with something like that : http://blogs.oregonstate.edu/hess/files/2010/10/sift_demo_screenshot1.jpg

And I think this is what you want : you've got a transformation that matches your markers between your two images. (This tranformation, an homography, is much less messy than the bunch of lines in the link I've given. It's a small matrix that "swallows" the coordinate of a marker in image1 and "gives back" the coordinates of the corresponding marker in image2) (which uses SIFT instead of SURF, but they are pretty much identical)


You can still use a similar approach.

Unlike Fezvez's approach which combines feature detection (which points in the image are interesting) and feature description (what is unique about that point), your own code already provides a detection part (where the circle centers are).

Now you need to generate a set of putative matches (guesses at which set corresponds to which set). You can do this using a feature descriptor at every circle location (possibly with a big window). See this vl_sift section on custom frames for an example of extracting descriptors at a particular location. Note, you may need to renormalize image to account for local affine warping. Use distance ratio test for SIFT or potentially some other distance metric for other systems.

Once you have the matches, you can feed it into a robust homography solver like OpenCV's findHomography to reject outliers (invalid matches which inevitably arise due to noise/other issues).

Alternatively, you can establish the point correspondences for the corners of the rectangles etc. by hand and feed that into the homography solver.

Perspective projections of all planar surfaces (like your calibration target) can be related via a homography. Anything you want to do in terms of marker identity can be backed out from the transform.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜