Skip to main content

SensorCal package

Project description

interactive_camera_lidar_calibration

Python package scaffold for sensorcal.

Install (editable)

python -m pip install -e .

Install (pip)

python -m pip install sensorcal

Usage

Single image + pcd:

sensorcal recalibrate \
  --config path/to/calibrate.yaml \
  --image path/to/img_001.png \
  --pcd path/to/pc_001.pcd

Single image + pcd with parameters (no config):

sensorcal recalibrate \
  --image path/to/img_001.png \
  --pcd path/to/pc_001.pcd \
  --intrinsic-k 600 0 640 0 600 360 0 0 1 \
  --lidar-camera 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1

Folder mode:

sensorcal recalibrate \
  --config path/to/calibrate.yaml \
  --image-folder path/to/images \
  --pcd-folder path/to/pcds

Sample data (3 images + 3 PCDs bundled in samples/):

sensorcal recalibrate --use-sample

If you run sensorcal recalibrate with no arguments, it defaults to the sample data.

Input Structure

You can provide inputs in two ways:

  1. Direct CLI arguments
  • Single pair:
    • --image path/to/img.png
    • --pcd path/to/cloud.pcd
  • Folder mode (paired by sorted filename order):
    • --image-folder path/to/images
    • --pcd-folder path/to/pcds
  1. YAML config file (--config path/to/calibrate.yaml)

Expected YAML structure

transform:
  # 3x3 camera intrinsics in row-major order
  intrinsic_k: [fx, 0, cx, 0, fy, cy, 0, 0, 1]

  # 4x4 LiDAR-to-camera transform in row-major order
  lidar_camera: [r00, r01, r02, tx,
                 r10, r11, r12, ty,
                 r20, r21, r22, tz,
                 0,   0,   0,   1]

path:
  # Optional defaults for folder mode
  img_folder: /abs/or/relative/path/to/images
  pcd_folder: /abs/or/relative/path/to/pcds

Notes

  • If you pass --intrinsic-k or --lidar-camera on the CLI, those override the config file.
  • If you pass both --image/--pcd and folder paths, the single pair wins.
  • For folder mode, files are paired by sorted filename order, so keep names aligned.

Python (pip installed)

from sensorcal.app import SensorCalApp

app = SensorCalApp(
    config_path="path/to/calibrate.yaml",
    intrinsic_k=None,
    lidar_camera=None,
    image_path="path/to/img_001.png",
    pcd_path="path/to/pc_001.pcd",
    image_folder=None,
    pcd_folder=None,
    save_file="calibration_results.yaml",
)
app.process()

Controls

  • Single-window Tkinter app with live sliders, buttons, and dark mode toggle
  • Sliders: tx/ty/tz (meters), roll/pitch/yaw (degrees), alpha, point size
  • Density toggle: overlays a heatmap of point concentration (helps reveal clusters)
  • Keyboard: A/D (X-/X+), W/S (Y-/Y+), Q/E (Z-/Z+)
  • Rotate: J/L (roll-/+), I/K (pitch-/+), U/O (yaw-/+)
  • Buttons: Prev, Next, Original, Save
  • Save writes YAML plus a sibling .txt containing K and the transform.

Python API

app = InteractiveCalibration(
    config_path="path/to/calibrate.yaml",
    intrinsic_k=None,
    lidar_camera=None,
    image_path="path/to/img_001.png",
    pcd_path="path/to/pc_001.pcd",
    image_folder=None,
    pcd_folder=None,
    save_file="transformations.yaml",
)
app.process()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sensorcal-0.1.1.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sensorcal-0.1.1-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file sensorcal-0.1.1.tar.gz.

File metadata

  • Download URL: sensorcal-0.1.1.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.16

File hashes

Hashes for sensorcal-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c4c4c13a022e140830868ca120c8104898298cd62b52bbd64c161704c07879ba
MD5 837ab133a90b6a4eca9968260c9e5ba0
BLAKE2b-256 2ba73802ab13d29a1eff792819d2972abe84d7e46df059d8b3c61f26dd271205

See more details on using hashes here.

File details

Details for the file sensorcal-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: sensorcal-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.16

File hashes

Hashes for sensorcal-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c6c7908afd2dfc82be0481f008e1cbee2184a5ed6269b5f9ec0c30f87e8ded54
MD5 58677a559516c172ed84fcbf531d35d2
BLAKE2b-256 2d1bfcfa2a4675008dd20009026856d35c1c327aa575c4efd428fe49c57f0b90

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page