exifTagNames: Show Exif metadata of JPEG images or other image or video...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/exifTagNames.R

Description

The function will return metadata values, metadata tag names and group names of Exif metadata of JPEG images or other formats.

Usage

1
2
3
4
5
exifTagNames(inDir, 
  whichSubDir = 1,
  fileName,
  returnMetadata = "DEPRECATED",
  returnTagGroup = "DEPRECATED")

Arguments

inDir

character. Directory containing camera trap images sorted into station subdirectories (e.g. inDir/StationA/)

whichSubDir

integer or character. Either number or name of subdirectory of inDir in which to look for an image

fileName

character. A filename, either the file name of an image in inDir or a full path with file name (in which case inDir is not needed)

returnMetadata

deprecated and ignored

returnTagGroup

deprecated and ignored

Details

Many digital cameras record information such as ambient temperature or moon phase under maker-specific tag names in Exif metadata of JPEG images. In addition, many technical information are stored in Exif metadata. In order to extract those information from images and add them to the record tables created by the functions recordTable and recordTableIndividual, the tag names must be known so they can be passed to these functions via the additionalMetadataTags argument.

By default the function returns both metadata tag names and the metadata group they belong to (via argument returnTagGroup). This is helpful to unambiguously address specific metadata tags, because different groups can contain tags of identical names, which may cause problems executing the functions recordTable and recordTableIndividual. The format is "GROUP:tag", e.g. "EXIF:Flash".

Value

A data frame containing three columns: metadata tag group, tag name, and values.

Author(s)

Juergen Niedballa

References

Phil Harvey's ExifTool https://exiftool.org/

See Also

recordTable

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
## Not run: 

wd_images_ID <- system.file("pictures/sample_images_species_dir", package = "camtrapR")

# specify directory, camtrapR will automatically take first image from first subdirectory
exifTagNames(inDir          = wd_images_ID)

# specify subdirectory by name, camtrapR will use first image
exifTagNames(inDir          = wd_images_ID,
             whichSubDir    = "StationA")

# specifying fileName only (line break due to R package policy)
exifTagNames(fileName       = file.path(wd_images_ID, "StationC", "TRA", 
                                        "StationC__2009-05-02__00-10-00(1).JPG"))
                                        
# specify inDir and fileName
exifTagNames(inDir          = wd_images_ID,
             fileName       = file.path("StationC", "TRA", "StationC__2009-05-02__00-10-00(1).JPG"))
             
# it also works this way
exifTagNames(inDir          = file.path(wd_images_ID, "StationC", "TRA"),
             fileName       = "StationC__2009-05-02__00-10-00(1).JPG")
             

# with tagged sample images
wd_images_ID_tagged <- system.file("pictures/sample_images_indiv_tag", package = "camtrapR")
exifTagNames(inDir          = wd_images_ID_tagged)


## End(Not run)

jniedballa/camtrapR documentation built on Dec. 16, 2020, 8:05 a.m.