What is the use of the minRepeatability parameter for SimpleBlobDetector in OpenCV?

OpenCV has a minRepeatability parameter in minRepeatability . What is the use of this parameter. How will this affect blob detection if I change it from 1 to, say, 20?

+5
source share
1 answer

The corresponding code is in blobdetector.cpp .

minRepeatability function (the only one using minRepeatability ):

  • finds blob centers with different thresholds (from minThreshold to maxThreshold with thresholdStep ) in the grayscale image
  • if the same blob center is located at different threshold values ​​(within minDistBetweenBlobs ), then it (basically) increments the counter for this blob.
  • if the counter for each blob is> = minRepeatability , then it is a stable blob and creates a KeyPoint , otherwise the blob is discarded.

So, minRepeatability is how blob is stable at different thresholds in grayscale images.

The default values ​​are:

 thresholdStep = 10; minThreshold = 50; maxThreshold = 220; minRepeatability = 2; minDistBetweenBlobs = 10; 

The maximum allowable value for minRepeatability follows: (maxThreshold - minThreshold) / thresholdStep , or each blob will be dropped. The minimum allowed value is 1, which means that all drops will be saved and provided by KeyPoint .

+6
source

Source: https://habr.com/ru/post/1233063/


All Articles