-
Notifications
You must be signed in to change notification settings - Fork 5k
OpenVINO face detection as part of realsense-viewer #6026
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
Conversation
common/viewer.cpp
Outdated
|
|
||
| auto get_color = [&]( object_in_frame const & object ) -> ImColor | ||
| { | ||
| ColorIdx & color = id2color[object.id]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
id2color[object.id % colors.size()]; ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea here is that the object ID would be mapped to a color index. You don't normally want two IDs mapping to the same color, and I assumed we know nothing about the nature of the ID.
common/viewer.cpp
Outdated
| if( color < int( colors.size() ) ) | ||
| { | ||
| if( color > 0 ) | ||
| return colors[color].first; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have a color for the ID?
yes -> return it
find next available color; found it?
yes -> mark it as used; return it
no -> we have more objects than colors; use the the default!
Tracked on: DSO-13910