find local maxima and local minima
Ältere Kommentare anzeigen
Input=my image
how to find all the points od 2D local maxima and all points of 2D local minima of input(i,j)
please help
Antworten (2)
Mohamed Nedal
am 22 Nov. 2017
0 Stimmen
For Max, you can use findpeaks() function. And for Min, it's the same function but with negative data (i.e. -x).
2 Kommentare
Image Analyst
am 22 Nov. 2017
findpeaks() works only with vectors (see the help), not with 2-D arrays.
Mohamed Nedal
am 22 Nov. 2017
oh, sorry I didn't know that. Thanks for correcting me.
Image Analyst
am 22 Nov. 2017
0 Stimmen
You can use the functions imregionalmax() and imregionalmin() in the Image Processing Toolbox.
1 Kommentar
Image Analyst
am 22 Nov. 2017
Input is the name of a built-in function so don't use that for your variable name. Try this:
localMaxImage = imregionalmax(grayImage);
localMinImage = imregionalmin(grayImage);
Kategorien
Mehr zu Morphological Operations finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!