Minor change of SimpleBlobDetector

This commit is contained in:
Ilya Lysenkov 2011-06-09 12:49:23 +00:00
parent 9484355137
commit 2beae4d30b

View File

@ -231,7 +231,7 @@ void SimpleBlobDetector::detectImpl(const cv::Mat& image, std::vector<cv::KeyPoi
bool isNew = true; bool isNew = true;
for (size_t j = 0; j < centers.size(); j++) 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; isNew = dist >= params.minDistBetweenBlobs && dist >= centers[j][ centers[j].size() / 2 ].radius && dist >= curCenters[i].radius;
if (!isNew) if (!isNew)
{ {