Fix blob detector insertion sort

pull/14954/head
Rafa Gomez-Jordana 5 years ago
parent 3b8701e97e
commit 9a24886282
  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