DateTimeOriginal problems

Started by Vlermuis, August 25, 2017, 08:04:05 AM

Previous topic - Next topic

Vlermuis

Hi Forum Members,


I have thousands of images from camera trapping (using Reconyx HC500 cameras) which has the right date and time on the image but in the metadata the DateTimeOriginal is incorrect.

# I extract metadata using Exiftool inside RStudio on a MacBook using the following code:

exifRip <- function (inDir, outDir, name)
{
  time <- Sys.time()
  system(paste("exiftool -n -r -f -csv ", inDir, " > ", outDir,
              "/metadata_", name, ".csv", sep = ""))
  comp.time <- Sys.time() - time
  comp.time
}


# If you are using a Windows computer then the above code won't work. For Windows the following should work:
exifRip <- function (inDir, outDir, name)
{
  time <- Sys.time()
  shell(paste("exiftool -n -r -f -csv ", inDir, " > ", outDir,
              "/metadata_", name, ".csv", sep = ""))
  comp.time <- Sys.time() - time
  comp.time
}

# Arguments for function above:
# # inDir     == the directory where your images are saved
# # outDir   == the directory where your would like the .csv file saved
# # name   == the name of you would like to give to your .csv file




This function above then produces a .csv file containing all the metadata.

I have attached some sample images for you to see.

So, the problem is that the date and time is completely wrong even though it's correct on the image itself. Do you have any advice for me about what to do or where to look for answers?

# What I have tried so far:

> I wanted to try the 'timeShiftImages' function in RStudio using the package camtrapR (Niedballa et al) but couldn't since all the images have the same YYYY:MM:DD even though it wasn't taken on the same days.
> I tried formatting the column with the DateTimeOriginal data in to different date formats in Excel but this won't work either.
> I've also used the 'fixDateTimeOriginal' function in RStudio using the camtrapR package but this didn't help either.
> I've also tried the 'fixHyperfire' function { Tobler, Mathias (2015). Camera Base Version 1.7 http://www.atrium-biodiversity.org/tools/camerabase/files/CameraBaseDoc1.7.pdf }

Thank you for your time.

Phil Harvey

Wow.  The dates are really mess up in the metadata of these images.

But these images have been modified by some Microsoft software.  Are the dates also bad in the original images?  If so, I would send them to Reconyx and ask them about this problem.  Their technical support is very good I think.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Vlermuis

Thank you for looking at the images Dr Harvey.

Yes, images are wrong in our backup as well. I will hear from Reconyx about this.

Thank you for the fast reply!

Best Wishes,