please, how to calculate the number of pixels in boundingbox ?
3 views (last 30 days)
Show older comments
saiful irfan
on 17 Jun 2015
Commented: Walter Roberson
on 17 Jun 2015
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
0 Comments
Accepted Answer
Walter Roberson
on 17 Jun 2015
Multiply the width of the bounding box by the height of the bounding box.
3 Comments
Walter Roberson
on 17 Jun 2015
For example,
info = regionprops(BinaryImage, 'BoundingBox');
number_of_pixels = info.BoundingBox(3) * info.BoundingBox(4);
More Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!