how can i convert an image to bit stream
Mostra commenti meno recenti
hey all is ther any way to convert image to bit stream or to ASCII code ?? please i need ur help thanks in advance
3 Commenti
Matt Kindig
il 30 Apr 2013
If the image is converted to uint8() format (simply by taking uint8(Image)), it is already in ASCII format-- you can then reshape() the resulting matrix into a single row/column to get a byte stream. Something like this:
Image8 = reshape(uint8(YourImageMatrix), 1, []);
Note that if you have an indexed image, this will saturate your image at 255 unless you have converted it to RGB before, using ind2rgb().
Walter Roberson
il 30 Apr 2013
Technically not: ASCII is only from 0 to 127, not 0 to 128. Also note that not all ASCII characters are printable, and that some ASCII characters (such as NUL or IDLE) may be "eaten" by communications systems.
To transform a data array to printable ASCII, using "uuencode" or the like is recommended.
sammar
il 1 Mag 2013
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Convert Image Type in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!