Is there a method to use ‘findpeaks’ to detect bright spots in an otherwise darkimage?
22 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
ヨナ エマヤ
am 14 Jun. 2021
Beantwortet: Image Analyst
am 15 Jun. 2021
I am currently having the problem that if I run findpeaks along the columns of said image, the same spot is being detected multiple times, as it appears as peak in every column.
I am aware that there are ad-on options for 2D peak detection, but I was hoping for a solution using findpeaks.
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 14 Jun. 2021
Bearbeitet: Walter Roberson
am 15 Jun. 2021
you can post process the findpeaks output but it really does not seem to be worth the effort.
islocalmax(img,1) & islocalmax(img,2)
will find 2d peaks.
You might need to do some processing for the case where a peak is the same height for several adjacent spots. You could do a imclose or dilation, and perhaps a bwmorph()
Or you could start with a dilation and then check for local max and then a bwmorph shrink... something like that.
Weitere Antworten (1)
Image Analyst
am 15 Jun. 2021
Show/attach/post your original gray scale image. My guess is that you can threshold to find the bright blobs, then find the centroid and/or weighted centroid with regionprops(). You can also get the mean intensity and the max intensity for each spot using regionprops.. You would not use findpeaks which is used for 1-D signals. Also, using imregionalmax() might not be what you want since this might pinpoint several small regional maxes inside a large spot when you want only one - the weighted centroid. I can give better advice if you attach the actual gray level image you forgot to attach.
See my Image Segmentation Tutorial for a general tutorial about finding bright blobs on dark backgrounds.
0 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!