screen detector for stationary setups #2341
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is for learning purposes only. I known it is incomplete considering some code standards, and there are margin for customization with better UI (for example, allow different minimum surface size). It examplifies how to create a new marker detector type that is used to detect a computer screen as a surface (potentially, any rigid brighter trapezoid surface in regard to the background).
The new type creates markers from trapezoid corners detected from the biggest one at the field of view.
Orientation is obtained by sorting corners with pre-defined assumptions and will always return top-to-bottom surface in regard to the world view (it is agnostic about head pose or real corner orientation). For stationary setups, it is not a problem at all.
For stationary setups, I found it to be cleaner (no visual markers at all needed) and a lot more precise and stable than fiducial markers.