Open DNG Image File

Hi, can I know the way to access and open DNG image file using Matlab? Is this the correct way? TQ...
imdata=imread('ABC.dng'); image(imdata)

回答(2 个)

Superb
Superb 2012-2-26

0 个投票

Yeah...Thanks...I've try my previous code...it only get a blurry image...After that I found another topic which is the same as Walter link...But After I use imtool(cfa), it shows me a black and white image(quite black)...not sure whether it's a correct image I Should obtained from original image which is in Color...can anyone help explain? TQ...

5 个评论

imread() would only get you the thumbnail. You have to go through many more steps to get the real image.
Thanks...I tried this code...but it give me a very dark image...
info = imfinfo('IMG.dng')
info.SubIFDs{1}
warning off MATLAB:tifflib:TIFFReadDirectory:libraryWarning
t = Tiff('IMG.dng','r');
offsets = getTag(t,'SubIFD');
setSubDirectory(t,offsets(1));
cfa = read(t);
close(t);
imtool(cfa)
Is that a correct way? TQ...
What's the photometric interpretation of the image?
This is the 2 I try...and the last one I use was using the "2" below...don't know whether it's a correct choice...since "1" will only get Thumbnail of the image...very blur(small size)...so i try "2", but "2" will be very dark but in a big size...
1. info = imfinfo('IMG.dng')
PhotometricInterpretation: 'RGB'
2. info.SubIFDs{1}
PhotometricInterpretation: 'CFA'
I was kind of thinking it was going to be CFA. It's raw sensor data. I do not know a lot about it, but you might consult the TIFF/EP specification for more information about it.

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Read, Write, and Modify Image 的更多信息

标签

提问:

2012-2-26

Community Treasure Hunt

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

Start Hunting!

Translated by