Skip to content
  • There are no suggestions because the search field is empty.

Importing Custom Calibrations

This guide explains how to provide camera intrinsics and extrinsics in the OpenCV-compatible YAML format used by Genesis.

Import Structure (Required)

When importing calibration data, you must provide a folder containing one YAML file per camera.

Rules

  • The import must be a directory, not a single file
  • Each camera must have exactly one YAML file
  • The file name must match the camera ID
  • The file extension must be .yaml

Naming Convention

Use the camera’s unique identifier as the file name:

  • cam01.yaml
  • cam02.yaml
  • cam03.yaml

YAML File Structure

Your final YAML should use the below template:

Template.yaml

%YAML:1.0
---

#Optional for custom camera profiles:
name: "Unique_name"

#----------------------------------------

#Essential for both Camera Profile & Calibration import:
K: !!opencv-matrix #Do not change
rows: 3 #Do not change
cols: 3 #Do not change
dt: d #Do not change
data: [ fx, 0., cx, 0., fy, cy, 0., 0., 1. ] #Float values

ImgSizeWH: !!opencv-matrix #Do not change
rows: 2 #Do not change
cols: 1 #Do not change
dt: d #Do not change
data: [ width, height ] #Float values

#----------------------------------------

#Essential for calibration import only:
RT: !!opencv-matrix #Do not change
rows: 3 #Do not change
cols: 4 #Do not change
dt: d #Do not change
data: [ r11, r12, r13, tx,r21, r22, r23, ty, r31, r32, r33, tz ] #Float values

CaptureAreaMode: CIRCLE #Do not change
CaptureAreaCircleRadius: 2. #Float value
CaptureAreaCircleNumPoints: 5 #Integer value

Breakdown of the file

1. Camera Intrinsics (K)

What this represents

The intrinsics matrix explains how 3D points project onto the image plane.

K: !!opencv-matrix #Do not change
rows: 3 #Do not change
cols: 3 #Do not change
dt: d #Do not change
data: [ fx, 0., cx, 0., fy, cy, 0., 0., 1. ] #Float values
  • fx, fy – focal lengths in pixels
  • cx, cy – principal point coordinates (optical center)

Make sure the values are:

  • In pixels
  • From the image resolution used in your captures

Example

K: !!opencv-matrix
rows: 3
cols: 3
dt: d
data: [ 922.09277084981841, 0., 682.16835173079346, 0., 921.5827891782551, 548.02654115852147, 0., 0., 1. ]

2. Image Size (ImgSizeWH)

What this represents

The image resolution used during calibration and action takes.

  • Width
  • Height

Important: The image size must exactly match the resolution used to compute K.

ImgSizeWH: !!opencv-matrix #Do not change
rows: 2 #Do not change
cols: 1 #Do not change
dt: d #Do not change
data: [ width, height ] #Float values

Example

ImgSizeWH: !!opencv-matrix
rows: 2
cols: 1
dt: d
data: [ 1440., 1080. ]

3. Camera Extrinsics (RT)

What this represents

The RT matrix describes the camera pose relative to the world or reference coordinate system in OpenCV’s required serialisation format.

Where:

  • R – 3×3 rotation matrix
  • t – 3×1 translation vector

Make sure that:

  • Units of translation are consistent (meters)
  • The coordinate system is right-handed

YAML format (required)

#Essential for calibration import only:
RT: !!opencv-matrix #Do not change
rows: 3 #Do not change
cols: 4 #Do not change
dt: d #Do not change
data: [ r11, r12, r13, tx,r21, r22, r23, ty, r31, r32, r33, tz ] #Float values

Example

RT: !!opencv-matrix
rows: 3
cols: 4
dt: d
data: [ 0.78138963988988874, 0.62104908703997874, 0.061059496882623292, -0.36872944270732294, 0.38504025270882253, -0.40281113554509701, -0.83035365530284488, 0.2007447798572404, -0.49109493427103923, 0.67234010780830156, -0.55388134556567736, 4.5193588423681952 ]

4. Capture Area Configuration

This section defines the spatial capture area used by the system. It must be included as-is, with the values adjusted only where noted below.

Parameters

  • CaptureAreaMode must remain CIRCLE (do not change this value)
  • CaptureAreaCircleRadius - The radius of the capture area in meters.
  • CaptureAreaCircleNumPoints - The number of points (polygon sides) used to approximate the circular capture area.
CaptureAreaMode: CIRCLE  #Do not change
CaptureAreaCircleRadius: 2. #Decimal value
CaptureAreaCircleNumPoints: 5 #Integer value

Do not rename or restructure these fields. Only adjust the numeric values if required for your setup.


5. Importing into Genesis

  1. Create a New Project
  2. Click on Camera Manager
  3. Click Import Extrinsic Calibration from Directory
  4. Find the YAML files for each camera's extrinsics.
    1. Note: All files must be stored in the same directory to work correctly
  5. Click Open followed by Save

 

Follow the tutorial below for a step-by-step demonstration of this workflow.