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 Center および File ExchangeComputer Vision with Simulink についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by