mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 22:44:02 +08:00
Removed unnecessary comparison from CirclesGridClusterFinder::hierarchicalClustering
This commit is contained in:
parent
028c44531f
commit
6d56105b42
@ -62,7 +62,7 @@ void CirclesGridClusterFinder::hierarchicalClustering(const vector<Point2f> poin
|
||||
dists.at<float>(i, j) = (float)norm(points[i] - points[j]);
|
||||
distsMask.at<uchar>(i, j) = 255;
|
||||
//TODO: use symmetry
|
||||
distsMask.at<uchar>(j, i) = distsMask.at<uchar>(i, j);
|
||||
distsMask.at<uchar>(j, i) = 255;//distsMask.at<uchar>(i, j);
|
||||
dists.at<float>(j, i) = dists.at<float>(i, j);
|
||||
}
|
||||
}
|
||||
@ -74,7 +74,7 @@ void CirclesGridClusterFinder::hierarchicalClustering(const vector<Point2f> poin
|
||||
}
|
||||
|
||||
int patternClusterIdx = 0;
|
||||
while(clusters[patternClusterIdx].size() < static_cast<size_t>(patternSize.area()) && countNonZero(distsMask == 255) > 0)
|
||||
while(clusters[patternClusterIdx].size() < static_cast<size_t>(patternSize.area()) && countNonZero(distsMask) > 0)
|
||||
{
|
||||
Point minLoc;
|
||||
minMaxLoc(dists, 0, 0, &minLoc, 0, distsMask);
|
||||
|
Loading…
Reference in New Issue
Block a user