How to i get binary number from image ?
Mostrar comentarios más antiguos
how to get binary number from image? what tools or function in matlab? this is example image :


Respuestas (1)
Adam
el 16 de Feb. de 2017
If the image is greyscale and only has values of 0 or 'non-zero' then it is just trivially
binaryVals - logical( myImage );
If it is in true RGB and you still just want effectively black and 'non-black' (which in this case looks like it is all just white) then
binaryVals = logical( sum( myImage, 3 ) );
should work.
4 comentarios
afif fadilah
el 16 de Feb. de 2017
Editada: afif fadilah
el 16 de Feb. de 2017
Adam
el 16 de Feb. de 2017
I don't understand what you mean by the 'image' below. You can see the binary values in the variable editor, but you can't plot them in an image as visible 1s and 0s like that. The image on top is a usual representation of a binary image and the code I gave you should give you the values that make up that image.
afif fadilah
el 6 de Mzo. de 2017
Walter Roberson
el 6 de Mzo. de 2017
Categorías
Más información sobre Images en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

