How to decode an image?

16 次查看(过去 30 天)
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,

采纳的回答

Image Analyst
Image Analyst 2014-7-3
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 个)

类别

Help CenterFile Exchange 中查找有关 Images 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by