How to decode an image?
8 views (last 30 days)
Show older comments
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,
0 Comments
Accepted Answer
Image Analyst
on 3 Jul 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.
0 Comments
More Answers (0)
See Also
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!