Can't access data using " .DateTime " string
54 views (last 30 days)
Show older comments
Laiba
on 10 Nov 2024 at 8:13
Commented: Star Strider
on 10 Nov 2024 at 21:20
hey, I'm taking image processsing ccourse from coursera by MATHWORKS. but there is a problem in accessing date and time of a picture in matlab using following given method in this course. please help in this query so that i can continue my course.
2 Comments
Accepted Answer
Star Strider
on 10 Nov 2024 at 13:15
Perhaps this —
imshow(imread('peppers.png'))
metadata = imfinfo('peppers.png')
DateTime = datetime(metadata.FileModDate)
.
6 Comments
Walter Roberson
on 10 Nov 2024 at 20:33
Edited: Walter Roberson
on 10 Nov 2024 at 21:02
According to the documentation for imfinfo()
- DNG, JPEG, and TIFF only — If filename contains Exif tags, then info might include DigitalCamera or GPSInfo (global positioning system information) fields.
So this applies only to .dng, .jpg, .jpeg, .tif, and .tiff files, and only if the file includes EXIF tags, and even then only if the EXIF tags happen to include DigitalCamera or GPSInfo . If any of these three conditions are not satisfied, the DigitalCamera field will simply not be present. It will not "be present but empty" in such cases: it will literally not be present in such cases.
I was not able to find any case that potentially included a DateTime field.
More Answers (0)
See Also
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!