diff --git a/modules/calib3d/src/circlesgrid.cpp b/modules/calib3d/src/circlesgrid.cpp index be283ca09..3f4c3ceb4 100644 --- a/modules/calib3d/src/circlesgrid.cpp +++ b/modules/calib3d/src/circlesgrid.cpp @@ -62,7 +62,7 @@ void CirclesGridClusterFinder::hierarchicalClustering(const vector poin dists.at(i, j) = (float)norm(points[i] - points[j]); distsMask.at(i, j) = 255; //TODO: use symmetry - distsMask.at(j, i) = distsMask.at(i, j); + distsMask.at(j, i) = 255;//distsMask.at(i, j); dists.at(j, i) = dists.at(i, j); } } @@ -74,7 +74,7 @@ void CirclesGridClusterFinder::hierarchicalClustering(const vector poin } int patternClusterIdx = 0; - while(clusters[patternClusterIdx].size() < static_cast(patternSize.area()) && countNonZero(distsMask == 255) > 0) + while(clusters[patternClusterIdx].size() < static_cast(patternSize.area()) && countNonZero(distsMask) > 0) { Point minLoc; minMaxLoc(dists, 0, 0, &minLoc, 0, distsMask);