# CalibrationMetrics

The CalibrationMetrics message is part of the [Dynamic
Calibration](https://docs.luxonis.com/software-v3/depthai/depthai-components/host_nodes/dynamic_calibration.md) system. It
provides compact numeric scores used to evaluate calibration readiness and confidence.

It is intended for runtime monitoring and automation logic (for example, deciding when to recalibrate or when to trust the current
calibration state).

## Key fields

 * dataConfidence: Score between 0 and 1, describing how good the currently collected calibration data is (usefulness of
   observations).
 * calibrationConfidence: Score between 0 and 1, describing confidence in the current calibration estimate.

Use these metrics together (and compare them against your own baselines/thresholds) when building recalibration policies.

## Examples of functionality

CalibrationMetrics is received on metricsOutput when calibration metrics are computed by the Dynamic Calibration node.

 * [Calibration integration
   example](https://github.com/luxonis/depthai-core/blob/main/examples/python/DynamicCalibration/calibration_integration.py)

## Reference

### dai::CalibrationMetrics

Kind: struct

Final result of running dynamic calibration.

Includes metrics evaluating the reliability of the calibration and the quality of the data used to compute it.

#### double calibrationConfidence

Kind: variable

Confidence score of the computed calibration.

** A normalized value between 0.0 and 1.0 indicating how much you can trust the resulting calibration.

#### double dataConfidence

Kind: variable

Quality score of the input data.

** A normalized value between 0.0 and 1.0 indicating how much you can trust the data.

#### CalibrationMetrics()

Kind: function

#### ~CalibrationMetrics()

Kind: function

#### DatatypeEnum getDatatype()

Kind: function

Get the datatype of this specific message.

return: DatatypeEnum

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

Kind: function

#### DEPTHAI_SERIALIZE(CalibrationMetrics, calibrationConfidence, dataConfidence)

Kind: function

### Need assistance?

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