Identifying an image type or format
5 ビュー (過去 30 日間)
古いコメントを表示
Hello all:
I am at the end of my wits. I am trying to open an image file with no extension info. It has an octet-stream but no header. Not that I am an expert in the matter, but I have tried many usual approaches over last few hours.
Can somebody help me with hints on how to render this (attached) image.
Please note that my original file had no extension, I made it .txt to be able to upload it here.
Thanks much. Regards, Amit
0 件のコメント
回答 (2 件)
Image Analyst
2016 年 1 月 3 日
It looks like a different pattern starts after 6720 bytes but I don't know if the first 6720 bytes are the header or not. There are other patterns that seem to occur at multiples of 75 lines. I tried reading images with every size up to 512 wide and nothing starts to appear. It's almost total garbage. Maybe it's an indexed image
for k = 1 : 512
fid = fopen('screen.txt');
% fseek(fid, 16*420, 'bof');
theImage = fread(fid, [k, k], '*uint8'); % Also tried '*uint16'
fclose(fid);
imshow(theImage, []);
axis on
axis image
caption = sprintf('k = %d', k);
title(caption);
drawnow;
end
Surely you must know something about this file. Otherwise why would you even want to import it?
3 件のコメント
Image Analyst
2016 年 1 月 4 日
No, though Guillaume does - see his Answer. You had said "Let me look for and share more info shortly." so I was waiting for that info before I did anything more. I was expecting you to research who made this file, and whether you could get the format from them.
Guillaume
2016 年 1 月 4 日
The more information you give, the easier it makes it to try to identify the image type. What is used to capture the image (what software/hardware?). Is the image supposed to be able to be read by something else? etc.
Just from your size statement, we can infer something:
A 1600 x 1200 x 3 bytes (24-bit) is 5 MB of data. As your file is only 150 kB, it is heavily compressed. Possibly something like jpg. Problem is it's not a standard jpg file.
Your file appears to have some sort of header, but I would expect the size of the image to appear early in that header but it's not there. What it starts with, though, is possibly a date: 5/10/2015 ? and maybe a time 17:02:24.
No idea what the rest is. In any case, your file is not a standard image format so without more information, it's going to be very difficult to decode.
2 件のコメント
Guillaume
2016 年 1 月 4 日
After further investigation, there's no jpeg compressed information at all within that file, or at least, it does not contain the required markers as specified by the jpg standard.
Similarly, there's no png data embedded anywhere.
Walter Roberson
2016 年 1 月 5 日
The compression ratio is over 75 to 1.
It could be that there is a bunch of run length encoding, but I did not observe any repeated marker that would occur in run-length encoded data.
It could be that there are huffman tables and perhaps arithmetic encoding, but it is not a standard file that I can identify. It might be completely proprietary.
参考
カテゴリ
Help Center および File Exchange で Convert Image Type についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!