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
067e36b5
Commit
067e36b5
authored
Jan 03, 2015
by
Vinh Khuc
Browse files
Added a Python example for find_candidate_object_locations
parent
bf06ce71
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
python_examples/find_candidate_object_locations.py
python_examples/find_candidate_object_locations.py
+19
-0
No files found.
python_examples/find_candidate_object_locations.py
0 → 100644
View file @
067e36b5
#!/usr/bin/python
# This example shows how to use find_candidate_object_locations()
import
dlib
from
skimage
import
io
image_file
=
'../examples/faces/2009_004587.jpg'
img
=
io
.
imread
(
image_file
)
# Locations of candidate objects will be saved into rects
rects
=
[]
dlib
.
find_candidate_object_locations
(
img
,
rects
,
min_size
=
500
)
windows
=
[]
for
d
in
rects
:
windows
.
append
([
d
.
top
(),
d
.
left
(),
d
.
bottom
(),
d
.
right
()])
print
len
(
windows
)
print
(
image_file
,
windows
)
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