Skip to content

Using Calib GEOM parameters in MATLAB

Choose the Matlab camera model in Calib GEOM, complete the calibration, and select Calibration → Export Parameters.

The libCalibGeom documentation includes integration examples, including the MATLAB readCalibParameters helper. Place the helper on your MATLAB path and call:

[intrinsics, extrinsics] = readCalibParameters('calibration.json');

The helper returns one intrinsics and extrinsics structure per camera. It handles the image-coordinate conversion for MATLAB.

libCalibGeom is a separate product and is not included with Calib GEOM. The MATLAB helper reads Calib GEOM's JSON export directly and does not require the libCalibGeom library at runtime.

Compatibility

The helper requires Calib GEOM's Matlab model for every camera. Other models are not interchangeable, even if their parameter names are similar.

Use the parameter export, not a Calib GEOM project file. For unsupported models, consider distortion maps or unprojection maps.

Integration reference

  • ImageSize is [height width].
  • Principal-point coordinates are converted to MATLAB's one-based convention.
  • IntrinsicMatrix uses the traditional transposed layout, including skew.
  • Rotation and translation are returned as 3×1 column vectors.
  • All stored parameter values are preserved, including fixed and disabled values.

The rotation is an angle-scaled axis vector in radians. The extrinsics map from the first camera to the selected camera, not from a target pose to the camera. Check the rotation representation and transform direction expected by the MATLAB function you use.

If your MATLAB workflow does not support nonzero skew, do not discard it: use a compatible workflow or recalibrate with the appropriate constraint. See Exporting calibration parameters for units and coordinate conventions.