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!