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

How to add a mask to the image #97

Open
MrTHMX opened this issue Dec 10, 2023 · 1 comment
Open

How to add a mask to the image #97

MrTHMX opened this issue Dec 10, 2023 · 1 comment

Comments

@MrTHMX
Copy link

MrTHMX commented Dec 10, 2023

Hi! Thanks for your great work!
I have some questions about how to add a mask on the image so that only feature points are extracted in a specified area.

@Phil26AT
Copy link
Collaborator

Hi @MrTHMX, thank you for opening this issue and sorry for the late reply. The simplest approach would be to extract keypoints in each image, then interpolate the mask and remove the points which are not in the specified area. Then, run LightGlue on these filtered points. Another (more complex) approach is to mask the score map of the respective detector (e.g. multiply your mask with the score map from SP). The benefit is that you would get more points in the specified area, and thus more matches. This would not work for SIFT, however.

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