Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

preventing poor match - questions #2

Closed
Eisenh opened this issue Apr 22, 2020 · 1 comment
Closed

preventing poor match - questions #2

Eisenh opened this issue Apr 22, 2020 · 1 comment

Comments

@Eisenh
Copy link

Eisenh commented Apr 22, 2020

Great app! I have a question around how to set params.

  1. I understand that Matcher tries to accommodate distortions, but only some distortions are realistic. If the second image is low res, or the target is small, the algorithm returns a very distorted aligned image, when a simple rotated and scaled image would be a better fit. Is there a param setting that would prevent matches from returning a distorted image? Maybe a limit on the transform matrix? Or a switch to return "0" for success when the transform is deemed unlikely (as per the verbose logging)?
@latsic
Copy link
Owner

latsic commented Apr 22, 2020

This app looks for a perspective transform with the help of https://docs.opencv.org/master/d9/d0c/group__calib3d.html#ga4abc2ece9fab9398f2e560d53c8c9780
What you have in mind is probably some affine transformation. This is not an option in this app, but could probably easily be added by using this
https://docs.opencv.org/4.0.0/d9/d0c/group__calib3d.html#gad767faff73e9cbd8b9d92b955b50062d

Otherwise you can try different settings, for example lowering the max/min match count.
MatchCounMin20Max50
defauSettings

The first Image has default settings for match counts, while the second, which produces a good match, has those settings lowered to 20/50.

@latsic latsic closed this as completed Dec 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants