Commit 2ea9cff714cee7993d8f5cf629d0dbf1f9f69ed6

Authored by Scott Klum
1 parent 67cec741

Added dot distance

Showing 1 changed file with 4 additions and 1 deletions
openbr/plugins/distance.cpp
... ... @@ -51,7 +51,8 @@ public:
51 51 INF,
52 52 L1,
53 53 L2,
54   - Cosine };
  54 + Cosine,
  55 + Dot};
55 56  
56 57 private:
57 58 BR_PROPERTY(Metric, metric, L2)
... ... @@ -88,6 +89,8 @@ private:
88 89 break;
89 90 case Cosine:
90 91 return cosine(a, b);
  92 + case Dot:
  93 + return a.m().dot(b);
91 94 default:
92 95 qFatal("Invalid metric");
93 96 }
... ...