find local maxima and local minima

1 visualización (últimos 30 días)
Pat
Pat el 10 de Sept. de 2012
Comentada: Image Analyst el 22 de Nov. de 2017
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

Respuestas (2)

Mohamed Nedal
Mohamed Nedal el 22 de Nov. de 2017
For Max, you can use findpeaks() function. And for Min, it's the same function but with negative data (i.e. -x).
  2 comentarios
Image Analyst
Image Analyst el 22 de Nov. de 2017
findpeaks() works only with vectors (see the help), not with 2-D arrays.
Mohamed Nedal
Mohamed Nedal el 22 de Nov. de 2017
oh, sorry I didn't know that. Thanks for correcting me.

Iniciar sesión para comentar.


Image Analyst
Image Analyst el 22 de Nov. de 2017
You can use the functions imregionalmax() and imregionalmin() in the Image Processing Toolbox.
  1 comentario
Image Analyst
Image Analyst el 22 de Nov. de 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);

Iniciar sesión para comentar.

Categorías

Más información sobre Computer Vision with Simulink en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by