Ask Your Question
0

Snap point to feature

asked 2013-05-14 12:51:04 -0600

diego gravatar image

Hello.

I'm developing a program that allows the user to select feature points from several images, matching them. However, this brings a lot of error in the input since it is hard for the user to precisely select the desired pixel. On the other hand, I assume that the user wants to place the feature in areas of interest (building/window/door corners, among others). Is there anything I can use to "snap" the user selected feature to the "correct" or most interesting point?

Thanks

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-05-15 04:23:14 -0600

Ben gravatar image

updated 2013-05-15 04:59:42 -0600

You could precompute the features, build a Voronoi diagram from your feature's keypoint coordinates and find out the closest feature to the user's input coordinates.

There is a deprecated C API method to compute Voronoi diagrams in OpenCV or you can use distanceTransform()

UPDATE

I just found out that the deprecated stuff was ported to C++ in the imgproc module, but Subdiv2D is not yet documented, as it seems...

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-05-14 12:51:04 -0600

Seen: 262 times

Last updated: May 15 '13