FUNCTION REFERENCE
bwarea
Estimate binary area with 2-by-2 neighbourhood weights.
Estimate binary area with 2-by-2 neighbourhood weights.
Syntax
total = bwarea(BW)Zero-padded windows contribute 0, 1/4, 1/2 (two adjacent), 3/4 (two diagonal), 7/8 or 1 for zero through four foreground pixels. Each pixel participates in four windows. Nonzero is foreground; total is a double scalar.
Example
bwarea([1 0; 0 1]) % 2.25Differences from MATLAB: none known within the segmentation workspace limit.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.