How can I measure how many pixels a single irregular object has?
古いコメントを表示
I have an image with many irregular objects. How can I measure how many pixels each irregular object has? The image is shown as the follows. Thanks a lot!

回答 (2 件)
Ahmet Cecen
2014 年 8 月 13 日
編集済み: Ahmet Cecen
2014 年 8 月 13 日
0 投票
I assume the sea of blue there are all 0s, so I would do image(image~=0)=1, and you will have a black and white image of only 1s and 0s.
You can use bwconncomp after the above thresholding. It will give a list of every individual object and a list of each objects pixels.
カテゴリ
ヘルプ センター および File Exchange で Region and Image Properties についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!