no dateTimeOriginal with camera trap pics (Reconyx)

53 views
Skip to first unread message

gabriell...@gmail.com

unread,
Mar 8, 2021, 10:06:50 PM3/8/21
to camtrapR
Hello, 

I have 15 stations (folders) with no subfolders. And the pictures taken with a Reconyx (don't know the model) camera trap don't show dateTimeOriginal information. 
1. I ran exifTagNames() and didn't see the dateTimeOriginal tag. 
2. I ran fixDateTimeOriginal() and then exifTagNames() again and this is what I got. 

exiftags01.png
exiftags02.png

3. I used digiKam to tag the images. 
4. And library(camtrapR)

Can you help me with getting the dateTimeOriginal() from these photos? 

Thank you!! 

Gabby

Juergen Niedballa

unread,
Mar 9, 2021, 4:30:38 AM3/9/21
to camtrapR
Hi Gabby,
for whatever reason these photos seem to have no dateTimeOriginal tag. In fact there are not Exif metadata at all, which is unfortunate. 
Is the FileModifyDate  (2009-07-05 ...) correct? Or the date under "Comment" (line 18)?
If yes, exiftool can copy image tags, and that way you could potentially create a DateTimeOriginal tag. Since it is quite a special case there is no camtrapR function for this (yet). 

You can also try installing the dev version of camtrapR, it contains a new function OCRdataFields which allows you to read the date/time and whatever else from the data fields in the images.  It is not always  100% correct, so check the output carefully. It requires the magick and tesseract packages. 
But please note, it is work in progress and currently only gives you a data frame with the extracted tags, and doesn't write the tags into the images. So the normal recordTable operation still won't work since it expects the DateTimeOriginal tag.

library(devtools)
install_github("jniedballa/camtrapR", ref = "dev")

Best regards,
Jürgen

Juergen Niedballa

unread,
Mar 14, 2021, 2:58:06 PM3/14/21
to camtrapR
Hi Gabby, 
I just added a function to the development  version of the package that allows you to write new values to the DateTimeOriginal field in the exif metadata of images (or create a new DateTimeOriginal field if it is missing). So you can first run OCRdataFields to extract the date/time values from the data fields in the images as mentioned before, check them (that's important because OCR can make mistakes), and then run the new function writeDateTimeOriginal to create a new DateTimeOriginal field. 
To use it, please reinstall the dev version and see the "Examples" section in the function documentation on how to use it in conjunction with OCRdataFields. 

If you give it a try, please let me know how it goes. I just wrote the function and didn't test it on a larger data set yet, so all feedback would be valuable.
Best,
Jürgen
Reply all
Reply to author
Forward
0 new messages