find local maxima and local minima

조회 수: 4 (최근 30일)
Pat
Pat 2012년 9월 10일
댓글: Image Analyst 2017년 11월 22일
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

답변 (2개)

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

댓글을 달려면 로그인하십시오.


Image Analyst
Image Analyst 2017년 11월 22일
You can use the functions imregionalmax() and imregionalmin() in the Image Processing Toolbox.
  댓글 수: 1
Image Analyst
Image Analyst 2017년 11월 22일
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);

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Computer Vision with Simulink에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by