from
run_exiftool
by Peter Burns Read and write full Exif metadata from image files. A Matlab front end for ExifTool, by Phil Harvey.
getexif(fname)
function [exifdata, nf] = getexif(fname)
%[status] = getexif(fname) read Exif data from an image file
% fname = name of image file, e.g., 'myfile.jpg'
%
%Needs ExifTool.exe, written by Phil Harvey
% http://www.sno.phy.queensu.ca/~phil/exiftool/
% 1. Download the file, exiftool(-k).exe
% 2. Rename this file, exiftool.exe
% 3. Save this file in a folder on your Matlab path, e.g. .../matlab/
%Peter Burns, 28 May 2013
test = which('exiftool.exe');
if isempty(test)
disp('ExifTool not available:');
disp('Please download from,')
disp(' http://www.sno.phy.queensu.ca/~phil/exiftool/')
disp('make sure that the installed exiftool.exe is on your Matlab path')
beep
exifdata=[];
nf = 0;
return
else
[status, exifdata]=system(['exiftool.exe -s ',fname]);
nf = find(exifdata==':');
nf = length(nf);
end