我这里有这个代码,我想通过不使用tif和cr2来简化它。基本上,我想获得曝光时间fnumber iso和tif中的日期作为变量t f S date,这样我就不必使用cr2文件。以下是我目前的代码:
clear all % clear workspace
RGB = imread('IMG_0069.tif');
info = imfinfo('IMG_0069.CR2'); % get Metadata
C = 1; % Constant to adjust image
x = info.DigitalCamera; % get EXIF
t = getfield(x, 'ExposureTime');% save ExposureTime
f = getfield(x, 'FNumber'); % save FNumber
S = getfield(x, 'ISOSpeedRatings');% save ISOSpeedRatings
date = getfield(x,'DateTimeOriginal'); % save DateTimeOriginal
I = rgb2gray(RGB);