Hi Jürgen,
We’re just doing a small camera trap study, for which your
excellent cameratrapR package seems the perfect analysis tool. Though we are having some problems getting the package to read the date & time from our image.
I’ve tagged all 4000 of our sample images in digiKam, but don’t seem to be able to get the package to accept the images – whenever I try to do a timeshift or recordTable errors appear (below). The images are stored at e.g. G:\rawImages\stationA\camera1 and the code I used is below:
testimages <- ("G:/test")
## image shift time
timeShiftTabletest = read.csv("timeShiftTable_test.csv")
timeshift_run <- timeShiftImages(inDir )
timeshift_run = testimages,
timeShiftTable = timeShiftTabletest,
stationCol = "station",
hasCameraFolders = TRUE,
cameraCol = "camera",
timeShiftColumn = "timeshift",
timeShiftSignColumn = "sign"
Which results in the following:
G:/rawImages/stationA/camera1
Warning messages:
1: running command 'exiftool -r "-DateTimeOriginal+=0:0:0 0:0:1" "G:/rawImages/stationA/camera1"' had status 1
> timeshift_run
1 G:/rawImages/stationA/camera1 0 image files updated
1 8 files weren't updated due to errors
Similarly, after when trying to export the data, the following happens:
export <- recordTable(inDir = images,
IDfrom = "metadata",
metadataSpeciesTag = "Species",
stationCol = "station",
camerasIndependent = F,
cameraID = "directory",
)
Warning: timeZone is not specified. Assuming UTC
stationA : 117 images
Error in `$<-.data.frame`(`*tmp*`, "DateTimeOriginal", value = numeric(0)) :
replacement has 0 rows, data has 117
I’ve attached an image,
one of our 4000 camera trap images that causes the above errors. Could you please help us get the images into a form the package will find acceptable as input?
Best regards,
Tom