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
2255fa89
Commit
2255fa89
authored
Sep 06, 2014
by
Davis King
Browse files
Added an overload of get_face_chip_details() that works on arrays of
detections.
parent
1f841286
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
0 deletions
+34
-0
dlib/image_transforms/interpolation.h
dlib/image_transforms/interpolation.h
+15
-0
dlib/image_transforms/interpolation_abstract.h
dlib/image_transforms/interpolation_abstract.h
+19
-0
No files found.
dlib/image_transforms/interpolation.h
View file @
2255fa89
...
@@ -1668,6 +1668,21 @@ namespace dlib
...
@@ -1668,6 +1668,21 @@ namespace dlib
return
chip_details
(
from_points
,
to_points
,
chip_dims
(
size
,
size
));
return
chip_details
(
from_points
,
to_points
,
chip_dims
(
size
,
size
));
}
}
// ----------------------------------------------------------------------------------------
inline
std
::
vector
<
chip_details
>
get_face_chip_details
(
const
std
::
vector
<
full_object_detection
>&
dets
,
const
unsigned
long
size
=
100
,
const
double
padding
=
0.2
)
{
std
::
vector
<
chip_details
>
res
;
res
.
reserve
(
dets
.
size
());
for
(
unsigned
long
i
=
0
;
i
<
dets
.
size
();
++
i
)
res
.
push_back
(
get_face_chip_details
(
dets
[
i
],
size
,
padding
));
return
res
;
}
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
}
}
...
...
dlib/image_transforms/interpolation_abstract.h
View file @
2255fa89
...
@@ -1120,6 +1120,25 @@ namespace dlib
...
@@ -1120,6 +1120,25 @@ namespace dlib
would tripple it, and so forth.
would tripple it, and so forth.
!*/
!*/
// ----------------------------------------------------------------------------------------
std
::
vector
<
chip_details
>
get_face_chip_details
(
const
std
::
vector
<
full_object_detection
>&
dets
,
const
unsigned
long
size
=
100
,
const
double
padding
=
0.2
);
/*!
requires
- for all valid i:
- det[i].num_parts() == 68
- size > 0
- padding >= 0
ensures
- This function is identical to the version of get_face_chip_details() defined
above except that it creates and returns an array of chip_details objects,
one for each input full_object_detection.
!*/
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
...
...
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