在Matlab中读取DNG文件

时间:2018-12-19 19:00:56

标签: matlab dng

我正在尝试从iphoneX读取dng文件。 我阅读了链接https://blogs.mathworks.com/steve/2011/03/08/tips-for-reading-a-camera-raw-file-into-matlab/ 但是错误消息是“引用不存在的字段'SubIFDs'。”

info=imfinfo(dng_file_path);
info.SubIFDs{1} %where the error pop up
tiffHandle=Tiff((dng_file_path),'r');
offsets=TiffHandle.getTag('SubIFD');
setSubDirectory(TiffHandle,offsets(1));
CFA=double(read(TiffHandle));

1 个答案:

答案 0 :(得分:0)

iphone的DNG文件似乎已被压缩(无损jpeg压缩)。尝试通过首选项设置为“未压缩”的DNG Converter运行文件。然后在Matlab中尝试。