SimpleBlobDetector and filterByColor
Hi,
I want to use SimpleBlobDetector but I want to know if I well understand parameter filterByColor. In source code blobdetector.cpp this parameter is used at line 276:
if (params.filterByColor)
{
if (binaryImage.at<uchar> (cvRound(center.location.y), cvRound(center.location.x)) != params.blobColor)
continue;
}
At my opinion this lines means that we are interested only by gravity center blob in binarized image which are equal to params.blobColor. I think that binarized image is initialized at line 318 :
threshold(grayscaleImage, binarizedImage, thresh, 255, THRESH_BINARY);
So value in binarized image are 0 or 255. Hence Params.blobColor should be 0 or 255 (an another value means you want nothing). So I think params.filterByColor is to detect if gravity center belong to blob or not. is it right?
Thanks for your answer