MorphologicalEulerNumber

MorphologicalEulerNumber[image]
computes the morphological Euler number of regions in a binary image.

MorphologicalEulerNumber[image, t]
treats values above t as foreground.

Details and OptionsDetails and Options

ExamplesExamplesopen allclose all

Basic Examples (2)Basic Examples (2)

Count the number of white objects minus the number of holes:

In[1]:=
Click for copyable input
Out[1]=

Count the number of bright spots, specifying an explicit thresholding value:

In[1]:=
Click for copyable input
Out[1]=
New in 7 | Last modified in 8
New to Mathematica? Find your learning path »
Have a question? Ask support »