Borrar filtros
Borrar filtros

how Calculate the number of object(submatrix) in matlab?

1 visualización (últimos 30 días)
ahmad saleh
ahmad saleh el 21 de Nov. de 2015
Editada: ahmad saleh el 21 de Nov. de 2015
number of object =5
a=[0 0 0 0 0 0 0 0 0 0 0;0 0 1 1 1 1 0 1 0 1 1;0 0 1 0 1 0 1 1 1 0 0;0 1 1 1 1 0 1 0 1 0 0;1 0 1 0 1 0 1 1 1 0 0;1 0 1 1 1 1 0 0 0 0 0;0 0 0 0 0 0 1 1 1 0 0;0 1 1 1 1 0 1 0 1 0 0;0 0 1 0 1 0 1 1 1 0 0;0 0 1 1 1 0 0 0 0 0 0;0 1 0 0 0 0 0 0 0 0 0];
b=[1 1 1;1 0 1;1 1 1];

Respuesta aceptada

Andrei Bobrov
Andrei Bobrov el 21 de Nov. de 2015
sum(conv2(a,b) == 8)

Más respuestas (0)

Categorías

Más información sobre Images en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by