Achieve better accuracy in Feature Matching + Homography (using a webcam)

asked 2017-11-28 10:30:30 -0500

User007 gravatar image

Heya,

I am currently working on a project to track a given object (a pattern image) using my webcam. The Features2D + Homography tutorial was a great help to start with all the cool stuff using OpenCV.

However, it works good, but not perfect. In detail, I experience the same results as the guy in this video.

At the first look it looks pretty cool and it actually is, but one can notice sometimes the white rectangle becomes a trapeze on the left side (in the live view), and sometimes even extreme outliers such as this one appear:

image description

or this one:

image description

Besides those, what I am actually interested in to improve is avoiding 'semi outliers', where the white rectangle becomes more a trapeze:

image description

I already use the outlier-removal technique "ratio test" performing KNN-matching with K=2 for feature matching and the RANSAC method when calling findHomography.

I don't ask for any sample Code or working solution, I just wondered if there is a cheap and maybe(?) easy way to improve the accuracy.

Might be looking for too much perfection, but I'd be glad if someone had a clever idea for that :P

edit retag flag offensive close merge delete

Comments

The problem is don't come too closely to webcam, otherwise you will get trapeze triangle. I used same code.

supra56 gravatar imagesupra56 ( 2017-11-28 11:34:26 -0500 )edit

Yes, I noticed that beeing too close to the cam increases the effect of the trapeze shape. However, moving more far away from the camera, the 'trapeze effect' still does appear sometimes, not as much as beeing close to the camera but it does.

User007 gravatar imageUser007 ( 2017-11-29 01:29:43 -0500 )edit

I understood. for moving more far away from the camera. Your webcam doesn't have auto-zoom. It is not practical for moving more far away from the camera, because of poor lighting.

supra56 gravatar imagesupra56 ( 2017-11-29 05:47:22 -0500 )edit