Borrar filtros
Borrar filtros

i have an array of <65536*8 int8> (all are binary numbers). i want to make the corresponding grayimage having size if 256* 256. how can i do it.

2 visualizaciones (últimos 30 días)
i have an array of <65536*8 int8> (all are binary numbers) . i want to make the corresponding grayimage having size if 256* 256. how can i do it. kindly suggest me.

Respuesta aceptada

Walter Roberson
Walter Roberson el 27 de Nov. de 2016
as_numeric = bin2dec(char(YourArray + '0'));
YourImage = reshape(as_numeric, 256, []);
  9 comentarios
aditya kumar sahu
aditya kumar sahu el 30 de Nov. de 2016
so,if we use jpeg image some loss of information will be there.is it?but what about png and bmp images.
Walter Roberson
Walter Roberson el 30 de Nov. de 2016
Yes, writing to JPEG loses information unless you tell imwrite() to use lossless compression. png and bmp do not lose information.

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