필터 지우기
필터 지우기

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 CenterFile Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by