Image Processing Toolbox User's Guide |

**Finding the Euler Number of a Binary Image**

The `bweuler`

function returns the Euler number for a binary image. The Euler number is a measure of the topology of an image. It is defined as the total number of objects in the image minus the number of holes in those objects. You can use either 4- or 8-connected neighborhoods.

This example computes the Euler number for the circuit image, using 8-connected neighborhoods.

In this example, the Euler number is negative, indicating that the number of holes is greater than the number of objects.

Finding the Area of the Foreground of a Binary Image | Lookup Table Operations |

© 1994-2005 The MathWorks, Inc.