Azzera filtri
Azzera filtri

How to decode an image?

16 visualizzazioni (ultimi 30 giorni)
Jack
Jack il 3 Lug 2014
Risposto: Image Analyst il 3 Lug 2014
So I have an img. file and it wont open in any applications (understandably) so I've been told to view the image in matlab as there is a way to decode (I don't know if that is the right word) the image in order to see it. I know its a broad question but is there a specifically good way to 'decode' an image? Thanks,

Risposta accettata

Image Analyst
Image Analyst il 3 Lug 2014
You could use fread() to read in the bytes as a 2D array and then see what the image looks like. It might look interleaved or sheared or both. Try skipping past the header (guess at how long it might be) and extracting every third element if the image is known to be color. If you don't know the format you have to do these kind of detective things to figure out the format.

Più risposte (0)

Categorie

Scopri di più su Images in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by