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
ecde075d
Commit
ecde075d
authored
May 21, 2018
by
Davis King
Browse files
Added an image_window::add_overlay() overload for line object.
parent
08e06b12
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
dlib/gui_widgets/widgets.h
dlib/gui_widgets/widgets.h
+12
-0
dlib/gui_widgets/widgets_abstract.h
dlib/gui_widgets/widgets_abstract.h
+11
-0
No files found.
dlib/gui_widgets/widgets.h
View file @
ecde075d
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
#include "../misc_api.h"
#include "../misc_api.h"
#include "../any.h"
#include "../any.h"
#include "../image_processing/full_object_detection.h"
#include "../image_processing/full_object_detection.h"
#include "../geometry/line.h"
#ifdef _MSC_VER
#ifdef _MSC_VER
// This #pragma directive is also located in the algs.h file but for whatever
// This #pragma directive is also located in the algs.h file but for whatever
...
@@ -4053,6 +4054,17 @@ namespace dlib
...
@@ -4053,6 +4054,17 @@ namespace dlib
const
overlay_line
&
overlay
const
overlay_line
&
overlay
);
);
template
<
typename
pixel_type
>
void
add_overlay
(
const
line
&
l
,
pixel_type
p
)
{
add_overlay
(
image_display
::
overlay_line
(
l
.
p1
(),
l
.
p2
(),
p
));
}
void
add_overlay
(
const
line
&
l
)
{
add_overlay
(
l
,
rgb_pixel
(
255
,
0
,
0
));
}
void
add_overlay
(
void
add_overlay
(
const
overlay_circle
&
overlay
const
overlay_circle
&
overlay
);
);
...
...
dlib/gui_widgets/widgets_abstract.h
View file @
ecde075d
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
#include "../interfaces/enumerable.h"
#include "../interfaces/enumerable.h"
#include "style_abstract.h"
#include "style_abstract.h"
#include "../image_processing/full_object_detection_abstract.h"
#include "../image_processing/full_object_detection_abstract.h"
#include "../geometry/line_abstract.h"
namespace
dlib
namespace
dlib
{
{
...
@@ -3019,6 +3020,16 @@ namespace dlib
...
@@ -3019,6 +3020,16 @@ namespace dlib
that it will be displayed.
that it will be displayed.
!*/
!*/
template
<
typename
pixel_type
>
void
add_overlay
(
const
line
&
l
,
pixel_type
p
);
/*!
ensures
- performs: add_overlay(overlay_line(l.p1(),l.p2(),p));
!*/
void
add_overlay
(
void
add_overlay
(
const
overlay_circle
&
overlay
const
overlay_circle
&
overlay
);
);
...
...
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