please, how to calculate the number of pixels in boundingbox ?

hi i saiful. I would like to ask which way to count the number of pixels contained on objects in boundingbox, use the command regionprops

 Risposta accettata

Multiply the width of the bounding box by the height of the bounding box.

3 Commenti

please, how to write the code !!!
please, how to write the code !!!
For example,
info = regionprops(BinaryImage, 'BoundingBox');
number_of_pixels = info.BoundingBox(3) * info.BoundingBox(4);

Accedi per commentare.

Più risposte (0)

Categorie

Community Treasure Hunt

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

Start Hunting!

Translated by