From 4d42bac215b24d776f8ed307cf89f2c47857e1f6 Mon Sep 17 00:00:00 2001 From: Jordan Date: Tue, 16 Jul 2013 16:12:53 -0400 Subject: [PATCH] allow single template comparisons in PP5 --- openbr/plugins/pp5.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/openbr/plugins/pp5.cpp b/openbr/plugins/pp5.cpp index e79ee92..658a0d8 100644 --- a/openbr/plugins/pp5.cpp +++ b/openbr/plugins/pp5.cpp @@ -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(0); + } void compare(const TemplateList &target, const TemplateList &query, Output *output) const -- libgit2 0.21.4