Question about finding pits of a matrix?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Johny
am 16 Nov. 2013
Kommentiert: Tara Wagoner
am 5 Apr. 2023
o
2 Kommentare
Image Analyst
am 17 Nov. 2013
Johny - don't do that. Don't edit away your question. It really annoys people a lot.
Akzeptierte Antwort
Matt J
am 16 Nov. 2013
Bearbeitet: Matt J
am 16 Nov. 2013
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 Kommentare
Image Analyst
am 16 Nov. 2013
I agree with Matt about using imregionalmin(). By the way, you might find this interesting: http://www.mathworks.com/matlabcentral/fileexchange/35452-finddepressions
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Resizing and Reshaping Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!