How can read PNG image in actual size?
5 次查看(过去 30 天)
显示 更早的评论
I have tried to read image using imread but It read image with small size!
5 个评论
Walter Roberson
2019-6-2
You can possibly zip it and attach that.
Or you can put it up on google drive or dropbox.
回答(2 个)
Image Analyst
2019-6-2
Obviously your screen is not 68 MB in size so you're either going to have to demagnify the image to see all of it, or you're going to have to just look at a small part of it, in its pixel-for-pixel true size, though a small window.
See my attached zoom demo, and also look into the function truesize().
4 个评论
Image Analyst
2019-6-2
He can drop it in his MATLAB online drive (preferably) and give us the link.
Alternatively use Google drive or dropbox or similar.
Walter Roberson
2019-6-3
That is not a PNG file, it is a DNG file, which is a TIFF variation used to store raw image data.
T = Tiff('L1.DNG');
offset = getTag(T, 'SubIFD');
setSubDirectory(T,offset)
imCFA = read(T);
This will give you Color Filter Array (CFA) data as uint16 -- sort of like Bayer Mosaicing
The imCFA array is 4000 x 5984 . Apple's Preview says the image is 5976 × 3992 after demosaicing.
Unfortunately Tiff class does not know about the tags needed to read the CFAPattern. Apple Preview says it is 2, 1, 1, 0, which would correspond to Blue, Green, Green, Red. Unfortunately I have not yet figured out how to decode the information.
The file includes a 599040 byte "MakerNotes" TIFF tag. https://owl.phy.queensu.ca/~phil/exiftool/idiosyncracies.html says that your particular model of Leica, Leica M (Type 240) has the most idiotic MakerNotes format out of all of the Leica models out of all camera manufacturers. Somewhere in there is a preview image.
6 个评论
Walter Roberson
2019-6-4
I am not at all confident as to interpretation, but parts of the file hint that there might be a 1920 x 1280 preview inside the file.
另请参阅
类别
在 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!