From a9b62f7a1bc5fe5d9daf109680665e5ff4357f14 Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Wed, 7 May 2014 11:56:18 -0400 Subject: [PATCH] PP5 now supports mult-signature templates --- openbr/plugins/pp5.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/openbr/plugins/pp5.cpp b/openbr/plugins/pp5.cpp index a247d65..1cbe76e 100644 --- a/openbr/plugins/pp5.cpp +++ b/openbr/plugins/pp5.cpp @@ -368,14 +368,16 @@ class PP5CompareDistance : public Distance { int subject_id = 0, face_id = 0; foreach (const Template &src, templates) { - if (src.m().data) { - ppr_face_type face; - createFace(src, &face); - TRY(ppr_add_face(context, gallery, face, subject_id, face_id)) + if (!src.empty() && src.m().data) { + foreach (const cv::Mat &m, src) { + ppr_face_type face; + createFace(m, &face); + TRY(ppr_add_face(context, gallery, face, subject_id, face_id)) + face_id++; + ppr_free_face(face); + } subject_ids.append(subject_id); subject_id++; - face_id++; - ppr_free_face(face); } else { subject_ids.append(-1); } -- libgit2 0.21.4