Hi Knut,
The “imextended(I, H)” command performs two operations on the image matrix “I”:
- 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”.
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.