Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
c255e73b
Commit
c255e73b
authored
Jun 16, 2018
by
Davis King
Browse files
Made it so you can display arbitrary full_object_detection objects on the
image_window in Python.
parent
8993a0d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
tools/python/src/gui.cpp
tools/python/src/gui.cpp
+13
-2
No files found.
tools/python/src/gui.cpp
View file @
c255e73b
...
...
@@ -67,7 +67,18 @@ void add_overlay_parts (
const
rgb_pixel
&
color
)
{
win
.
add_overlay
(
render_face_detections
(
detection
,
color
));
if
(
detection
.
num_parts
()
==
5
||
detection
.
num_parts
()
==
68
)
{
win
.
add_overlay
(
render_face_detections
(
detection
,
color
));
}
else
{
std
::
vector
<
image_display
::
overlay_circle
>
tmp
;
for
(
unsigned
long
i
=
0
;
i
<
detection
.
num_parts
();
++
i
)
tmp
.
emplace_back
(
detection
.
part
(
i
),
0.5
,
color
,
std
::
to_string
(
i
));
win
.
add_overlay
(
tmp
);
win
.
add_overlay
(
detection
.
get_rect
());
}
}
void
add_overlay_line
(
...
...
@@ -87,7 +98,7 @@ void add_overlay_circle (
const
rgb_pixel
&
color
)
{
win
.
add_overlay
(
image_window
::
overlay_circle
(
c
,
std
::
round
(
radius
)
,
color
));
win
.
add_overlay
(
image_window
::
overlay_circle
(
c
,
radius
,
color
));
}
template
<
typename
T
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment