Image as a string of binary numbers
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Is there a way to convert a .jpg or .gif into a string of binary numbers?
I want to have a string of binary numbers that could be copied from a word document then read back in MATLab as a picture.
I would also need to know what function could such a string as an image.
0 Kommentare
Antworten (1)
Walter Roberson
am 3 Mär. 2014
Converting to text:
dec2bin(TheImage,8)
Converting back:
reshape(uint8(bin2dec(TheStringArray)), size(TheImage))
4 Kommentare
Walter Roberson
am 5 Mär. 2014
Hunter: use reshape() to change it into a vector. Just be sure to reshape() back the right way!
Siehe auch
Kategorien
Mehr zu Convert Image Type finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!