Learn R Programming

camtrapR (version 0.99.0)

exifTagNames: Show Exif metadata tags and tag names from JPEG images

Description

The function will return sample metadata and tag names of Exif metadata of JPEG images. It uses the first JPEG image it finds in a subdirectory of the specified directory.

Usage

exifTagNames(inDir, 
  whichSubDir = 1,
  returnMetadata = FALSE)

Arguments

inDir
character. Directory containing camera trap images sorted into station subdirectories (e.g. inDir/StationA/)
whichSubDir
integer. The number of the subdirectory of inDir in which to look for an image
returnMetadata
logical. Return actual metadata (TRUE) or metadata tag names only (FALSE)

Value

  • A character vector containing available metadata or metadata tag names.

Details

Many digital cameras record information such as ambient temperature or moon phase under maker-specific tag names in Exif metadata of JPEG images. The tag names must be known to be passed to the functions recordTable and recordTableIndividual via the additionalMetadataTags argument to extract those information from images and add them to the record tables.

References

Phil Harvey's ExifTool http://www.sno.phy.queensu.ca/~phil/exiftool/

See Also

recordTable

Examples

Run this code
if (Sys.which("exiftool") != ""){        # only run this example if ExifTool is available
wd_images_ID <- system.file("pictures/sample_images", package = "camtrapR")

# return tag names only
exifTagNames(inDir          = wd_images_ID,
             returnMetadata = FALSE)

# return tag names and metadata
exifTagNames(inDir          = wd_images_ID,
             returnMetadata = TRUE)
}

Run the code above in your browser using DataLab