How do you find boundaries of a binary matrix developed from an image?
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I currently have an image that I have put thresholds on to then create a binary matrix (833x1464). Is there any way to find the first and last row where the value 1 appears, and the same for the colums?
0 comentarios
Respuestas (1)
Image Analyst
el 22 de Nov. de 2022
Yes
[rows, columns] = find(binaryMatrix);
topRow = min(rows)
bottomRow = max(rows)
leftColumn = min(columns)
rightColumn = max(columns)
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!