Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
5ed1c2f2
Commit
5ed1c2f2
authored
Jun 11, 2018
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made it so you can construct dlib.image_windows from detectors.
parent
653d0483
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
gui.cpp
tools/python/src/gui.cpp
+34
-0
No files found.
tools/python/src/gui.cpp
View file @
5ed1c2f2
...
...
@@ -107,6 +107,36 @@ std::shared_ptr<image_window> make_image_window_from_image_and_title(const numpy
return
win
;
}
std
::
shared_ptr
<
image_window
>
make_image_window_from_detector
(
const
simple_object_detector
&
detector
)
{
auto
win
=
std
::
make_shared
<
image_window
>
();
win
->
set_image
(
draw_fhog
(
detector
));
return
win
;
}
std
::
shared_ptr
<
image_window
>
make_image_window_from_detector_py
(
const
simple_object_detector_py
&
detector
)
{
auto
win
=
std
::
make_shared
<
image_window
>
();
win
->
set_image
(
draw_fhog
(
detector
.
detector
));
return
win
;
}
std
::
shared_ptr
<
image_window
>
make_image_window_from_detector_and_title
(
const
simple_object_detector
&
detector
,
const
string
&
title
)
{
auto
win
=
std
::
make_shared
<
image_window
>
();
win
->
set_image
(
draw_fhog
(
detector
));
win
->
set_title
(
title
);
return
win
;
}
std
::
shared_ptr
<
image_window
>
make_image_window_from_detector_py_and_title
(
const
simple_object_detector_py
&
detector
,
const
string
&
title
)
{
auto
win
=
std
::
make_shared
<
image_window
>
();
win
->
set_image
(
draw_fhog
(
detector
.
detector
));
win
->
set_title
(
title
);
return
win
;
}
// ----------------------------------------------------------------------------------------
void
bind_gui
(
py
::
module
&
m
)
...
...
@@ -122,6 +152,10 @@ void bind_gui(py::module& m)
py
::
class_
<
type
,
std
::
shared_ptr
<
type
>>
(
m
,
"image_window"
,
"This is a GUI window capable of showing images on the screen."
)
.
def
(
py
::
init
())
.
def
(
py
::
init
(
&
make_image_window_from_detector
))
.
def
(
py
::
init
(
&
make_image_window_from_detector_py
))
.
def
(
py
::
init
(
&
make_image_window_from_detector_and_title
))
.
def
(
py
::
init
(
&
make_image_window_from_detector_py_and_title
))
.
def
(
py
::
init
(
&
make_image_window_from_image
<
uint8_t
>
))
.
def
(
py
::
init
(
&
make_image_window_from_image
<
uint16_t
>
))
.
def
(
py
::
init
(
&
make_image_window_from_image
<
uint32_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