From 2ea9cff714cee7993d8f5cf629d0dbf1f9f69ed6 Mon Sep 17 00:00:00 2001 From: Scott Klum Date: Thu, 17 Apr 2014 21:12:23 -0400 Subject: [PATCH] Added dot distance --- openbr/plugins/distance.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openbr/plugins/distance.cpp b/openbr/plugins/distance.cpp index 057e218..ac8c7ee 100644 --- a/openbr/plugins/distance.cpp +++ b/openbr/plugins/distance.cpp @@ -51,7 +51,8 @@ public: INF, L1, L2, - Cosine }; + Cosine, + Dot}; private: BR_PROPERTY(Metric, metric, L2) @@ -88,6 +89,8 @@ private: break; case Cosine: return cosine(a, b); + case Dot: + return a.m().dot(b); default: qFatal("Invalid metric"); } -- libgit2 0.21.4