Temperature Sensors Overview

Open in ClaudeOpen in ChatGPT

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.

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.

1SensorsData::TemperatureData temperature_data;
2temperature_data = sensor_data.temperature;
3float temperature_left, temperature_right, temperature_imu, temperature_barometer;
4temperature_data.get(SensorsData::TemperatureData::SENSOR_LOCATION::ONBOARD_LEFT, temperature_left);
5temperature_data.get(SensorsData::TemperatureData::SENSOR_LOCATION::ONBOARD_RIGHT, temperature_right);
6temperature_data.get(SensorsData::TemperatureData::SENSOR_LOCATION::IMU, temperature_imu);
7temperature_data.get(SensorsData::TemperatureData::SENSOR_LOCATION::BAROMETER, temperature_barometer);

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

Use the sensor to compensate for temperature drift

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.

1// Global variables
2sl::Camera zed;
3float ref_temp = -273.15f;
4bool temp_ref_udpated=false;
5const float TEMP_THRESHOLD = 10.0f;
6
7
8[...]
9
10// Check the temperature periodically (i.e. each 5 minutes)
11sl::SensorsData sensors_data;
12zed.getSensorsData(sensors_data);
13temp_ref_udpated = temperature_changed(sensors_data);
14if(temp_ref_udpated) {
15 zed.updateSelfCalibration();
16}
17
18[...]
19
20// This is the function to control if the temperature changed with respect to a reference point
21bool temperature_changed(const SensorsData& sensors_data) {
22 float curr_temp;
23 auto temperature_data = sensors_data.temperature;
24
25 // Read the current internal temperature from the IMU sensor.
26 temperature_data.get(sl::SensorsData::TemperatureData::SENSOR_LOCATION::IMU, curr_temp);
27
28 if(fabs(curr_temp - ref_temp) > TEMP_THRESHOLD) {
29 ref_temp = curr_temp;
30 return true;
31 }
32 return false;
33}

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.