Multi-Camera Calibration

APIs for computing the relative poses of multiple Zivid cameras so their point clouds can be merged into a single coordinate frame. See Multi-Camera Calibration Tutorial for the full tutorial.

        %%{init: {'themeVariables': {'fontSize': '18px'}, 'flowchart': {'nodeSpacing': 30, 'rankSpacing': 35}}}%%
flowchart LR
  subgraph detect [For each camera]
    Camera
    detectOp(["detectCalibrationBoard()"])
    DetectionResult
    Camera -.-> detectOp --> DetectionResult
  end

  calibrateOp(["calibrateMultiCamera()"])
  MultiCameraOutput
  transformsOp(["transforms()"])
  residualsOp(["residuals()"])
  Matrix4x4["[Matrix4x4]"]
  MultiCameraResidual["[MultiCameraResidual]"]

  DetectionResult -.-> calibrateOp --> MultiCameraOutput
  MultiCameraOutput --> transformsOp --> Matrix4x4
  MultiCameraOutput --> residualsOp --> MultiCameraResidual

  classDef zividClass fill:#4A8FA4,stroke:#34323D,color:#FFFFFF
  classDef api fill:#91D2C8,stroke:#4A8FA4,color:#000000
  class Camera,DetectionResult,MultiCameraOutput,Matrix4x4,MultiCameraResidual zividClass
  class detectOp,calibrateOp,transformsOp,residualsOp api
    

detectCalibrationBoard

Detect the Zivid calibration board in a frame from each camera. Collect one DetectionResult per camera (primary camera first) before calling calibrateMultiCamera.

See detectCalibrationBoard on the Hand-Eye Calibration page for the full API.

calibrateMultiCamera

Computes a transform for each camera that maps its points into the coordinate frame of the primary camera (index 0).

MultiCameraOutputcalibrateMultiCamera( stdvectorDetectionResult detectionResultsconst::<>&)

Performs multi-camera calibration.

Multi-camera calibration is used in a multi-camera setup to find the pose of secondary cameras in the frame of a designated primary camera, e.g. to combine points clouds into a single frame of reference.

The input is generated by imaging the same checkerboard from each camera and inserting the resulting frame into Zivid::Calibration::detectCalibrationBoard(const Zivid::Frame &frame). Add the resulting DetectionResult objects to a vector with the first element corresponding to the primary camera.

The returned object contains a vector of transforms, which provides the pose of camera[i] in the frame of camera[0]. Apply transform[i] to the points from camera[i] to get the same points in the frame of camera[0]. The returned object also contains a vector of residuals corresponding to each transform.

パラメータ:

detectionResults -- Vector of DetectionResult instances.

戻り値:

A MultiCameraOutput instance.

Calibratorclass

Public Static Functions

static MultiCameraOutput ^ CalibrateMultiCamera (System::Collections::Generic::IEnumerable< DetectionResult ^> ^ detectionResults)

Performs multi-camera calibration.

Multi-camera calibration is used in a multi-camera setup to find the pose of secondary cameras in the frame of a designated primary camera, e.g. to combine points clouds into a single frame of reference.

The input is generated by imaging the same calibration board from each camera and inserting the resulting point clouds into Detector. Add the resulting DetectionResult objects to a sequence with the first element corresponding to the primary camera.

The returned object contains an array of transforms, which provides the pose of camera[i] in the frame of camera[0]. Apply transform[i] to the points from camera[i] to get the same points in the frame of camera[0]. The returned object also contains an array of residuals corresponding to each transform.

パラメータ:

detectionResults -- List of DetectionResult instances

戻り値:

Instance of MultiCameraOutput

calibrate_multi_camera(
:list[DetectionResult]detection_results ,
) → MultiCameraOutput

Perform multi-camera calibration.

パラメータ:

detection_results -- List of DetectionResult, one for each camera

戻り値:

A MultiCameraOutput instance

MultiCameraOutput

Result of a multi-camera calibration. Provides a vector of 4×4 transform matrices (one per camera, identity for the primary) and corresponding residuals.

MultiCameraOutputclass

The results from a multi-camera calibration process.

Public Functions

MultiCameraOutput( stdvectorMatrix4x4 transformsconst::<>&, stdvectorMultiCameraResidual residualsconst::<>&)

Constructs a MultiCameraOutput instance.

パラメータ:
  • transforms -- Vector of transforms for each camera.

  • residuals -- Vector of multi-camera residuals for each camera.

valid()constbool

Test if MultiCameraOutput is valid.

戻り値:

True if MultiCameraOutput is valid.

operatorbool()constexplicit

Test if MultiCameraOutput is valid.

戻り値:

True if MultiCameraOutput is valid.

stdvectorMatrix4x4 transforms()constconst::<>&

Multi-camera calibration transforms.

戻り値:

Vector of affine transformations in the form of 4x4 matrices.

stdvectorMultiCameraResidual residuals()constconst::<>&

Multi-camera calibration residuals.

The residuals provide a measure of the overlap error that can be expected when transforming point clouds to the coordinate system of the primary camera.

The residual for each camera is calculated by applying each transform to the corresponding feature points used in the calibration process. The points are then compared with the feature points of the primary camera, and the average error between the two is calculated. By definition the first residual will therefore always be zero.

戻り値:

Vector of multi-camera calibration residuals.

stdstringtoString()const::

Get string representation of the multi-camera calibration output.

戻り値:

Calibration output as string

MultiCameraOutputclass

Public Functions

Valid()bool

Test if MultiCameraOutput is valid.

戻り値:

True if MultiCameraOutput is valid

cli::array< ManagedArray2D ^> ^ Transforms ()

Multi-camera calibration transforms.

戻り値:

Array of affine transformations in the form of 4x4 matrices.

cli::array< MultiCameraResidual ^> ^ Residuals ()

Multi-camera calibration residuals.

The residuals provide a measure of the overlap error that can be expected when transforming point clouds to the coordinate system of the primary camera.

The residual for each camera is calculated by applying each transform to the corresponding feature points used in the calibration process. The points are then compared with the feature points of the primary camera, and the average error between the two is calculated. By definition the first residual will therefore always be zero.

戻り値:

Array of multi-camera calibration residuals.

System::String ^ ToString () override

Get string representation of the multi-camera calibration output.

戻り値:

Multi-camera calibration output as string

Public Static Functions

static  operator bool (MultiCameraOutput ^ output)

Test if MultiCameraOutput is valid.

戻り値:

True if MultiCameraOutput is valid

classMultiCameraOutput(impl)

Class representing the result of a multi-camera calibration process.

Initialization

Initialize MultiCameraOutput wrapper.

This constructor is only used internally, and should not be called by the end-user.

パラメータ:

impl -- Reference to internal/back-end instance.

例外:

TypeError -- If argument does not match the expected internal class.

valid() → bool

Check validity of MultiCameraOutput.

戻り値:

True if MultiCameraOutput is valid

transforms() → listndarray[]

Get multi-camera calibration transforms.

戻り値:

List of 4x4 arrays, one for each camera

residuals() → listMultiCameraResidual[]

Get multi-camera calibration residuals.

戻り値:

List of MultiCameraResidual instances, one for each camera

MultiCameraResidual

Per-camera overlap error in mm. The residual for the primary camera (index 0) is always zero by definition.

MultiCameraResidualclass

Representation of the estimated errors of a multi-camera calibration.

Public Functions

MultiCameraResidual( floattranslation)

Constructs a multi-camera residual instance.

パラメータ:

translation -- Average overlap error in millimeters.

translation()constfloat

Get the average overlap error.

戻り値:

Average overlap error in millimeters.

stdstringtoString()const::

Get string representation of the multi-camera residual.

戻り値:

Multi-camera residual as string

MultiCameraResidualclass

Representaton of the estimated errors of a multi-camera calibration.

Public Functions

Translation()float

Get the average overlap error.

戻り値:

Average overlap error in millimeters.

System::String ^ ToString () override

Get string representation of the multi-camera residual.

戻り値:

Multi-camera residual as string

classMultiCameraResidual(impl)

Class representing the estimated errors of a multi-camera calibration.

Initialization

Initialize MultiCameraResidual wrapper.

This constructor is only used internally, and should not be called by the end-user.

パラメータ:

impl -- Reference to internal/back-end instance.

例外:

TypeError -- If argument does not match the expected internal class.

translation() → float

Get the average overlap error.

戻り値:

Average overlap error in millimeters

See also