Commit 2255fa89 authored by Davis King's avatar Davis King

Added an overload of get_face_chip_details() that works on arrays of

detections.
parent 1f841286
...@@ -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;
}
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
} }
......
...@@ -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.
!*/
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment