Class CalibrationHandler

Nested Relationships

Nested Types

Class Documentation

class CalibrationHandler

CalibrationHandler is an interface to read/load/write structured calibration and device data. The following fields are protected and aren’t allowed to be overridden by default:

  • boardName

  • boardRev

  • boardConf

  • hardwareConf

  • batchName

  • batchTime

  • boardOptions

  • productName

Public Functions

CalibrationHandler() = default
explicit CalibrationHandler(std::filesystem::path eepromDataPath, std::optional<bool> validateCalibration = std::nullopt)

Construct a new Calibration Handler object using the eeprom json file created from calibration procedure.

Parameters:
  • eepromDataPath – takes the full path to the json file containing the calibration and device info.

  • validateCalibration – Enable internal check for extrinsics cycling links or dangling references.

CalibrationHandler(std::filesystem::path calibrationDataPath, std::filesystem::path boardConfigPath, std::optional<bool> validateCalibration = std::nullopt)

Construct a new Calibration Handler object using the board config json file and .calib binary files created using gen1 calibration.

Parameters:
  • calibrationDataPath – Full Path to the .calib binary file from the gen1 calibration. (Supports only Version 5)

  • boardConfigPath – Full Path to the board config json file containing device information.

  • validateCalibration – Enable internal check for extrinsics cycling links or dangling references.

explicit CalibrationHandler(EepromData eepromData, std::optional<bool> validateCalibration = std::nullopt)

Construct a new Calibration Handler object from EepromData object.

Parameters:
  • eepromDataEepromData data structure containing the calibration data.

  • validateCalibration – Enable internal check for extrinsics cycling links or dangling references.

dai::EepromData getEepromData() const

Get the Eeprom Data object

Returns:

EepromData object which contains the raw calibration data

bool hasCalibrationData() const

Returns true when calibration payload is supported and contains camera calibration entries.

This check is not presence-only: it returns true only when eepromData.version >= 4 (supported by intrinsics-dependent APIs) and cameraData is non-empty.

bool hasCameraCalibration(CameraBoardSocket cameraId) const

Returns true when calibration is supported and contains data for a specific camera socket.

This is a presence-plus-version-compatibility check. It requires hasCalibrationData() to be true (currently eepromData.version >= 4) and a matching entry for cameraId in cameraData.

std::vector<std::vector<float>> getCameraIntrinsics(CameraBoardSocket cameraId, int resizeWidth = -1, int resizeHeight = -1, Point2f topLeftPixelId = Point2f(), Point2f bottomRightPixelId = Point2f(), bool keepAspectRatio = true) const

Get the Camera Intrinsics object

Matrix representation of intrinsic matrix

\[\begin{split} \text{Intrinsic Matrix} = \left [ \begin{matrix} f_x & 0 & c_x \\ 0 & f_y & c_y \\ 0 & 0 & 1 \end{matrix} \right ] \end{split}\]

Parameters:
  • cameraId – Uses the cameraId to identify which camera intrinsics to return

  • resizewidth – resized width of the image for which intrinsics is requested. resizewidth = -1 represents width is same as default intrinsics

  • resizeHeight – resized height of the image for which intrinsics is requested. resizeHeight = -1 represents height is same as default intrinsics

  • topLeftPixelId – (x, y) point represents the top left corner coordinates of the cropped image which is used to modify the intrinsics for the respective cropped image

  • bottomRightPixelId – (x, y) point represents the bottom right corner coordinates of the cropped image which is used to modify the intrinsics for the respective cropped image

  • keepAspectRatio – Enabling this will scale on width or height depending on which provides the max resolution and crops the remaining part of the other side

Returns:

Represents the 3x3 intrinsics matrix of the respective camera at the requested size and crop dimensions.

std::vector<std::vector<float>> getCameraIntrinsics(CameraBoardSocket cameraId, Size2f destShape, Point2f topLeftPixelId = Point2f(), Point2f bottomRightPixelId = Point2f(), bool keepAspectRatio = true) const

Get the Camera Intrinsics object

Matrix representation of intrinsic matrix

\[\begin{split} \text{Intrinsic Matrix} = \left [ \begin{matrix} f_x & 0 & c_x \\ 0 & f_y & c_y \\ 0 & 0 & 1 \end{matrix} \right ] \end{split}\]

Parameters:
  • cameraId – Uses the cameraId to identify which camera intrinsics to return

  • destShape – resized width and height of the image for which intrinsics is requested.

  • topLeftPixelId – (x, y) point represents the top left corner coordinates of the cropped image which is used to modify the intrinsics for the respective cropped image

  • bottomRightPixelId – (x, y) point represents the bottom right corner coordinates of the cropped image which is used to modify the intrinsics for the respective cropped image

  • keepAspectRatio – Enabling this will scale on width or height depending on which provides the max resolution and crops the remaining part of the other side

Returns:

Represents the 3x3 intrinsics matrix of the respective camera at the requested size and crop dimensions.

std::vector<std::vector<float>> getCameraIntrinsics(CameraBoardSocket cameraId, std::tuple<int, int> destShape, Point2f topLeftPixelId = Point2f(), Point2f bottomRightPixelId = Point2f(), bool keepAspectRatio = true) const

Get the Camera Intrinsics object

Matrix representation of intrinsic matrix

\[\begin{split} \text{Intrinsic Matrix} = \left [ \begin{matrix} f_x & 0 & c_x \\ 0 & f_y & c_y \\ 0 & 0 & 1 \end{matrix} \right ] \end{split}\]

Parameters:
  • cameraId – Uses the cameraId to identify which camera intrinsics to return

  • destShape – resized width and height of the image for which intrinsics is requested.

  • topLeftPixelId – (x, y) point represents the top left corner coordinates of the cropped image which is used to modify the intrinsics for the respective cropped image

  • bottomRightPixelId – (x, y) point represents the bottom right corner coordinates of the cropped image which is used to modify the intrinsics for the respective cropped image

  • keepAspectRatio – Enabling this will scale on width or height depending on which provides the max resolution and crops the remaining part of the other side

Returns:

Represents the 3x3 intrinsics matrix of the respective camera at the requested size and crop dimensions.

std::tuple<std::vector<std::vector<float>>, int, int> getDefaultIntrinsics(CameraBoardSocket cameraId) const

Get the Default Intrinsics object

Matrix representation of intrinsic matrix

\[\begin{split} \text{Intrinsic Matrix} = \left [ \begin{matrix} f_x & 0 & c_x \\ 0 & f_y & c_y \\ 0 & 0 & 1 \end{matrix} \right ] \end{split}\]

Parameters:

cameraId – Uses the cameraId to identify which camera intrinsics to return

Returns:

Represents the 3x3 intrinsics matrix of the respective camera along with width and height at which it was calibrated.

uint32_t getSourceHeight(CameraBoardSocket cameraId) const

Get the source height of the camera from the calibration data.

Parameters:

cameraId – Uses the cameraId to identify which camera source height to return

Returns:

the source height of the camera from the calibration data.

uint32_t getSourceWidth(CameraBoardSocket cameraId) const

Get the source width of the camera from the calibration data.

Parameters:

cameraId – Uses the cameraId to identify which camera source width to return

Returns:

the source width of the camera from the calibration data.

std::vector<float> getDistortionCoefficients(CameraBoardSocket cameraId) const

Get the Distortion Coefficients object

Parameters:

cameraId – Uses the cameraId to identify which distortion Coefficients to return.

Returns:

the distortion coefficients of the requested camera in this order: [k1,k2,p1,p2,k3,k4,k5,k6,s1,s2,s3,s4,τx,τy] for CameraModel::Perspective or [k1, k2, k3, k4] for CameraModel::Fisheye see https://docs.opencv.org/4.5.4/d9/d0c/group__calib3d.html for Perspective model (Rational Polynomial Model) see https://docs.opencv.org/4.5.4/db/d58/group__calib3d__fisheye.html for Fisheye model

float getFov(CameraBoardSocket cameraId, bool useSpec = true) const

Get the Fov of the camera

Parameters:
  • cameraId – of the camera of which we are fetching fov.

  • useSpec – Disabling this bool will calculate the fov based on intrinsics (focal length, image width), instead of getting it from the camera specs

Returns:

field of view of the camera with given cameraId.

uint8_t getLensPosition(CameraBoardSocket cameraId) const

Get the lens position of the given camera

Parameters:

cameraId – of the camera with lens position is requested.

Returns:

lens position of the camera with given cameraId at which it was calibrated.

CameraModel getDistortionModel(CameraBoardSocket cameraId) const

Get the distortion model of the given camera

Parameters:

cameraId – of the camera with lens position is requested.

Returns:

lens position of the camera with given cameraId at which it was calibrated.

std::vector<std::vector<float>> getCameraExtrinsics(CameraBoardSocket srcCamera, CameraBoardSocket dstCamera, bool useSpecTranslation = false, LengthUnit unit = LengthUnit::CENTIMETER) const

Get the Camera Extrinsics object between two cameras from the calibration data if there is a linked connection between any two cameras then the relative rotation and translation is returned by this function.

Matrix representation of transformation matrix

\[\begin{split} \text{Transformation Matrix} = \left [ \begin{matrix} r_{00} & r_{01} & r_{02} & T_x \\ r_{10} & r_{11} & r_{12} & T_y \\ r_{20} & r_{21} & r_{22} & T_z \\ 0 & 0 & 0 & 1 \end{matrix} \right ] \end{split}\]

Parameters:
  • srcCamera – Camera Id of the camera which will be considered as origin.

  • dstCamera – Camera Id of the destination camera to which we are fetching the rotation and translation from the SrcCamera

  • useSpecTranslation – Enabling this bool uses the translation information from the board design data

  • unit – Units of the returned translation (default: centimeters)

Returns:

a transformationMatrix which is 4x4 in homogeneous coordinate system

std::vector<std::vector<float>> getHousingCalibration(CameraBoardSocket srcCamera, const HousingCoordinateSystem housingCS, bool useSpecTranslation = false, LengthUnit unit = LengthUnit::CENTIMETER) const

Get the transformation matrix between a camera and a chosen housing coordinate system. The returned 4x4 homogeneous transformation matrix maps points from the camera’s coordinate system into the specified housing coordinate system.

The transformation consists of a rotation matrix and translation vector extracted either from the calibration data or from the board design (specification) data, depending on the useSpecTranslation flag.

Matrix representation of the transformation:

\[\begin{split} \text{Transformation Matrix} = \left[ \begin{matrix} r_{00} & r_{01} & r_{02} & T_x \\ r_{10} & r_{11} & r_{12} & T_y \\ r_{20} & r_{21} & r_{22} & T_z \\ 0 & 0 & 0 & 1 \end{matrix} \right] \end{split}\]

Parameters:
  • srcCamera – Camera whose coordinate frame will be treated as the origin.

  • housingCS – The housing coordinate system to which the camera transformation is requested (e.g. VESA_RIGHT, FRONT_COVER_LEFT, etc.).

  • useSpecTranslation – If true, uses board-design (spec) translation values. If false, uses calibrated translation values.

  • unit – Units of the returned translation (default: centimeters)

Returns:

A 4x4 homogeneous transformation matrix.

std::vector<float> getCameraTranslationVector(CameraBoardSocket srcCamera, CameraBoardSocket dstCamera, bool useSpecTranslation = true, LengthUnit unit = LengthUnit::CENTIMETER) const

Get the Camera translation vector between two cameras from the calibration data.

Parameters:
  • srcCamera – Camera Id of the camera which will be considered as origin.

  • dstCamera – Camera Id of the destination camera to which we are fetching the translation vector from the SrcCamera

  • useSpecTranslation – Disabling this bool uses the translation information from the calibration data (not the board design data)

  • unit – Units of the returned translation (default: centimeters)

Returns:

a translation vector like [x, y, z]

std::vector<std::vector<float>> getCameraRotationMatrix(CameraBoardSocket srcCamera, CameraBoardSocket dstCamera) const

Get the Camera rotation matrix between two cameras from the calibration data.

Parameters:
  • srcCamera – Camera Id of the camera which will be considered as origin.

  • dstCamera – Camera Id of the destination camera to which we are fetching the rotation vector from the SrcCamera

Returns:

a 3x3 rotation matrix Matrix representation of rotation matrix

\[\begin{split} \text{Rotation Matrix} = \left [ \begin{matrix} r_{00} & r_{01} & r_{02}\\ r_{10} & r_{11} & r_{12}\\ r_{20} & r_{21} & r_{22}\\ \end{matrix} \right ] \end{split}\]

float getBaselineDistance(CameraBoardSocket cam1 = CameraBoardSocket::CAM_C, CameraBoardSocket cam2 = CameraBoardSocket::CAM_B, bool useSpecTranslation = true, LengthUnit unit = LengthUnit::CENTIMETER) const

Get the baseline distance between two specified cameras. By default it will get the baseline between CameraBoardSocket.RIGHT and CameraBoardSocket.LEFT.

Parameters:
  • cam1 – First camera

  • cam2 – Second camera

  • useSpecTranslation – Enabling this bool uses the translation information from the board design data (not the calibration data)

  • unit – Units of the returned baseline distance (default: centimeters)

Returns:

baseline distance

std::vector<std::vector<float>> getCameraToImuExtrinsics(CameraBoardSocket cameraId, bool useSpecTranslation = false, LengthUnit unit = LengthUnit::CENTIMETER) const

Get the Camera To Imu Extrinsics object From the data loaded if there is a linked connection between IMU and the given camera then there relative rotation and translation from the camera to IMU is returned.

Matrix representation of transformation matrix

\[\begin{split} \text{Transformation Matrix} = \left [ \begin{matrix} r_{00} & r_{01} & r_{02} & T_x \\ r_{10} & r_{11} & r_{12} & T_y \\ r_{20} & r_{21} & r_{22} & T_z \\ 0 & 0 & 0 & 1 \end{matrix} \right ] \end{split}\]

Parameters:
  • cameraId – Camera Id of the camera which will be considered as origin. from which Transformation matrix to the IMU will be found

  • useSpecTranslation – Enabling this bool uses the translation information from the board design data

  • unit – Units of the returned translation (default: centimeters)

Returns:

Returns a transformationMatrix which is 4x4 in homogeneous coordinate system

std::vector<std::vector<float>> getImuToCameraExtrinsics(CameraBoardSocket cameraId, bool useSpecTranslation = false, LengthUnit unit = LengthUnit::CENTIMETER) const

Get the Imu To Camera Extrinsics object from the data loaded if there is a linked connection between IMU and the given camera then there relative rotation and translation from the IMU to Camera is returned.

Matrix representation of transformation matrix

\[\begin{split} \text{Transformation Matrix} = \left [ \begin{matrix} r_{00} & r_{01} & r_{02} & T_x \\ r_{10} & r_{11} & r_{12} & T_y \\ r_{20} & r_{21} & r_{22} & T_z \\ 0 & 0 & 0 & 1 \end{matrix} \right ] \end{split}\]

Parameters:
  • cameraId – Camera Id of the camera which will be considered as destination. To which Transformation matrix from the IMU will be found.

  • useSpecTranslation – Enabling this bool uses the translation information from the board design data

  • unit – Units of the returned translation (default: centimeters)

Returns:

Returns a transformationMatrix which is 4x4 in homogeneous coordinate system

std::vector<std::vector<float>> getStereoRightRectificationRotation() const

Get the Stereo Right Rectification Rotation object

Returns:

returns a 3x3 rectification rotation matrix

std::vector<std::vector<float>> getStereoLeftRectificationRotation() const

Get the Stereo Left Rectification Rotation object

Returns:

returns a 3x3 rectification rotation matrix

dai::CameraBoardSocket getStereoLeftCameraId() const

Get the camera id of the camera which is used as left camera of the stereo setup

Returns:

cameraID of the camera used as left camera

dai::CameraBoardSocket getStereoRightCameraId() const

Get the camera id of the camera which is used as right camera of the stereo setup

Returns:

cameraID of the camera used as right camera

std::vector<std::vector<float>> getAccelerometerCalibration() const

Get canonical accelerometer calibration matrix [Q|b].

The linear transform Q is dimensionless. The bias column b is stored in SI units of [m/s^2].

Returns:

returns 3x4 matrix in the form [[q00, q01, q02, b0], [q10, q11, q12, b1], [q20, q21, q22, b2]]

std::vector<std::vector<float>> getGyroscopeCalibration() const

Get canonical gyroscope calibration matrix [Q|b].

The linear transform Q is dimensionless. The bias column b is stored in SI units of [rad/s].

Returns:

returns 3x4 matrix in the form [[q00, q01, q02, b0], [q10, q11, q12, b1], [q20, q21, q22, b2]]

dai::ImuNoiseParameters getImuNoiseParameters() const

Get complete IMU noise parameters.

Accelerometer noise terms are stored in [m/s^2]-based units. Gyroscope noise terms are stored in [rad/s]-based units.

Returns:

returns IMU noise parameters

dai::ImuCalibrationParams getImuParameters() const

Get full IMU parameter payload.

Accelerometer calibration bias terms are stored in [m/s^2]. Gyroscope calibration bias terms are stored in [rad/s].

Returns:

returns IMU parameters containing noise + calibration matrices

bool eepromToJsonFile(std::filesystem::path destPath) const

Write raw calibration/board data to json file.

Parameters:

destPath – Full path to the json file in which raw calibration data will be stored

Returns:

True on success, false otherwise

nlohmann::json eepromToJson() const

Get JSON representation of calibration data

Returns:

JSON structure

void setBoardInfo(std::string boardName, std::string boardRev)

Set the Board Info object

Parameters:
  • version – Sets the version of the Calibration data(Current version is 6)

  • boardName – Sets your board name.

  • boardRev – set your board revision id.

void setBoardInfo(std::string productName, std::string boardName, std::string boardRev, std::string boardConf, std::string hardwareConf, std::string batchName, uint64_t batchTime, uint32_t boardOptions, std::string boardCustom = "")

Set the Board Info object. Creates version 7 EEPROM data

Parameters:
  • productName – Sets product name (alias).

  • boardName – Sets board name.

  • boardRev – Sets board revision id.

  • boardConf – Sets board configuration id.

  • hardwareConf – Sets hardware configuration id.

  • batchName – Sets batch name.

  • batchTime – Sets batch time (unix timestamp).

  • boardCustom – Sets a custom board (Default empty string).

void setBoardInfo(std::string deviceName, std::string productName, std::string boardName, std::string boardRev, std::string boardConf, std::string hardwareConf, std::string batchName, uint64_t batchTime, uint32_t boardOptions, std::string boardCustom = "")

Set the Board Info object. Creates version 7 EEPROM data

Parameters:
  • deviceName – Sets device name.

  • productName – Sets product name (alias).

  • boardName – Sets board name.

  • boardRev – Sets board revision id.

  • boardConf – Sets board configuration id.

  • hardwareConf – Sets hardware configuration id.

  • batchName – Sets batch name. Not supported anymore

  • batchTime – Sets batch time (unix timestamp).

  • boardCustom – Sets a custom board (Default empty string).

void setDeviceName(std::string deviceName)

Set the deviceName which responses to getDeviceName of Device

Parameters:

deviceName – Sets device name.

void setProductName(std::string productName)

Set the productName which acts as alisas for users to identify the device

Parameters:

productName – Sets product name (alias).

void setCameraIntrinsics(CameraBoardSocket cameraId, std::vector<std::vector<float>> intrinsics, Size2f frameSize)

Set the Camera Intrinsics object

Matrix representation of intrinsic matrix

\[\begin{split} \text{Intrinsic Matrix} = \left [ \begin{matrix} f_x & 0 & c_x \\ 0 & f_y & c_y \\ 0 & 0 & 1 \end{matrix} \right ] \end{split}\]

Parameters:
  • cameraId – CameraId of the camera for which Camera intrinsics are being loaded

  • intrinsics – 3x3 intrinsics matrix

  • frameSize – Represents the width and height of the image at which intrinsics are calculated.

void setCameraIntrinsics(CameraBoardSocket cameraId, std::vector<std::vector<float>> intrinsics, int width, int height)

Set the Camera Intrinsics object

Matrix representation of intrinsic matrix

\[\begin{split} \text{Intrinsic Matrix} = \left [ \begin{matrix} f_x & 0 & c_x \\ 0 & f_y & c_y \\ 0 & 0 & 1 \end{matrix} \right ] \end{split}\]

Parameters:
  • cameraId – CameraId of the camera for which Camera intrinsics are being loaded

  • intrinsics – 3x3 intrinsics matrix

  • width – Represents the width of the image at which intrinsics are calculated.

  • height – Represents the height of the image at which intrinsics are calculated.

void setCameraIntrinsics(CameraBoardSocket cameraId, std::vector<std::vector<float>> intrinsics, std::tuple<int, int> frameSize)

Set the Camera Intrinsics object

Matrix representation of intrinsic matrix

\[\begin{split} \text{Intrinsic Matrix} = \left [ \begin{matrix} f_x & 0 & c_x \\ 0 & f_y & c_y \\ 0 & 0 & 1 \end{matrix} \right ] \end{split}\]

Parameters:
  • cameraId – CameraId of the camera for which Camera intrinsics are being loaded

  • intrinsics – 3x3 intrinsics matrix

  • frameSize – Represents the width and height of the image at which intrinsics are calculated.

void setDistortionCoefficients(CameraBoardSocket cameraId, std::vector<float> distortionCoefficients)

Sets the distortion Coefficients obtained from camera calibration

Parameters:
  • cameraId – Camera Id of the camera for which distortion coefficients are computed

  • distortionCoefficients – Distortion Coefficients of the respective Camera.

void setFov(CameraBoardSocket cameraId, float hfov)

Set the Fov of the Camera

Parameters:
  • cameraId – Camera Id of the camera

  • hfov – Horizontal fov of the camera from Camera Datasheet

void setLensPosition(CameraBoardSocket cameraId, uint8_t lensPosition)

Sets the distortion Coefficients obtained from camera calibration

Parameters:
  • cameraId – Camera Id of the camera

  • lensPosition – lens posiotion value of the camera at the time of calibration

void setCameraType(CameraBoardSocket cameraId, CameraModel cameraModel)

Set the Camera Type object

Parameters:
  • cameraId – CameraId of the camera for which cameraModel Type is being updated.

  • cameraModel – Type of the model the camera represents

void setCameraExtrinsics(CameraBoardSocket srcCameraId, CameraBoardSocket destCameraId, std::vector<std::vector<float>> rotationMatrix, std::vector<float> translation, std::vector<float> specTranslation = {0, 0, 0})

Set the Camera Extrinsics object

Parameters:
  • srcCameraId – Camera Id of the camera which will be considered as relative origin.

  • destCameraId – Camera Id of the camera which will be considered as destination from srcCameraId.

  • rotationMatrix – Rotation between srcCameraId and destCameraId origins.

  • translation – Translation between srcCameraId and destCameraId origins.

  • specTranslation – Translation between srcCameraId and destCameraId origins from the design.

void setImuExtrinsics(CameraBoardSocket destCameraId, std::vector<std::vector<float>> rotationMatrix, std::vector<float> translation, std::vector<float> specTranslation = {0, 0, 0})

Set the Imu to Camera Extrinsics object

Parameters:
  • destCameraId – Camera Id of the camera which will be considered as destination from IMU.

  • rotationMatrix – Rotation between srcCameraId and destCameraId origins.

  • translation – Translation between IMU and destCameraId origins.

  • specTranslation – Translation between IMU and destCameraId origins from the design.

void setStereoLeft(CameraBoardSocket cameraId, std::vector<std::vector<float>> rectifiedRotation)

Set the Stereo Left Rectification object

Homography of the Left Rectification = Intrinsics_right * rectifiedRotation * inv(Intrinsics_left)

Parameters:
  • cameraId – CameraId of the camera which will be used as left Camera of stereo Setup

  • rectifiedRotation – Rectification rotation of the left camera required for feature matching

void setStereoRight(CameraBoardSocket cameraId, std::vector<std::vector<float>> rectifiedRotation)

Set the Stereo Right Rectification object

Homography of the Right Rectification = Intrinsics_right * rectifiedRotation * inv(Intrinsics_right)

Parameters:
  • cameraId – CameraId of the camera which will be used as left Camera of stereo Setup

  • rectifiedRotation – Rectification rotation of the left camera required for feature matching

bool validateCameraArray() const

Using left camera as the head it iterates over the camera extrinsics connection to check if all the camera extrinsics are connected and no loop exists.

Returns:

true on proper connection with no loops.

void setAccelerometerCalibration(const std::vector<std::vector<float>> &calibration)

Set canonical accelerometer calibration [Q|b].

Parameters:

calibration – 3x4 matrix in the form [[q00, q01, q02, b0], [q10, q11, q12, b1], [q20, q21, q22, b2]]

void setGyroscopeCalibration(const std::vector<std::vector<float>> &calibration)

Set canonical gyroscope calibration [Q|b].

Parameters:

calibration – 3x4 matrix in the form [[q00, q01, q02, b0], [q10, q11, q12, b1], [q20, q21, q22, b2]]

void setImuParameters(const ImuCalibrationParams &params)

Set full IMU parameter payload.

Parameters:

params – noise + accelerometer + gyroscope calibration parameters

void validateCalibrationHandler(bool throwOnError = true) const

Validate Calibration handler properties and how they are set, so there is no:

  • Cycling links

  • Missing links

  • Dangling connections

Parameters:

throwOnError – Throw runtime error on failture.

dai::CameraBoardSocket getCameraWithLowestId() const

Get the lowest camera socket

Returns:

the lowest camera socket

Public Static Functions

static CalibrationHandler fromJson(nlohmann::json eepromDataJson, std::optional<bool> validateCalibration = std::nullopt)

Construct a new Calibration Handler object from JSON EepromData.

Parameters:
  • eepromDataJsonEepromData as JSON

  • validateCalibration – Enable internal check for extrinsics cycling links or dangling references.

Protected Functions

LengthUnit getEepromTranslationUnits() const

Protected Static Attributes

static constexpr LengthUnit eepromTranslationUnits = LengthUnit::CENTIMETER