Skip to main content

Lenses API

The Lenses API allows you to manage camera lens parameters and calibration data for multi-camera motion capture setups.

Overview

Camera lenses are essential components in multi-camera motion capture systems. The Lenses API helps you:

  • Store and retrieve lens calibration parameters
  • Manage lens metadata for different camera setups
  • Ensure accurate 3D reconstruction from multiple camera views

Lens parameters

Focal length

The focal length determines the field of view and magnification of the lens:

{
"focal_length": {
"fx": 1000.0,
"fy": 1000.0
}
}

Principal point

The principal point is the optical center of the lens:

{
"principal_point": {
"cx": 960.0,
"cy": 540.0
}
}

Distortion coefficients

Lens distortion correction parameters:

{
"distortion": {
"k1": 0.1,
"k2": 0.05,
"p1": 0.001,
"p2": 0.001
}
}

API endpoints

Get lens details

Retrieve lens parameters for a specific lens.

GET /api/lenses/{lens_id}

List lenses

Get all available lenses for your account.

GET /api/lenses

Create lens

Create a new lens configuration.

POST /api/lenses

Update lens

Update lens parameters.

PUT /api/lenses/{lens_id}

Delete lens

Remove a lens configuration.

DELETE /api/lenses/{lens_id}

Lens calibration

Calibration process

  1. Setup: Mount camera with lens in fixed position
  2. Capture: Record calibration object from multiple angles
  3. Processing: Calculate lens parameters using calibration software
  4. Storage: Save parameters via Lenses API

Calibration data format

{
"lens_id": "lens_123",
"camera_model": "Sony A7III",
"lens_model": "Sony 24-70mm f/2.8",
"focal_length": 50.0,
"sensor_size": {
"width": 35.6,
"height": 23.8
},
"resolution": {
"width": 1920,
"height": 1080
},
"intrinsics": {
"focal_length": [1000.0, 1000.0],
"principal_point": [960.0, 540.0],
"distortion": [0.1, 0.05, 0.001, 0.001]
},
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}

Best practices

Lens selection

  • Fixed focal length: Use prime lenses for consistent results
  • Quality: Higher quality lenses provide better calibration accuracy
  • Stability: Ensure lens doesn't change focal length during capture

Calibration

  • Multiple positions: Capture calibration object from various angles
  • Good coverage: Ensure calibration covers the entire capture volume
  • Validation: Test calibration accuracy with known movements

Maintenance

  • Regular checks: Recalibrate if lens parameters change
  • Documentation: Keep detailed records of lens configurations
  • Backup: Store calibration data securely

Next steps