Better than the original gather_images function in every single way. This function reads exif data from images and creates a data frame from these values. This function can extract any information that you want and put it together into a data frame. Note that the tool we use to read EXIF data (exifr) treats everything as a character string. This function entrusts changing variable types to you and your discression :) If you want to analyze this data with camtrapR, you can then use the prep_camtrapr function on the output of gather_images.

gather_images(
  images_path,
  tags_path,
  exif_targets = c("FileName", "DateTimeOriginal", "FileSize", "Keywords"),
  tag_sep = "\\.[:space:]"
)

Arguments

images_path

Path to a directory/folder that contains the desired images.

tags_path

Path to a csv file that contains the information needed to map tags information contained in the keywords EXIF attribute.

exif_targets

A list of EXIF attributes to extract from image files. If not specified, default is "FileName", "DateTimeOriginal","FileSize", "Keywords". These four defaults attributes will be included in any image taken according to CIPA standards, and only advanced users should consider supplying custom EXIF attribute targets. Currently, the only non-optional keywords are FileName and Keywords. However, if you want to use further functions in this package to prepare images for use with camtrapr, you need to use the default attributes to target. Be warned, custom attributes may cause problems.

tag_sep

A regular experession for a character or string of characters to use as a seperator for splitting tag numbers from tag names. This defaults to a period and a space.

Value

Generates df_fixed, a data.frame with columns for each of the image tags in your tagging scheme.