A Python-based UV-DAR camera calibration tool based on Davide Scaramuzza's OCamCalib model, adapted for UV-sensitive cameras using a non-square UV LED grid calibration pattern (the LEDs act like the internal corners of a checkerboard).
The surrounding workflow mirrors ROS camera_calibration (image_pipeline): photos are
fed one at a time into a calibration engine that decides whether to accept each view
as a calibration sample, rejecting views that are too similar to one already accepted.
The repository works both as a standalone Python tool and, once built with colcon, as
a ROS 2 package with a live cameracalibrator node.
flowchart LR
A["Capture UV LED<br/>grid photos"] --> B["Feed one photo<br/>at a time"]
B --> C{"Detect markers"}
C -->|"too similar to<br/>an accepted sample"| D["Reject"]
D --> B
C -->|"new view"| E["Accept as sample"]
E --> F{"X / Y / Size / Skew<br/>coverage complete?"}
F -->|"no"| B
F -->|"yes"| G["CALIBRATE"]
G --> H["SAVE / EXPORT<br/>calib_results.txt"]
Rejecting near-duplicate photos is expected and intentional — it's what produces a diverse calibration set. Readiness is reported as X / Y / Size / Skew range progress bars, exactly like the ROS tool. See Using the GUI for details.
Standalone (no ROS):
pip install -r requirements.txt
python -m uvdar_calibrator --image_dir photos --guiNeeds Tkinter, for the GUI and for the diagnostics window (python3-tk on Debian
and Ubuntu). The only output is a calib_results.txt in OCamCalib's text format.
ROS 2 (once built with colcon — see Running as a ROS 2 Package):
ros2 run uvdar_calibrator cameracalibrator image:=/camera/image_raw- Capturing Calibration Images — pattern requirements, example capture process, good-image guidelines, folder layout
- Using the GUI — step-by-step walkthrough, coverage graph, reprojection error
- Command-Line Usage — calibrating without the GUI, coverage-only mode
- Running as a ROS 2 Package — colcon build, live
cameracalibratornode
