from
run_exiftool
by Peter Burns Read and write full Exif metadata from image files. A Matlab front end for ExifTool, by Phil Harvey.
run_exiftool_demo.m
% run_exiftool_demo
% Demonstration of functions
% getexif
% putexif
% Peter Burns, 28 May 2013
[f,p] = uigetfile({'*.jpg';'*.tif'}, ...
'Select image file');
% Read Exif data
exifdata = getexif([p,f]);
disp(exifdata)
dat = imread([p,f]);
imagesc(dat), axis image
%
% Do processing image data here ...
% (For this demo. we save the original data)
%
[f1,p1] = uiputfile({'*.jpg';'*.tif'},'Save as');
% Save image with original Exif data
status = putexifdata(dat,[p1,f1], [p,f]);
% Check
[exifdata1, nf1] = getexif([p,f]);
disp(exifdata1)
[exifdata2, nf2] = getexif([p1,f1]);
disp(exifdata2)