# ThermalConfig

The ThermalConfig message is used to configure the
[Thermal](https://docs.luxonis.com/software-v3/depthai/depthai-components/nodes/thermal.md) node.
It allows runtime control over thermal imaging parameters, flat field correction (FFC), ambient parameters, gain modes,
brightness, contrast and denoising algorithms.

You can send this message dynamically via the node's inputConfig input queue to update parameters while streaming.

## Examples of functionality

 * [Thermal](https://docs.luxonis.com/software-v3/depthai/examples/rvc2/thermal/thermal.md)

## Reference

### dai::ThermalConfig

Kind: class

ThermalConfig message. Currently unused.

#### dai::ThermalConfig::ThermalAmbientParams

Kind: struct

Ambient factors that affect the temperature measurement of a Thermal sensor.

##### std::optional< uint16_t > distance

Kind: variable

Distance to the measured object. unit:cnt(128cnt=1m), range:0-25600(0-200m)

##### std::optional< uint16_t > reflectionTemperature

Kind: variable

Reflection temperature. unit:K, range:230-500(high gain), 230-900(low gain)

##### std::optional< uint16_t > atmosphericTemperature

Kind: variable

Atmospheric temperature. unit:K, range:230-500(high gain), 230-900(low gain)

##### std::optional< uint8_t > targetEmissivity

Kind: variable

Emissivity. unit:1/128, range:1-128(0.01-1)

##### std::optional< uint8_t > atmosphericTransmittance

Kind: variable

Atmospheric transmittance. unit:1/128, range:1-128(0.01-1)

##### std::optional< ThermalGainMode > gainMode

Kind: variable

Gain mode, low or high.

##### DEPTHAI_SERIALIZE(ThermalAmbientParams, distance, reflectionTemperature, atmosphericTemperature, targetEmissivity,
atmosphericTransmittance, gainMode)

Kind: function

#### dai::ThermalConfig::ThermalFFCParams

Kind: struct

##### std::optional< bool > autoFFC

Kind: variable

Auto Flat-Field-Correction. Controls wheather the shutter is controlled by the sensor module automatically or not.

##### std::optional< uint16_t > minFFCInterval

Kind: variable

Minimum FFC interval when auto FFC is enabled. The time interval between two FFC should not be less than this value.

##### std::optional< uint16_t > maxFFCInterval

Kind: variable

Maximum FFC interval when auto FFC is enabled. The time interval between two FFC should not be more than this value.

##### std::optional< uint16_t > autoFFCTempThreshold

Kind: variable

Auto FFC trigger threshold. The condition for triggering the auto FFC is that the change of Vtemp value exceeds a certain
threshold, which is called the Auto FFC trigger threshold.

##### std::optional< bool > fallProtection

Kind: variable

The shutter blade may open/close abnormally during strong mechanical shock (such as fall), and a monitoring process is designed in
the firmware to correct the abnormal shutter switch in time. Turn on or off the fall protect mechanism.

##### std::optional< uint16_t > minShutterInterval

Kind: variable

Frequent FFC will cause shutter heating, resulting in abnormal FFC effect and abnormal temperature measurement. Regardless of
which mechanism triggers FFC, the minimum trigger interval must be limited.

##### std::optional< bool > closeManualShutter

Kind: variable

Set this to True/False to close/open the shutter when autoFFC is disabled.

##### std::optional< uint16_t > antiFallProtectionThresholdHighGainMode

Kind: variable

##### std::optional< uint16_t > antiFallProtectionThresholdLowGainMode

Kind: variable

##### DEPTHAI_SERIALIZE(ThermalFFCParams, autoFFC, minFFCInterval, maxFFCInterval, autoFFCTempThreshold, fallProtection,
minShutterInterval, closeManualShutter, antiFallProtectionThresholdHighGainMode, antiFallProtectionThresholdLowGainMode)

Kind: function

#### dai::ThermalConfig::ThermalImageParams

Kind: struct

##### std::optional< uint8_t > timeNoiseFilterLevel

Kind: variable

0-3. Time noise filter level. Filters out the noise that appears over time.

##### std::optional< uint8_t > spatialNoiseFilterLevel

Kind: variable

0-3. Spatial noise filter level.

##### std::optional< uint8_t > digitalDetailEnhanceLevel

Kind: variable

0-4 Digital etail enhance level.

##### std::optional< uint8_t > brightnessLevel

Kind: variable

Image brightness level, 0-255.

##### std::optional< uint8_t > contrastLevel

Kind: variable

Image contrast level, 0-255.

##### std::optional< ThermalImageOrientation > orientation

Kind: variable

Orientation of the image. Computed on the sensor.

##### DEPTHAI_SERIALIZE(ThermalImageParams, timeNoiseFilterLevel, spatialNoiseFilterLevel, digitalDetailEnhanceLevel,
brightnessLevel, contrastLevel, orientation)

Kind: function

#### ThermalImageOrientation

Kind: enum

Orientation of the image.

##### Normal

Kind: enum_value

##### Mirror

Kind: enum_value

##### Flip

Kind: enum_value

##### MirrorFlip

Kind: enum_value

#### ThermalGainMode

Kind: enum

Thermal sensor gain mode. Use low gain in high energy environments.

##### LOW

Kind: enum_value

##### HIGH

Kind: enum_value

#### ThermalAmbientParams ambientParams

Kind: variable

Ambient factors that affect the temperature measurement of a Thermal sensor.

#### ThermalFFCParams ffcParams

Kind: variable

Parameters for Flat-Field-Correction.

#### ThermalImageParams imageParams

Kind: variable

Image signal processing parameters on the sensor.

#### ThermalConfig()

Kind: function

Construct ThermalConfig message.

#### ~ThermalConfig()

Kind: function

#### void serialize(std::vector< std::uint8_t > & metadata, DatatypeEnum & datatype)

Kind: function

#### DatatypeEnum getDatatype()

Kind: function

Get the datatype of this specific message.

return: DatatypeEnum

#### DEPTHAI_SERIALIZE(ThermalConfig, ambientParams, ffcParams, imageParams)

Kind: function

### Need assistance?

Head over to [Discussion Forum](https://discuss.luxonis.com/) for technical support or any other questions you might have.
