How can I get the Euler number of a binary matrix ?

2 visualizaciones (últimos 30 días)
Yazeed
Yazeed el 28 de Nov. de 2013
Respondida: Image Analyst el 28 de Nov. de 2013
Hi , i`ve never programmed in matlab before and I want to calculate the Euler Number of a binary matrix such as
0001000
0001000
0001000
0001000
I hope that my question is clear.
Thank You.

Respuesta aceptada

Image Analyst
Image Analyst el 28 de Nov. de 2013
Try this (if you have the Image Processing Toolbox):
measurements = regionprops(binaryMatrix, 'EulerNumber');
EulerNumbers = [measurements.EulerNumber];

Más respuestas (0)

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by