-
Notifications
You must be signed in to change notification settings - Fork 507
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
Add an optional image mask for feature detections #206
base: master
Are you sure you want to change the base?
Conversation
This should also be passed through to the FAST extractor call so that it doesn't detect points on masked regions in the first place. |
@mhkabir this is pruning the output of the fast feature detector to discard all features that are in the masked regions. Masking the image before putting it through the feature detector would result in features on the mask boundaries, which we don't want. |
I wasn't suggesting masking the image manually before passing it. What I meant was, you should pass the mask Mat through to the FAST detector call (https://github.com/ethz-asl/rovio/blob/master/include/rovio/ImagePyramid.hpp#L142). There is already an API: This does not cause detections on the edges. |
@mhkabir Ah cool thanks a lot! Ok will see if it's faster to just switch to that. |
We added masking to the maplab_rovio version, based on this PR. However we refactored and extended it a bit, when we discovered some issues with this masking, as tracked features were still entering masked areas and then stayed for several frames (+ we added the keypoint masking suggested by @mhkabir ). Any feedback would be welcome :) |
In case you forget to mount your camera so that it doesn't look at your propellers or your frame. ;)
Simply prunes new feature detections before selecting best features to track based on whether their coordinates fall into the mask or not.
Before:
After:
Mask applied: (black = filter, white = don't filter)
Controlled by an optional ros param called "image_mask_path". If set to a path (here a png image), will automatically filter. Otherwise won't do anything.