How to get the largest zero region(rectangle) in a 3D matrix/ 2D matrix?

6 ビュー (過去 30 日間)
michelle
michelle 2020 年 7 月 22 日
コメント済み: Xuechu Xu 2020 年 7 月 22 日
My origin thoughts is that calculating the min and the max in every collum and row, I'm working on it.
I wonder there is more convenient method to realize it.
The RED rectangle is I want to obtain.

回答 (1 件)

Xuechu Xu
Xuechu Xu 2020 年 7 月 22 日
I recommend region growing algorithm. Find all zero elements as seeds, and begin from one of it. Add one collum or row each time to make a growth, meanwhile delete those grown regions from the seeds. Keep this progress until all seeds are grown to region, find the largest one.
  1 件のコメント
Xuechu Xu
Xuechu Xu 2020 年 7 月 22 日
Ah, something wrong. Those grown dots can't be deleted from seeds, I didn't consider the different shape. (But this will cost much much more resources and time, just for reference only)

サインインしてコメントする。

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by