Commit 1e4939362622dd08b3d9309ad284156ac2c8e308

Authored by Charles Otto
1 parent 261d6a83

Update cluster.cpp to reflect current magic numbers

Showing 1 changed file with 4 additions and 3 deletions
openbr/core/cluster.cpp
@@ -117,8 +117,9 @@ Neighborhood getNeighborhood(const QStringList &simmats) @@ -117,8 +117,9 @@ Neighborhood getNeighborhood(const QStringList &simmats)
117 float val = m.at<float>(k,l); 117 float val = m.at<float>(k,l);
118 if ((i==j) && (k==l)) continue; // Skips self-similarity scores 118 if ((i==j) && (k==l)) continue; // Skips self-similarity scores
119 119
120 - if ((val != -std::numeric_limits<float>::infinity()) &&  
121 - (val != std::numeric_limits<float>::infinity())) { 120 + if (val != -std::numeric_limits<float>::max()
  121 + && val != -std::numeric_limits<float>::infinity()
  122 + && val != std::numeric_limits<float>::infinity()) {
122 globalMax = std::max(globalMax, val); 123 globalMax = std::max(globalMax, val);
123 globalMin = std::min(globalMin, val); 124 globalMin = std::min(globalMin, val);
124 } 125 }
@@ -159,7 +160,7 @@ Neighborhood getNeighborhood(const QStringList &amp;simmats) @@ -159,7 +160,7 @@ Neighborhood getNeighborhood(const QStringList &amp;simmats)
159 // Zhu et al. "A Rank-Order Distance based Clustering Algorithm for Face Tagging", CVPR 2011 160 // Zhu et al. "A Rank-Order Distance based Clustering Algorithm for Face Tagging", CVPR 2011
160 br::Clusters br::ClusterGallery(const QStringList &simmats, float aggressiveness, const QString &csv) 161 br::Clusters br::ClusterGallery(const QStringList &simmats, float aggressiveness, const QString &csv)
161 { 162 {
162 - qDebug("Clustering %d simmat(s)", simmats.size()); 163 + qDebug("Clustering %d simmat(s), aggressiveness %f", simmats.size(), aggressiveness);
163 164
164 // Read in gallery parts, keeping top neighbors of each template 165 // Read in gallery parts, keeping top neighbors of each template
165 Neighborhood neighborhood = getNeighborhood(simmats); 166 Neighborhood neighborhood = getNeighborhood(simmats);