Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Does findBlobs only use edge points?

Hi,

I'm trying to use the SimpleBlobDetector to find the center of a region of pixels. Based on the code at github.com/opencv/opencv/blob/master/modules/features2d/src/blobdetector.cpp around line 191, it looks like the moment is only computed on the set of contour points, rather than the set of pixels "inside" the contour. Is that true?

If that is true, then is there some separate function provided by OpenCV that would use all of the pixels "inside" a set of contour points to build the moments array? I think this would be very useful since the blob center is essentially based on the average of set of the points that are considered when building the moments array. If the pixels inside the contour points are considered, the average can be very significantly different than if only contour pixels are considered.