Editing metadata in trail camera images using R, magick and exiftool

I have a new hobby: camera traps, also known as trail cameras. Strapped to trees in my local bushland they sit in wait, firing automatically when triggered by a passing animal. Once in a while, something quite magical happens. The camera model I chose is the Campark T85 which for me, had the right combination of features and price point. One useful feature is the ability to transfer images and video to a phone wirelessly (albeit through a rather clunky phone app). Unfortunately, images retrieved in this way have one major flaw: an almost-complete absence of metadata. There is no GPS in the camera of course, but the EXIF data does not include the date/time of the image, nor the camera make. With a little research, I found a way to add this information to the images later using R and some additional software named exiftool. Here’s how I did it. Set up a directory structureFirst, I create a directory, ~/Documents/Campark85, containing files and directories that look like this:There’s an R script – more of that later, and a CSV file in the data directory – more of that later too. Under the cameras directory is a directory for each camera and in those directories, a directory for each deployment. A deployment basically describes the placement and location of the camera and has an ID, corresponding to the directory name.Within each deployment directory are the image and video files retrieved from the camera. Create a deployment data fil...
Source: What You're Doing Is Rather Desperate - Category: Bioinformatics Authors: Tags: environment programming statistics campark exiftool metadata photography rstats trail camera Source Type: blogs