Commit 4c0fea7ecf1ff134a315bd09294bc7f70db3c862

Authored by jklontz
2 parents 2a3fcf3d 4d42bac2

Merge pull request #69 from biometrics/PittPatt

allow single template comparisons in PP5
Showing 1 changed file with 8 additions and 4 deletions
openbr/plugins/pp5.cpp
@@ -305,10 +305,14 @@ class PP5CompareDistance : public Distance @@ -305,10 +305,14 @@ class PP5CompareDistance : public Distance
305 305
306 float compare(const Template &target, const Template &query) const 306 float compare(const Template &target, const Template &query) const
307 { 307 {
308 - (void) target;  
309 - (void) query;  
310 - qFatal("Compare single templates should never be called!");  
311 - return 0; 308 + TemplateList targetList;
  309 + targetList.append(target);
  310 + TemplateList queryList;
  311 + queryList.append(query);
  312 + MatrixOutput *score = MatrixOutput::make(targetList.files(), queryList.files());
  313 + compare(targetList, queryList, score);
  314 + return score->data.at<float>(0);
  315 +
312 } 316 }
313 317
314 void compare(const TemplateList &target, const TemplateList &query, Output *output) const 318 void compare(const TemplateList &target, const TemplateList &query, Output *output) const