Last chance! 50% off unlimited learning
Sale ends in
spatialDetectionHistory
.recordTableIndividual(inDir,
hasStationFolders,
IDfrom,
cameraID,
camerasIndependent,
minDeltaTime = 0,
deltaTimeComparedTo,
timeZone,
stationCol,
writecsv = FALSE,
outDir,
metadataHierarchyDelimitor = "|",
metadataIDTag,
additionalMetadataTags
)
inDir
have station subdirectories? If TRUE
, station IDs will be taken from directory names. If FALSE
, they will be taken from image filenames (requires images renamed with
imageRename
. If missing, no camera ID will be assigned and it will be aTRUE
, cameras at a station are assumed to record individuals independently. If FALSE
, cameras are assumed to be non-independent (e.g. in pairs). Takes effect only if there was more than 1 camera per station and cameraminDeltaTime
minutes after the last independent record of the same individual ("lastIndependentRecord"
), or minDeltaTime
minutetimeZone
must be an argument of OlsonNames
writecsv = TRUE
, the output csv will be written to inDir
.getSpeciesImages
). Station subdirectories are optional. Camera subdirectories are not allowed. This directory structure can be created easily with function getSpeciesImages
.
As with species identification, individuals can be identified in 2 different ways: by moving images into individual directories ("Species/Station/Individual/XY.JPG" or "Species/Individual/XY.JPG") or by metadata tagging (without the need for individual directories: "Species/XY.JPG" or "Species/Station/XY.JPG").
minDeltaTime
is a criterion for temporal independence of records of an individual at the same station/location. Setting it to 0 will make the function return all records. camerasIndependent
defines if the cameras at a station are to be considered independent (e.g. FALSE
if both cameras face each other and possibly TRUE
if they face different trails).
stationCol
is the station column name to be used in the resulting table. Station IDs are read from the station directory names if hasStationFolders = TRUE
. Otherwise, the function will try to extract station IDs from the image filenames (requires images renamed with imageRename
.
If individual IDs were assigned with image metadata tags, metadataIDTag
must be set to the name of the metadata tag group used for individual identification. metadataHierarchyDelimitor
is "|" for images tagged in DigiKam and images tagged in Adobe Bridge/ Lightroom with the default settings.
Manufacturer-specific Exif metadata tags such as "AmbientTemperature" or "MoonPhase" can be extracted if specified in additionalMetadataTags
. Multiple names can be specified as a character vector as: c(Tag1, Tag2, ...)
. Because they are not standardized, function exifTagNames
provides a vector of all available tag names. The metadata tags thus extracted may be used as individual covariates in spatial capture-recapture models.wd_images_ID <- system.file("pictures/sample_images_tagged/LeopardCat", package = "camtrapR")
# missing space in species = "LeopardCat" is because of CRAN package policies
if (Sys.which("exiftool") != ""){ # only run these examples if ExifTool is available
rec.db.pbe <- recordTableIndividual(inDir = wd_images_ID,
minDeltaTime = 60,
deltaTimeComparedTo = "lastRecord",
hasStationFolders = FALSE,
IDfrom = "metadata",
camerasIndependent = FALSE,
writecsv = FALSE,
metadataIDTag = "individual",
additionalMetadataTags = c("Model", "Make"),
timeZone = "Asia/Kuala_Lumpur"
)
} else { # show function output if ExifTool is not available
message("ExifTool is not available. Cannot test function")
data(recordTableIndividualSample)
}
Run the code above in your browser using DataLab