Clear Filters
Clear Filters

Area of Blob(s) after Step(Blob, Mask) command?

2 views (last 30 days)
Jawad Ahmad
Jawad Ahmad on 4 Dec 2017
Edited: Jawad Ahmad on 5 Dec 2017
I am wondering why for a merged blob area is almost same as single blob. Area of single blob is 21,738 and for a merged blob is 22900. Please see images for detail. This is a very slight difference. For other merged blobs the value of area is 30,000+.

Answers (1)

John D'Errico
John D'Errico on 4 Dec 2017
Of course, we don't know how you computed the area of those blobs or even if you did indeed compute the correct areas. People make mistakes all the time, thinking they did what they wanted to do, when in fact, that was not true. I even made a mistake once like that, back in 1983 or so. ;-)
In all seriousness, we don't know how you computed those areas. My guess is, you did something wrong. For example, I downloaded those images into MATLAB, cropping just the areas of interest, then computed the number of while pixels in those regions. One blob had approximately 2.535 times as many white pixels as the other. So a very trivial computation tells me that your assertion is based on having done something wrong. But what? How do I know?
  1 Comment
Jawad Ahmad
Jawad Ahmad on 5 Dec 2017
Edited: Jawad Ahmad on 5 Dec 2017
Thanks for your reply. I am using a built-in function. [areas, centroids, bboxes] = step(blob, mask). Where mask = step(detector, frame). Both Blob and Detector are calculated using vision.ForegroundDetector.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!