How to find the coordinates of the white square ?

1 visualización (últimos 30 días)
Alaa Abusbeih
Alaa Abusbeih el 20 de Feb. de 2019
Editada: Matt J el 21 de Feb. de 2019

Respuesta aceptada

Matt J
Matt J el 20 de Feb. de 2019
Editada: Matt J el 20 de Feb. de 2019
Some simple morphological operations are all you need.
A=imbinarize((imread('image.jpeg')));
A=bwareafilt( imopen(A,strel('disk',5)) ,1);
[I,J] = find(A); %The desired coordinates??
imshow(A)
  4 comentarios
Alaa Abusbeih
Alaa Abusbeih el 21 de Feb. de 2019
what the value of A,I and J means ?
Matt J
Matt J el 21 de Feb. de 2019
Editada: Matt J el 21 de Feb. de 2019
A is the image, as displayed above, with everything but the square removed. I and J are the matrix coordinates of the non-zero pixels of A, see FIND.

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by