Skip to content

OpenVINO face detection as part of realsense-viewer - #6026

Merged
dorodnic merged 3 commits into
realsenseai:developmentfrom
maloel:openvino
Mar 18, 2020
Merged

OpenVINO face detection as part of realsense-viewer#6026
dorodnic merged 3 commits into
realsenseai:developmentfrom
maloel:openvino

Conversation

@maloel

@maloel maloel commented Mar 11, 2020

Copy link
Copy Markdown
Contributor

Tracked on: DSO-13910

Comment thread common/model-views.cpp Outdated
Comment thread common/post-processing-worker-filter.h Outdated
Comment thread common/viewer.cpp Outdated

auto get_color = [&]( object_in_frame const & object ) -> ImColor
{
ColorIdx & color = id2color[object.id];

Copy link
Copy Markdown
Contributor

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()]; ?

Copy link
Copy Markdown
Contributor Author

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.

Comment thread common/viewer.cpp Outdated
if( color < int( colors.size() ) )
{
if( color > 0 )
return colors[color].first;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Copy link
Copy Markdown
Contributor Author

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!

@dorodnic
dorodnic merged commit 5e62d3f into realsenseai:development Mar 18, 2020
@maloel
maloel deleted the openvino branch March 25, 2021 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants