An enclosing rectangle can contain background positions. Its area need not equal the foreground support inside it.
Separate support and enclosure
Binary region area can count foreground samples, while a bounding box describes an enclosing rectangle. Occupancy compares those different quantities. The mask and pixel convention need to remain specified so a rectangle containing empty corners is not reported as entirely observed foreground. Primary reference: MathWorks region area, bounding box and extent.
For an original worksheet, preserve foreground count, rectangle dimensions and their ratio in separate columns. Keep the same region membership for all three. A bounding rectangle is useful geometric information, but it does not by itself state which positions inside it belong to the segmented region.
Calculate a fictional cross
Consider a three-by-three binary cross with rows [0,1,0], [1,1,1] and [0,1,0]. It contains five foreground samples. Its enclosing pixel-cell rectangle spans three columns and three rows, giving nine cell areas. Foreground occupancy is therefore 5/9, approximately 0.556.
The four corner cells are inside the enclosure but absent from the foreground. This invented cell-count calculation does not provide physical square millimeters. A physical area conversion would need its own spatial geometry and calibration, and it must preserve which discrete area convention was used.
Retain the denominator
Prepare an original overlay showing the bounding rectangle and foreground mask together. If an occupancy comparison changes, inspect the foreground count and box dimensions separately. A lower ratio could come from fewer foreground positions or a larger enclosure; the ratio alone does not identify which changed.
No occupancy threshold here certifies an HM product or an inspection result. The guide's decision is whether the denominator represents a bounding area rather than actual foreground. Keep that distinction when a shape descriptor is presented as coverage or fullness.
Customer Questions
What is the fictional foreground area in cells?
Five.
What is its enclosing rectangle area?
Nine pixel-cell areas.
What is the occupancy ratio?
Five ninths, approximately 0.556.
Primary References
These references support the technical principles discussed in this guide. The worked examples and review questions are educational.
Discuss Your Machine Requirement
Share your product, container, required output and the evidence needed for your technical review.
Request a Technical Review