bweuler
Euler number of binary image
Syntax
Description
returns the Euler number for the binary image eul
= bweuler(BW
,conn
)BW
. The Euler
number (also known as the Euler characteristic) is the total number of objects in
the image minus the total number of holes in those objects.
conn
specifies the connectivity. Objects are connected sets
of on
pixels, that is, pixels having a value of 1.
Examples
Input Arguments
Output Arguments
Algorithms
bweuler
computes the Euler number by considering
patterns of convexity and concavity in local 2-by-2 neighborhoods.
See [2] for
a discussion of the algorithm used.
References
[1] Horn, Berthold P. K., Robot Vision, New York, McGraw-Hill, 1986, pp. 73-77.
[2] Pratt, William K., Digital Image Processing, New York, John Wiley & Sons, Inc., 1991, p. 633.
Extended Capabilities
Version History
Introduced before R2006a