Ask Your Question

How to detect blob in noisy image?

asked 2018-06-08 16:51:18 -0500

macc.n gravatar image

updated 2018-06-08 16:52:07 -0500

Hello everybody, I need help in the detection of blobs in images like these:

image description

image description

image description

The blob is exactly at the center of the image.

I don't have enough images to train a classifier, so my solution is to apply several morphological operators and then use the SimpleBlobDetector classb but it doesn't work very well. Do you have any suggestion?

Thanks for your help.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2018-06-09 02:54:50 -0500

LBerger gravatar image

Try to detect what you see : a white blob enclosed with dark zone. It is not a real time method

  1. convert to gray level (color is not helped ?)
  2. basic otsu threshold
  3. estimate mean gray level Iback of 0 pixel (0 in binary image)
  4. dilate binary image (4 iterations ?)
  5. estimate gray level I(b) of each blob but only enclosed region (dilated region)
  6. select each blob with I(b)<0.9Iback

It's only an idea.

edit flag offensive delete link more


Agreed, specially the otsu threshold and gray conversion method. Color doesn't help here, most probably. The best way would be to try and visualize several processing methods like thresholding, dilate, erosion etc. and see which gives the better result!

krshrimali gravatar imagekrshrimali ( 2018-06-09 07:08:54 -0500 )edit

Thank you for the answer. Can you please explain me better some point of your method?

  1. Do I have to compute the mean of the pixels in the original image that have a different value from 0 in the thresholded image?

  2. Do I have to compute the mean such as in the third point? How to identify the blob? Using the SimpleBlobDetector class?

macc.n gravatar imagemacc.n ( 2018-06-09 10:48:34 -0500 )edit

About mean :

threshold( cv::threshold(  img,binImg,0,255,cv::THRESH_BINARY | cv::THRESH_OTSU);
Scalar s = mean     (img,binInv);

s[0] is gray level of dark zone (all image) and I hope that level of enclosed region will be less than s[0]

LBerger gravatar imageLBerger ( 2018-06-09 11:27:08 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-06-08 16:51:18 -0500

Seen: 148 times

Last updated: Jun 09 '18