- Compute the H-maxima transform matrix, say “J” from the image matrix I based on the input argument “H”.
- Compute the binary image matrix “BW” that identifies the regional maxima from the H-maxima-transform matrix “J”.
Need help understanding imextendedmax
10 ビュー (過去 30 日間)
古いコメントを表示
Hello,
Im using this function to identify the peaks/maximum centroids in a 2d matrix normalized between 0 and 1.
I need help understanding how to properly select the second input, called h-max in the documentation.
Say there are three peaks, or areas of interest in my matrix, each with its own maximum. Sometimes, the difference in values between peaks are large, for example, 0.4 between the largest and the smallest. I thought I would capture the areas of interest if I then allow h-max to be a little less than 0.6. However, it only captures the three areas if it is much lower, say 0.2.
Can anyone explain how this works? And if you have some suggestions as to how to choose h-max?
Any help is appreciated.
link to function: https://se.mathworks.com/help/images/ref/imextendedmax.html#buo1zpa-1-H
Kind regards
Knut
0 件のコメント
回答 (1 件)
Sumukh
2024 年 9 月 19 日
Hi Knut,
The “imextended(I, H)” command performs two operations on the image matrix “I”:
The input argument “H” is a parameter used for the H-maxima transform. This transform suppresses any local/regional maxima within the regions of the image matrix “I” that are less than a certain height “H” above their immediate surroundings. The unit of scalar “H” depends on the values in the image matrix “I” and must be chosen based on what height values will be regarded as significant for the H-maxima transformation.
To get an idea as to how to choose the “H” value, the regions of interest or “peaks” in the image matrix can be first obtained using the “imregionalmax(I)” command. You can refer to the following documentation to know more about the command:
The command returns a binary matrix “BW”, which can then be applied as a mask to the image matrix “I” to identify the regions of maxima using logical indexing. The value of “H” can be chosen based on the value of the regional maxima.
You can refer to the following MATLAB Blog that explains more about “H” in H-maxima transform and how it is chosen based on the value of the regional maxima:
Additionally, you can refer to the following MATLAB blog to understand more about identifying peaks and centroids in images using h-maxima transform:
https://blogs.mathworks.com/steve/2021/10/04/peaks-peak-filtering-and-gray-scale-weighted-centroids/
I hope this answers your query.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!