Learn R Programming

Thermimage (version 2.1)

temp2raw: Converts temperature (oC) to raw thermal data

Description

Inverse of the function raw2temp. Typically used when incorrect settings were used during thermal imaging analysis, and the raw values need to be extracted in order to re-calculate temperature using raw2temp. Parameters under which the temperatures were estimated should be known, since the conversion to raw will take those into account.

Usage

temp2raw(temp, 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)

Arguments

temp
estimate temperature (oC) from an infrared thermal imaging file
E
Emissivity - default 1, should be ~0.95 to 0.97 depending on object of interest. Determined by user.
OD
Object distance from thermal camera in metres
RTemp
Apparent reflected temperature (oC) of the enrivonment impinging on the object of interest - one value from FLIR file (oC), default 20C.
ATemp
Atmospheric temperature (oC) for infrared tranmission loss - one value from FLIR file (oC) - default value is set to be equal to the reflected temperature. Transmission loss is a function of absolute humidity in the air.
IRWTemp
Infrared Window Temperature (oC). Default is set to be equivalent to reflected temp (oC).
IRT
Infrared Window transmission - default is set to 1.0. Likely ~0.95-0.97. Should be empirically determined. Germanium windows with anti-reflective coating typically have IRTs ~0.95-0.97.
RH
Relative humidity expressed as percent. Default value is 50.
PR1
PlanckR1 - a calibration constant for FLIR cameras
PB
PlanckB - a calibration constant for FLIR cameras
PF
PlanckF - a calibration constant for FLIR cameras
PO
PlanckO - a calibration constant for FLIR cameras
PR2
PlanckR2 - a calibration constant for FLIR cameras

Value

  • Returns numeric value. Can handle vector or matrix objects

Details

Note: PR1, PR2, PB, PF, and PO are specific to each camera and result from the calibration at factory of the camera's Raw data signal recording from a blackbody radiation source. Sample calibration constants for three different cameras (FLIR SC660 with 24x18 degree lens, FLIR T300 with 25x19 degree lens, FLIR T300 with 2xtelephoto.

Calibration Constants by cameras: SC660, T300(25o), T300(25o with telephoto) lccc{ Constant FLIR SC660 FLIR T300 FLIR T300(t) PR1: 21106.77 14364.633 14906.216 PB: 1501 1385.4 1396.5 PF: 1 1 1 PO: -7340 -5753 -7261 PR2: 0.012545258 0.010603162 0.010956882 }

PR1: PlanckR1 calibration constant PB: PlanckB calibration constant PF: PlanckF calibration constant PO: PlanckO calibration constant PR2: PlanckR2 calibration constant

The calibration constants allow for the raw digital signal conversion to and from the predicted radiance of a blackbody, using the standard equation:

temperature<-PB/log(PR1/(PR2*(raw+PO))+PF)-273.15

Also used in calculations for transmission loss are the following constants:

ATA1: Atmospheric Trans Alpha 1 0.006569

ATA2: Atmospheric Trans Alpha 2 0.012620

ATB1: Atmospheric Trans Beta 1 -0.002276

ATB2: Atmospheric Trans Beta 2 -0.006670

ATX: Atmospheric Trans X 1.900000

References

1. http://130.15.24.88/exiftool/forum/index.php/topic,4898.60.html

2. Minkina, W. and Dudzik, S. 2009. Infrared Thermography: Errors and Uncertainties. Wiley Press, 192 pp.

See Also

raw2temp

Examples

Run this code
# General Usage:
# temp2raw(temp,E,OD,RTemp,ATemp,IRWTemp,IRT,RH,PR1,PB,PF,PO,PR2)

# Example with all settings at default/blackbody levels:
temp2raw(23,1,0,20,20,20,1,50,PR1=21106.77,PB=1501,PF=1,PO=-7340,PR2=0.012545258)

# Example with emissivity=0.95, distance=1m, window transmission=0.96, all temperatures=20C,
# 50 RH:

temp2raw(23,0.95,1,20,20,20,0.96,50) 
# Note: default calibration constants for my FLIR camera will be used if you leave out the
# calibration data

t<-10:50
r1.0<-temp2raw(t,1,0,20,20,20,0.96,50)
r0.9<-temp2raw(t,0.9,0,20,20,20,0.96,50)

dev.off()
plot(t,r1.0,type="l",col="red")
lines(t,r0.9,col="black")
legend("topleft", bty = "n", c("E=1.0", "E=0.9"), lty=c(1,1), col=c("red", "black"))

Run the code above in your browser using DataLab