Commit 91680703f943363d9f265c133c7392700c2ab067

Authored by Scott Klum
1 parent 2d62c94d

Returning -max if templates have different number of matrices in fusedistance

openbr/plugins/distance/fuse.cpp
... ... @@ -70,7 +70,9 @@ private:
70 70  
71 71 float compare(const Template &a, const Template &b) const
72 72 {
73   - if (a.size() != b.size()) qFatal("Comparison size mismatch");
  73 + if (a.size() != distances.size() ||
  74 + b.size() != distances.size())
  75 + return -std::numeric_limits<float>::max();
74 76  
75 77 QList<float> scores;
76 78 for (int i=0; i<distances.size(); i++) {
... ...