How to find the boundaries of the local maxima
4 ビュー (過去 30 日間)
古いコメントを表示
I have a 2D image (matrix). I have found the local maxima of this image. Now I want to define the boundaries around each local maxima in such a way that I want all the pixels around the local maxima that has the value above 85% of the maximum. Any help would be appreciated.
0 件のコメント
回答 (2 件)
Image Analyst
2018 年 2 月 26 日
I think you're going to have to use imreconstruct(). Use the maxima binary image as the marker for a mask that is thresholded at 85% of it. If you don't use imreconstruct then you risk getting values selected by the threshold that aren't local maxima. Attach your original image, and local max image if you need more help. How did you get the local maxima? Did you use imregionalmax() or imdilate()?
MINA
2018 年 2 月 26 日
編集済み: MINA
2018 年 2 月 26 日
1 件のコメント
Image Analyst
2018 年 2 月 27 日
You want a boundary around a single pixel? OK, so I'm guessing that the 5 red x's are the local maxima pixels. So you have up to 5 maxima values. When you say 85% of the maxima, which of the 5 maxima are you talking about?
And why didn't you simply use imregionalmax() instead of all that?
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!