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
23343f3d
Commit
23343f3d
authored
May 20, 2015
by
Patrick Snape
Browse files
Add overlay overload for drectangle
This is useful for visualizing the tracking results.
parent
60475dda
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
tools/python/src/gui.cpp
tools/python/src/gui.cpp
+12
-0
No files found.
tools/python/src/gui.cpp
View file @
23343f3d
...
...
@@ -54,6 +54,16 @@ void add_overlay_rect (
win
.
add_overlay
(
rect
,
color
);
}
void
add_overlay_drect
(
image_window
&
win
,
const
drectangle
&
drect
,
const
rgb_pixel
&
color
)
{
rectangle
rect
(
drect
.
left
(),
drect
.
top
(),
drect
.
right
(),
drect
.
bottom
());
win
.
add_overlay
(
rect
,
color
);
}
void
add_overlay_parts
(
image_window
&
win
,
const
full_object_detection
&
detection
,
...
...
@@ -106,6 +116,8 @@ void bind_gui()
"Add a list of rectangles to the image_window. They will be displayed as red boxes by default, but the color can be passed."
)
.
def
(
"add_overlay"
,
add_overlay_rect
,
(
arg
(
"rectangle"
),
arg
(
"color"
)
=
rgb_pixel
(
255
,
0
,
0
)),
"Add a rectangle to the image_window. It will be displayed as a red box by default, but the color can be passed."
)
.
def
(
"add_overlay"
,
add_overlay_drect
,
(
arg
(
"rectangle"
),
arg
(
"color"
)
=
rgb_pixel
(
255
,
0
,
0
)),
"Add a rectangle to the image_window. It will be displayed as a red box by default, but the color can be passed."
)
.
def
(
"add_overlay"
,
add_overlay_parts
,
(
arg
(
"detection"
),
arg
(
"color"
)
=
rgb_pixel
(
0
,
0
,
255
)),
"Add full_object_detection parts to the image window. They will be displayed as blue lines by default, but the color can be passed."
)
.
def
(
"wait_until_closed"
,
&
type
::
wait_until_closed
,
...
...
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