Merge pull request #14954 from rafagjordana:fix_blob_detection_insertion_sort

pull/14966/head^2
Alexander Alekhin 5 years ago
commit 2370079220
  1. 2
      modules/features2d/src/blobdetector.cpp

@ -338,7 +338,7 @@ void SimpleBlobDetectorImpl::detect(InputArray image, std::vector<cv::KeyPoint>&
centers[j].push_back(curCenters[i]);
size_t k = centers[j].size() - 1;
while( k > 0 && centers[j][k].radius < centers[j][k-1].radius )
while( k > 0 && curCenters[i].radius < centers[j][k-1].radius )
{
centers[j][k] = centers[j][k-1];
k--;

Loading…
Cancel
Save