Skip to content

Rosatus/CameraCalibrationWorkbench

Repository files navigation

Camera Calibration Workbench

Camera Calibration Workbench is a PyQt6 + OpenCV desktop application for chessboard-based camera calibration, image undistortion, and pixel-to-world coordinate conversion.

It supports:

  • standard pinhole camera calibration,
  • OpenCV fisheye camera calibration,
  • calibration parameter export/import,
  • batch undistortion,
  • fisheye scale tuning and principal-point offsets,
  • coordinate conversion from pixel/depth to world coordinates.

Features

  • Friendly desktop UI with non-blocking background calibration tasks.
  • Structured numeric controls for chessboard dimensions, grid size, fisheye scale, and principal-point offsets.
  • Live runtime log capture from OpenCV calibration steps.
  • JSON calibration parameter files.
  • Optional automatic undistortion after calibration.
  • Compatible launcher for the original frontendapp_pyqt6.py entry point.
  • uv-based local environment setup.

Installation

Requirements:

  • Python 3.10+
  • uv
  • Linux desktop environment capable of running Qt applications

Clone and run:

git clone https://github.com/Rosatus/CameraCalibrationWorkbench.git
cd CameraCalibrationWorkbench
./run_app.sh

The launcher creates venv/ with uv when needed and installs the project in editable mode.

Manual setup:

uv venv venv
uv pip install --python venv/bin/python -e .
source venv/bin/activate
python -m camera_calibration_workbench

Usage

  1. Choose a directory containing chessboard calibration images.
  2. Select camera type: standard or fisheye.
  3. Set inner corner count.
    • Example: a 12 by 9 square board has 11 by 8 inner corners.
  4. Set the physical grid size in meters.
  5. Choose an output directory.
  6. Click Start Calibration.

The application writes:

calibration_params.json
undistorted_images/

when automatic undistortion is enabled.

Fisheye Tuning

For fisheye images, the UI exposes:

  • scale: adjusts the output field of view.
  • dx, dy: offsets the principal point before saving parameters or undistorting.

Typical scale values:

0.8-0.9   preserves more visual content
1.0       default OpenCV-style output
>1.0      tighter view with more cropping

Project Layout

src/camera_calibration_workbench/
  app.py          PyQt6 desktop UI
  calibrate.py    OpenCV calibration and undistortion implementation
  coordinate.py   pixel/depth to world-coordinate conversion
  workflow.py     UI-friendly workflow helpers
tests/            backend regression tests
docs/             metric and usage notes

Development

uv venv venv
uv pip install --python venv/bin/python -e ".[dev]"
source venv/bin/activate
pytest

Run the application from source:

python -m camera_calibration_workbench

License

This project is licensed under the GNU Affero General Public License v3.0 or later. See LICENSE.

About

PyQt6/OpenCV workbench for camera calibration, undistortion, and coordinate conversion

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors