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

Quickstart

sensorcal recalibrate --use-sample

If you run sensorcal recalibrate with no arguments, it defaults to the sample data. When installed via pip, sample data is bundled inside the package.

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/): use the quickstart above.

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

Use the sensorcal.app.SensorCalApp class shown above.

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.2.tar.gz (12.8 MB 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.2-py3-none-any.whl (12.8 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for sensorcal-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e62bb97a0f3ff9a0e110db8f658f11d3ad10aa6f9d4cddfa6c742493b2fd92e9
MD5 1be0f540b1f1e628d3516e8c5591c544
BLAKE2b-256 4d4b75c4a2526951d53317fe49e1f1eff4836337f77a7a229434da34666123fb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sensorcal-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 12.8 MB
  • 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d6ec4403d235cd1fc4a1cf5e01441cdb7692a58f7646dd5fa703ceda10d00d7f
MD5 357aeb7ce753a9b60a91b7b030280c50
BLAKE2b-256 bf347dbda7d24c8e70f2cbd29960a09cbc820336f2e231542c560ad98b0bac3c

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