Skip to content

Commit

Permalink
Merge pull request #69 from biometrics/PittPatt
Browse files Browse the repository at this point in the history
allow single template comparisons in PP5
  • Loading branch information
jklontz committed Jul 16, 2013
2 parents 2a3fcf3 + 4d42bac commit 4c0fea7
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions openbr/plugins/pp5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,14 @@ class PP5CompareDistance : public Distance

float compare(const Template &target, const Template &query) const
{
(void) target;
(void) query;
qFatal("Compare single templates should never be called!");
return 0;
TemplateList targetList;
targetList.append(target);
TemplateList queryList;
queryList.append(query);
MatrixOutput *score = MatrixOutput::make(targetList.files(), queryList.files());
compare(targetList, queryList, score);
return score->data.at<float>(0);

}

void compare(const TemplateList &target, const TemplateList &query, Output *output) const
Expand Down

0 comments on commit 4c0fea7

Please sign in to comment.