Temperature Sensors Overview

According to the model of the ZED Camera you are using, you can access different temperature information from sensors located in various areas of the PCB. These sensors monitor the thermal state of different components on the board and adjust their calibration parameters if necessary.

📌 Note: the ZED Mini camera has no temperature sensors onboard.

Output Data #

The following temperature information is accessible from the camera sensor stack:

Output DataDescriptionUnitsMax FrequencyNote
Left Image SensorTemperature measured by the onboard temperature sensor located next to the Left Image Sensor°C25 HzOnly ZED 2i
Right Image SensorTemperature measured by the onboard temperature sensor located next to the Right Image Sensor°C25 HzOnly ZED 2i
IMUTemperature measured by the sensor available inside the IMU°C400 Hz---
BAROMETERTemperature measured by the sensor available inside the Barometer°C50 HzOnly ZED 2i

Using the API #

To access the temperature measurements of these sensors, use the code below.

SensorsData::TemperatureData temperature_data;
temperature_data = sensor_data.temperature;
float temperature_left, temperature_right, temperature_imu, temperature_barometer;
temperature_data.get(SensorsData::TemperatureData::SENSOR_LOCATION::ONBOARD_LEFT, temperature_left);
temperature_data.get(SensorsData::TemperatureData::SENSOR_LOCATION::ONBOARD_RIGHT, temperature_right);
temperature_data.get(SensorsData::TemperatureData::SENSOR_LOCATION::IMU, temperature_imu);
temperature_data.get(SensorsData::TemperatureData::SENSOR_LOCATION::BAROMETER, temperature_barometer);
temperature_data = sl.SensorsData.TemperatureData()
temperature_data = sensor_data.temperature
temperature_left = temperature_data.get(sl.SensorsData.TemperatureData.SENSOR_LOCATION.ONBOARD_LEFT)
temperature_right = temperature_data.get(sl.SensorsData.TemperatureData.SENSOR_LOCATION.ONBOARD_RIGHT)
temperature_imu = temperature_data.get(sl.SensorsData.TemperatureData.SENSOR_LOCATION.IMU)
temperature_barometer = temperature_data.get(sl.SensorsData.TemperatureData.SENSOR_LOCATION.BAROMETER)
TemperatureData temperature_data = new TemperatureData();
temperature_data = sensor_data.get_temperature_data();
float temperature_left, temperature_right, temperature_imu, temperature_barometer;
temperature_left = sensors_data.temperatureSensor.onboard_left_temp;
temperature_right = sensors_data.temperatureSensor.onboard_right_temp;
temperature_imu = sensor_data.temperatureSensor.imu_temp;
temperature_barometer = sensor_data.temperatureSensor.barometer_temp;

📌 Note: in case the temperature sensor is not available, a NaN value is returned.

Use the sensor to compensate for temperature drift #

📌 Note: This guide does not apply to the ZED Mini model as it lacks onboard temperature sensors.

When the ZED SDK opens the camera, it performs a quick self-calibration procedure to compensate for minor optical changes due to temperature variations or strong vibrations, which can affect stereo calibration accuracy.

If the camera is used for extended periods of time, internal temperature changes may occur, requiring a new self-calibration to maintain accurate stereo calibration.

You can use the temperature sensor measurements to monitor the internal temperature and trigger a new self-calibration by calling the API function updateSelfCalibration.

// Global variables
sl::Camera zed;
float ref_temp = -273.15f;
bool temp_ref_udpated=false;
const float TEMP_THRESHOLD = 10.0f;


[...]

// Check the temperature periodically (i.e. each 5 minutes)
sl::SensorsData sensors_data;
zed.getSensorsData(sensors_data);
temp_ref_udpated = temperature_changed(sensors_data);
if(temp_ref_udpated) {
    zed.updateSelfCalibration();
}

[...]

// This is the function to control if the temperature changed with respect to a reference point
bool temperature_changed(const SensorsData& sensors_data) {
    float curr_temp;
    auto temperature_data = sensors_data.temperature;

    // Read the current internal temperature from the IMU sensor.
    temperature_data.get(sl::SensorsData::TemperatureData::SENSOR_LOCATION::IMU, curr_temp);

    if(fabs(curr_temp - ref_temp) > TEMP_THRESHOLD) {
        ref_temp = curr_temp;
        return true;
    }
    return false;
}

zed = sl.Camera()
ref_temp = -273.15
temp_ref_updated = False
TEMP_THRESHOLD = 10.0

[...]

# Check the temperature periodically (i.e. each 5 minutes)
sensors_data = sl.SensorsData()
zed.get_sensors_data(sensors_data, sl.TIME_REFERENCE.CURRENT)
temp_ref_updated = temperature_changed(sensors_data)
if temp_ref_updated:
  zed.update_self_calibration()

[...]

def temperature_changed(sensor_data):
  temperature_data = sensor_data.get_temperature_data()
  curr_temp = temperature_data.get(sl.SENSOR_LOCATION.IMU)
  if abs(curr_temp - ref_temp > TEMP_THRESHOLD) > 0:
    ref_temp = curr_temp
    return True
  return False

sl.Camera zed = new sl.Camera(0);
float refTemp = -273.15f;
bool tempRefUpdated = false;
float TEMP_THRESHOLD = 10.0f;

[...]

// Check the temperature periodically (i.e. each 5 minutes)
sl.SensorsData sensorsData = new sl.SensorsData();
zed.GetSensorsData(ref sensorsData, TIME_REFERENCE.CURRENT);
tempRefUpdated = TemperatureChanged(ref sensorsData);
if (tempRefUpdated)
{
  zed.UpdateSelfCalibration();
}

[...]

// This is the function to control if the temperature changed with respect to a reference point
bool TemperatureChanged(ref SensorsData sensorsData)
{
  var temperatureData = sensorsData.temperatureSensor;
  float currTemp = temperatureData.imu_temp;
  if (Math.Abs(currTemp - refTemp) > TEMP_THRESHOLD)
  {
    refTemp = currTemp;
    return true;
  } 
  return false;
}

📌 Warning: If your code internally uses the intrinsic and extrinsic parameters of the camera, ensure you use the temp_ref_udpated variable and update them after the next grab using the getCameraInformation function.