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
bd405634
Commit
bd405634
authored
Sep 06, 2014
by
Davis King
Browse files
Added code to show how to chip out the faces.
parent
2255fa89
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
examples/face_landmark_detection_ex.cpp
examples/face_landmark_detection_ex.cpp
+7
-1
No files found.
examples/face_landmark_detection_ex.cpp
View file @
bd405634
...
...
@@ -78,7 +78,7 @@ int main(int argc, char** argv)
deserialize
(
argv
[
1
])
>>
sp
;
image_window
win
;
image_window
win
,
win_faces
;
// Loop over all the images provided on the command line.
for
(
int
i
=
2
;
i
<
argc
;
++
i
)
{
...
...
@@ -113,6 +113,12 @@ int main(int argc, char** argv)
win
.
set_image
(
img
);
win
.
add_overlay
(
render_face_detections
(
shapes
));
// We can also extract copies of each face that are cropped, rotated upright,
// and scaled to a standard size as shown here:
dlib
::
array
<
array2d
<
rgb_pixel
>
>
face_chips
;
extract_image_chips
(
img
,
get_face_chip_details
(
shapes
),
face_chips
);
win_faces
.
set_image
(
tile_images
(
face_chips
));
cout
<<
"Hit enter to process the next image..."
<<
endl
;
cin
.
get
();
}
...
...
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