diff --git a/openbr/core/cluster.cpp b/openbr/core/cluster.cpp index b564faa..9e87b44 100644 --- a/openbr/core/cluster.cpp +++ b/openbr/core/cluster.cpp @@ -117,8 +117,9 @@ Neighborhood getNeighborhood(const QStringList &simmats) float val = m.at(k,l); if ((i==j) && (k==l)) continue; // Skips self-similarity scores - if ((val != -std::numeric_limits::infinity()) && - (val != std::numeric_limits::infinity())) { + if (val != -std::numeric_limits::max() + && val != -std::numeric_limits::infinity() + && val != std::numeric_limits::infinity()) { globalMax = std::max(globalMax, val); globalMin = std::min(globalMin, val); } @@ -159,7 +160,7 @@ Neighborhood getNeighborhood(const QStringList &simmats) // Zhu et al. "A Rank-Order Distance based Clustering Algorithm for Face Tagging", CVPR 2011 br::Clusters br::ClusterGallery(const QStringList &simmats, float aggressiveness, const QString &csv) { - qDebug("Clustering %d simmat(s)", simmats.size()); + qDebug("Clustering %d simmat(s), aggressiveness %f", simmats.size(), aggressiveness); // Read in gallery parts, keeping top neighbors of each template Neighborhood neighborhood = getNeighborhood(simmats);