Description Usage Arguments Details Value Examples
View source: R/batch_convert.R
Batch convert list of raw FLIR matrices to a list of temperature matrices (°C).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | batch_convert(
raw_dat,
E = 1,
OD = 1,
RTemp = 20,
ATemp = RTemp,
IRWTemp = RTemp,
IRT = 1,
RH = 50,
PR1 = 21106.77,
PB = 1501,
PF = 1,
PO = -7340,
PR2 = 0.012545258,
write_results = TRUE,
out_dir = NULL,
file_name = NULL
)
|
raw_dat |
A list of raw FLIR matrices returned from
|
E |
Emissivity. Defaults to 1.
See |
OD |
Object distance (metres).
See |
RTemp |
Apparent reflected temperature (°C). Defaults to 20.
See |
ATemp |
Atmospheric temperature (°C). Defaults to reflected temperature.
See |
IRWTemp |
Infrared Window Temperature (°C). Defaults to reflected temp.
See |
IRT |
Infrared Window transmission. Defaults to 1.0.
See |
RH |
Relative humidity (%). Defaults to 50.
See |
PR1 |
PlanckR1. A calibration constant for FLIR cameras.
See |
PB |
PlanckB. A calibration constant for FLIR cameras.
See |
PF |
PlanckF. A calibration constant for FLIR cameras.
See |
PO |
PlanckO. A calibration constant for FLIR cameras.
See |
PR2 |
PlanckR2. A calibration constant for FLIR cameras.
See |
write_results |
Should results be written to file? Defaults to TRUE. |
out_dir |
Path to directory where converted temperature data will be written. Defaults to NULL, writing to current directory. |
file_name |
File name (without extension). Defaults to NULL, with the name 'flir_converted_' plus the current date. File format is .Rds |
Batch implementation of Thermimage::
raw2temp
.
A list with one element per input thermal image. Each element is a numeric matrix of the converted temperature data, in °C.
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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | # Setup ----------------------------------------------------------
# Load raw data
raw_dat <- flir_raw$raw_dat
camera_params <- flir_raw$camera_params
metadata <- flir_metadata
# Create vector denoting the position of each element of raw_dat
# (each photo) within the metadata dataframe
photo_index <- match(names(raw_dat), metadata$photo_no)
# Define environmental parameters --------------------------------
# Emissivity is mean of range given in Scheffers et al. 2017
# (onlinelibrary.wiley.com/doi/10.1111/btp.12355/full)
E <- mean(c(0.982,0.99))
# Object distance is calculated as the hypotenuse of a right
# triangle where the vertical side is 1.3 m (breast height) and
# the angle down is 45 degrees
OD <- (sqrt(2))*1.3
# Apparent reflected temperature, atmospheric temperature and
# infrared window temperature set as the atmospheric temperature
# easured in the field.
RTemp <- metadata$atm_temp[photo_index]
ATemp <- metadata$atm_temp[photo_index]
IRWTemp <- metadata$atm_temp[photo_index]
# Infrared Window transmission is kept at default.
IRT <- 1
# Relative humidity is set as the relative humidity measured
# in the field.
RH <- metadata$rel_humidity[photo_index]
# Define camera parameters ---------------------------------------
# These parameters are calibration constants, and therefore
# constant for each camera
PR1 <- camera_params[,"PlanckR1"]
PB <- camera_params[,"PlanckB"]
PF <- camera_params[,"PlanckF"]
PO <- camera_params[,"PlanckO"]
PR2 <- camera_params[,"PlanckR2"]
# Batch convert! -------------------------------------------------
results <-
batch_convert(raw_dat,
E, OD, RTemp, ATemp, IRWTemp, IRT, RH,
PR1, PB, PF, PO, PR2,
write_results = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.