MATLAB Answers

How can I improve the accuracy of identifying local maxima

18 views (last 30 days)
Jeremy Zhu
Jeremy Zhu on 10 Jul 2020
Edited: Image Analyst on 11 Jul 2020
Hello all,
I used imregionalmax() to identify the position of the nucleus in the embryo image, but the result of the recognition ignores some cells at the edge of the embryo, how can I improve its accuracy?
What confuses me is that after Gaussian noise reduction, using imregionalmax() can not identify the local maximum of the image.
The following image is a comparison.
raw image
raw image
raw image after imregionalmax()
Gaussian noise reduction image
Gaussian after imregionalmax()
Thanks in advance!

  2 Comments

Matt J
Matt J on 11 Jul 2020
What confuses me is that after Gaussian noise reduction, using imregionalmax() can not identify the local maximum of the image.
My guess is that you are displaying the image over a gray level range that hides the regional maxima. The output of imregionalmax that I see is far from blank (see below). It is not useful, however, because unless you get rid of absolutely all noise, every single noise spike will show up as a regional max.
Jeremy Zhu
Jeremy Zhu on 11 Jul 2020
So is there any methods to get rid of absolutely all noise?

Sign in to comment.

Answers (2)

Matt J
Matt J on 11 Jul 2020
Edited: Matt J on 11 Jul 2020
I don't think you have any hope of perfect recognition, but this result looks better to my non-clinical eye.
A=rgb2gray(imread('raw image.png'));
B=medfilt2(A,[5,5]);
NucleiiBW=bwareafilt(B-medfilt2(B,[20,20])>40,[20,inf]);
imshow(NucleiiBW)

  3 Comments

Jeremy Zhu
Jeremy Zhu on 11 Jul 2020
Thank you very much for your guidance!
In fact, what I post is not the original image, but the image I obtained from the screenshot. Because the original image of the Zeiss microscope is too large (80mb), resulting in too much detail in the image, I can not recognize such a good result.
Take the liberty to ask, can you leave your email so I can send you the original picture?
Matt J
Matt J on 11 Jul 2020
Even if I were open to that, I doubt my Inbox could handle an 80 MB attachment. I don't see what there is to gain by processing the original picture. You should resize it.

Sign in to comment.


Image Analyst
Image Analyst on 11 Jul 2020
Edited: Image Analyst on 11 Jul 2020
imregionalmax() only identifies the local max -- it will not get the whole spot. Within the whole spot, there may be only 1 or 2 pixels that are actually the max.
I think you were actually meaning to run a top hat filter on it using imtophat(), so give that a try with different window sizes. A top hat filter is a morphological closing operation (a local max but not THE local max like imregionalmax) minus the original image. So it basically finds bright spots on a background which may be varying in intensity.
The image looks fairly flat to begin with so you can use some kind of noise reduction, like imgaussfilt() like you did or medfilt2() like Matt did, and then just threshold and so some size filtering with bwareafilt() or bwareaopen() if you still have some noise left.

  0 Comments

Sign in to comment.