フィルターのクリア

How do you find boundaries of a binary matrix developed from an image?

2 ビュー (過去 30 日間)
Michael Sposato
Michael Sposato 2022 年 11 月 22 日
回答済み: Image Analyst 2022 年 11 月 22 日
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?

回答 (1 件)

Image Analyst
Image Analyst 2022 年 11 月 22 日
Yes
[rows, columns] = find(binaryMatrix);
topRow = min(rows)
bottomRow = max(rows)
leftColumn = min(columns)
rightColumn = max(columns)

カテゴリ

Help Center および File ExchangeImages についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by