Ask Your Question
0

SimpleBlobDetector and filterByColor

asked 2015-05-06 02:27:13 -0500

LBerger gravatar image

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

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-05-09 07:12:27 -0500

LBerger gravatar image

My own answer is here

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-05-06 02:27:13 -0500

Seen: 1,350 times

Last updated: May 09 '15