How can I measure how many pixels a single irregular object has?
Mostra commenti meno recenti
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!

Risposte (2)
Ahmet Cecen
il 13 Ago 2014
Modificato: Ahmet Cecen
il 13 Ago 2014
0 voti
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.
Categorie
Scopri di più su ROI-Based Processing in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!