How to extract pixel values in 8-bit binary format from an image?

3 visualizaciones (últimos 30 días)
Bala
Bala el 27 de Mzo. de 2013
Comentada: Image Analyst el 4 de Abr. de 2020
I want the image with pixel values in 8 bit binary value.

Respuestas (2)

Image Analyst
Image Analyst el 27 de Mzo. de 2013
If you want 8 bit, just cast it to 8 bit:
image8bit = uint8(originalImage);
If you want a string of binary digits, use dec2bin()
binaryString = dec2bin(170)
Result:
binaryString =
10101010

Harshit
Harshit el 27 de Mzo. de 2013
Once you extract the pixel from image quantize it to (0,256) fixed point representation. Let the pixel be p(i,j) the output should be [p(i,j)/max_image{p(i,j)*256].
  3 comentarios
Divya Khanna
Divya Khanna el 4 de Abr. de 2020
Why do we divide it in the end?
Image Analyst
Image Analyst el 4 de Abr. de 2020
Just ignore this answer. It's not correct.

Iniciar sesión para comentar.

Categorías

Más información sobre Import, Export, and Conversion 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