Optical Distortion Lab

Numerically exact distortion estimation
and numerically exact undistortion
validated against known ground-truth distortion fields —
available in MATLAB and Python.

View Estimation Evidence View Undistortion Evidence Distortion Explorer Contact

Numerically Exact Distortion Estimation NEW

The distortion engine provides a controlled ground-truth test field: a known analytical radial distortion model with known coefficients and known radial behavior. The estimator is then evaluated against that ground truth. It does not need to recover the same symbolic structure; it can use only the required degrees and terms to reproduce the radial mapping across the covered field.

Ground truth vs estimated radial distortion function

Ground truth: 6-term polynomial with mixed odd and even degrees [2, 3, 5, 6, 9, 11]. Estimated model: automatically selected degrees, converged when RMSE dropped below threshold. Five checkerboard boards at different field positions. The coefficient table shows near-machine-epsilon recovery within the covered radial range.

Automatic Degree Selection

Starting from r², the estimator adds polynomial terms one by one and re-fits after each addition. It stops when RMSE drops below a user-defined threshold — no manual model specification required.

Mixed Odd & Even Terms

Odd, even, sparse, and mixed-degree terms are all supported. The model is not restricted to Brown–Conrady-style r³, r⁵, r⁷ terms.

Deterministic Estimation

Each fit is a direct linear least-squares solve — no iterative optimizer, no convergence loop, no initialization sensitivity. Only the model structure grows; the fitting step stays deterministic.


Numerically Exact Undistortion

After the distortion function is estimated, the same analytical model is inverted through a deterministic LUT-based inverse. For valid monotonic mappings, the recovered image matches the original up to interpolation-grid and resampling effects. For invalid non-monotonic mappings, folding and irreversible information loss are detected before inversion is trusted.

Physically Valid Mapping

Distorted

Monotonic distorted Monotonic

Recovered

Monotonic undistorted

Radial Mapping

Monotonic radial mapping

Physically Invalid Mapping

Distorted

Non-monotonic distorted Non-Monotonic

Recovered

Non-monotonic undistorted

Radial Mapping

Non-monotonic radial mapping

Why The Recovery Is Different

Four design choices distinguish the engine from standard calibration and undistortion workflows.

01 — Free Polynomial Model

Arbitrary Degree & Term Count

Polynomial degree and term count are fully user-defined. Odd, even, sparse, and mixed-degree terms are all supported.

Standard tools commonly use fixed distortion families and limited radial coefficient structures.
02 — Deterministic Calibration

Linear Least-Squares, Not Iterative Optimisation

Estimation is a direct linear solve for the distortion constants. No Levenberg–Marquardt loop, no gradient descent, no local minima.

Standard tools typically minimize reprojection error through iterative optimisation.
03 — Deterministic Inverse

LUT-Based Undistortion

The inverse mapping uses a pre-computed lookup table with interpolation. There is no Newton–Raphson convergence loop at each pixel.

Standard inverse workflows often rely on iterative coordinate inversion.
04 — Physical Validity Control

Hard Loss / Soft Loss Analysis

Every distortion model is evaluated for monotonicity before inversion. Folding, low-slope regions, and irreversible information loss are quantified explicitly.

Standard tools usually do not report whether the radial mapping is physically invertible over the effective image domain.

Estimate → Validate → Undistort

The workflow is intentionally explicit. The distortion function is not hidden inside a black-box calibration result; it remains visible, inspectable, and testable against known ground truth throughout the pipeline.

Checkerboard Images
Corner Detection
Polynomial Recovery
Monotonicity Validation
LUT-Based Inverse
Safe Undistortion

Automatic Model Selection

Starting from r², polynomial terms are added one by one and re-fitted after each addition. The process stops when RMSE drops below a user-defined threshold — the model grows only as complex as the data requires.

Multi-Board Pooling

Multiple checkerboards at different field positions can be combined to improve radial coverage and estimation stability.

Monotonicity Validation

Before inversion, the estimated model is evaluated for folding and information loss. Hard loss and soft loss ratios are reported explicitly.


Unified Distortion Engine

The same analytical forward-first framework is available as a MATLAB toolbox and as a standalone Python package. The forward engine is used both as a practical modeling tool and as a ground-truth generator for validation.

MATLAB Toolbox

Engineering-focused workflows, visualization, batch processing, clean user-facing error handling, and packaged .mltbx deployment.

Commercial · MATLAB

Python Package

OpenCV-free implementation for research, ML pipelines, and large-scale synthetic dataset generation. Built on NumPy, SciPy, and Pillow.

Commercial · Python

Roadmap & Future Work

CNN Corner Detection

EfficientNet-V2-S integration into the estimation pipeline for more robust performance on noisy or low-contrast calibration images.

Differential Calibration

Physically constrained differential calibration methods for advanced optical systems.

Expanded Estimation Patterns

Line-based and synthetic image pair estimation, extending beyond checkerboard patterns.


Licensing & Availability

Available as a MATLAB toolbox (.mltbx) and a Python package, under commercial licenses for research and industrial use.

Research & Academic License

Suitable for universities, research groups, and individual researchers.

Commercial License

For industrial applications, product development, and internal tooling.

Evaluation Access

Limited evaluation versions available upon request.

Request Licensing Information


Contact & Research Identity

📧 ahmet.basaran@opticaldistortionlab.com

🧪 ORCID: 0009-0008-2682-0572

💼 LinkedIn: Ahmet Başaran

💻 GitHub: HeliumNitrate