bwarea
Area of objects in binary image
Syntax
Description
Examples
Input Arguments
Output Arguments
Algorithms
bwarea estimates the area of all of the on
pixels in an image by summing the areas of each pixel in the image. The area of an
individual pixel is determined by looking at its 2-by-2 neighborhood. There are six
different patterns, each representing a different area:
Patterns with zero
onpixels (area = 0)Patterns with one
onpixel (area = 1/4)Patterns with two adjacent
onpixels (area = 1/2)Patterns with two diagonal
onpixels (area = 3/4)Patterns with three
onpixels (area = 7/8)Patterns with all four
onpixels (area = 1)
Each pixel is part of four different 2-by-2 neighborhoods. This means, for example,
that a single on pixel surrounded by off pixels
has a total area of 1.
References
[1] Pratt, William K., Digital Image Processing, New York, John Wiley & Sons, Inc., 1991, p. 634.
Version History
Introduced before R2006a
