Does findBlobs only use edge points?

asked 2017-04-11 13:01:39 -0500

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.

edit retag flag offensive close merge delete

Comments

" If the pixels inside the contour points are considered, the average can be very significantly different than if only contour pixels are considered." -- why would that be ? proof ?

berak gravatar imageberak ( 2017-04-12 01:24:51 -0500 )edit