Question about finding pits of a matrix?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Johny
el 16 de Nov. de 2013
Comentada: Tara Wagoner
el 5 de Abr. de 2023
o
2 comentarios
Image Analyst
el 17 de Nov. de 2013
Johny - don't do that. Don't edit away your question. It really annoys people a lot.
Respuesta aceptada
Matt J
el 16 de Nov. de 2013
Editada: Matt J
el 16 de Nov. de 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 comentarios
Image Analyst
el 16 de Nov. de 2013
I agree with Matt about using imregionalmin(). By the way, you might find this interesting: http://www.mathworks.com/matlabcentral/fileexchange/35452-finddepressions
Más respuestas (0)
Ver también
Categorías
Más información sobre Resizing and Reshaping Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!