Minor change of SimpleBlobDetector
authorIlya Lysenkov <no@email>
Thu, 9 Jun 2011 12:49:23 +0000 (12:49 +0000)
committerIlya Lysenkov <no@email>
Thu, 9 Jun 2011 12:49:23 +0000 (12:49 +0000)
modules/features2d/src/blobdetector.cpp

index fce0a2b..8a55449 100644 (file)
@@ -231,7 +231,7 @@ void SimpleBlobDetector::detectImpl(const cv::Mat& image, std::vector<cv::KeyPoi
       bool isNew = true;
       for (size_t j = 0; j < centers.size(); j++)
       {
-        double dist = norm(centers[j][0].location - curCenters[i].location);
+        double dist = norm(centers[j][ centers[j].size() / 2 ].location - curCenters[i].location);
         isNew = dist >= params.minDistBetweenBlobs && dist >= centers[j][ centers[j].size() / 2 ].radius && dist >= curCenters[i].radius;
         if (!isNew)
         {