A function to find peaks (brightest pixels in a grayscale image) ?

Hi,
Is there any function as an alternative to FastPeakFind() to find brightest pixels in a grayscale image.
The problem of the FastPeakFind() function is that it can not find peaks correctly if they are piled. Since, FastPeakFind() function assumes that 'peaks are sparse'. So, even if we change the threshold value, this function can only detect peaks if they are separated. If there is a piled peak then this function can not show all pixels under the peak (it only shows ONE pixel for this kind of peaks. Therefore, we can not find correct number of bright pixels at a piled peak region.
Is there any alternative to this function ? I want to find number of brightest pixels and density of brightest regions in a grayscale image
Thanks

Réponses (1)

Image Analyst
Image Analyst le 11 Jan 2016
See if the function imregionalmax() will do what you want. It finds local maxima and gives you a binary image indicating their location.
BW = imregionalmax(I) returns the binary image BW that identifies the regional maxima in I. Regional maxima are connected components of pixels with a constant intensity value, and whose external boundary pixels all have a lower value. In BW, pixels that are set to 1 identify regional maxima; all other pixels are set to 0. By default, imregionalmax uses 8-connected neighborhoods for 2-D images and 26-connected neighborhoods for 3-D images. For higher dimensions, imregionalmax uses conndef(ndims(I)),'maximal').

5 commentaires

Many thanks for your response Image Analyst.
But imregionalmax() gives edges(which are not bright, they are less than about 75) as white pixels when I use my grayscale images. Bright regions that I want to extract have values more than about 190.
I have a pathological images and converted this image into grayscale form. I want to calculate density of bright regions in a cell
How can I solve this problem ?
imregionalmax() gives local maxima, which are not necessarily edges, though they may be edges for some images.
Perhaps you can just threshold
binaryImage = grayImage > 190;
imshow(binaryImage);
That gives bright regions but those bright regions might not be peaks. In fact they could be valleys, for example in [240 230 250], 230 is a valley even though it's brighter than 190 because it's located spatially between two brighter pixels (240 and 250).
Hi Image Analyst. Sorry maybe my comment has not related to this topic. I need your help please with Strehl Ratio. I have a point source image and need to find and draw the Strehl Ratio for it. I would high appreciate it if you could help me please. Very kind regards Maitham
Start a new question on this, and attach your image.
Image Analyst. Thank you very much for your answer. I have made a new question about Strehl ratio: https://www.mathworks.com/matlabcentral/answers/321398-strehl-ratio-for-a-point-source-image
Very kind regards. Maitham

Connectez-vous pour commenter.

Question posée :

le 11 Jan 2016

Commenté :

le 21 Jan 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by