フィルターのクリア

Question about finding pits of a matrix?

4 ビュー (過去 30 日間)
Johny
Johny 2013 年 11 月 16 日
コメント済み: Tara Wagoner 2023 年 4 月 5 日
o
  2 件のコメント
Image Analyst
Image Analyst 2013 年 11 月 17 日
Johny - don't do that. Don't edit away your question. It really annoys people a lot.
Tara Wagoner
Tara Wagoner 2023 年 4 月 5 日
haha

サインインしてコメントする。

採用された回答

Matt J
Matt J 2013 年 11 月 16 日
編集済み: Matt J 2013 年 11 月 16 日
If I've understood what you're after, the whole task is doable in just a few lines,
minval=min(map(:)); %minimum cell value
pitmap=(map==minval); %all minima/pits
pitmap([1,end],[1,end])=false; %get rid of edge pits
[pitrows,pitcols]=find(pitmap); %pit coordinates
  3 件のコメント
Image Analyst
Image Analyst 2013 年 11 月 16 日
I agree with Matt about using imregionalmin(). By the way, you might find this interesting: http://www.mathworks.com/matlabcentral/fileexchange/35452-finddepressions
Johny
Johny 2013 年 11 月 16 日
This looks promising It seems this mregionalmin function uses 8-connected neighborhoods for 2D images, but I have to take into account the points on the input matrix which are themselves the minimum, aka offset of (0,0) which means that it should scan for the local minimum within the cell itself as well. does Imregionalmin do this?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeResizing and Reshaping Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by