Next Article in Journal
Enhancing Geotechnical Engineering Education Through Case-Based Innovation: A Predictive Modeling Framework for Cemented Sand in Strength Theory Teaching
Previous Article in Journal
Real-Time Road Distress Detection Deployment on Jetson TX2 Using Layer-Adaptive Magnitude Pruning and Channel-Wise Knowledge Distillation
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Adaptive B-Spline-Based Distortion Modeling and Calibration for Cameras with Freeform Lenses

1
The College of Information Mechanical, and Electrical Engineering, Shanghai Normal University, Guilin Street, Shanghai 201400, China
2
Zhongke Zidong Information Technology (Beijing) Co., Ltd., Beijing 100190, China
3
China Satellite Network Application Co., Ltd., Beijing 100000, China
4
Shenzhen Guangjian Technology Co., Ltd., Shatou Street, Shenzhen 518048, China
*
Authors to whom correspondence should be addressed.
Appl. Sci. 2026, 16(12), 5775; https://doi.org/10.3390/app16125775
Submission received: 27 April 2026 / Revised: 30 May 2026 / Accepted: 4 June 2026 / Published: 8 June 2026
(This article belongs to the Section Computing and Artificial Intelligence)

Abstract

Freeform lenses introduce spatially varying and asymmetric distortions that cannot be reliably modeled by conventional calibration frameworks. This work presents a calibration approach that represents the distortion field using a bicubic B-spline surface and integrates it directly into parameter estimation. To address instability caused by uneven sampling, an adaptive knot placement strategy guided by distortion-aware density estimation is introduced, together with a regularized control-point formulation. These components enable stable optimization under non-uniform and sparse observations. Experiments on synthetic and real datasets show that the proposed method consistently achieves sub-pixel reprojection accuracy (0.39–0.80 pixels on synthetic data and 0.24 pixels on real data) and improves geometric rectification quality compared with representative parametric and non-parametric approaches. The results indicate that continuous distortion modeling with adaptive spatial parameterization provides a reliable solution for calibrating complex lens systems.

1. Introduction

Freeform optical components are widely used in modern imaging and display systems due to their flexible surface design [1,2,3]. Compared with traditional rotationally symmetric lenses, freeform lenses simplify optical system structures and improve image quality but introduce more complex distortions [4]. These distortions are often asymmetric and spatially varying. As a result, they do not satisfy the central projection and radial symmetry assumptions of conventional calibration models. This makes freeform lens calibration an important problem.
Freeform surface measurement methods are relatively mature [5,6], but they focus on surface shape and alignment, not imaging calibration. In terms of imaging modeling, freeform optical systems have a non-rotationally symmetric structure. They often exhibit significant spatially varying and asymmetric distortion, which challenges traditional calibration methods. Existing camera calibration methods fall into three categories: parametric, non-parametric, and deep learning-based.
Parametric methods, such as Zhang’s method [7] and the Kannala–Brandt fisheye model [8], rely on the central projection assumption and use low-order polynomials to model distortion. Various extensions have been proposed to improve flexibility. Real-Moreno et al. [9] relax the global symmetry assumption and reduce local errors via quadrant-wise fitting, but boundary continuity and generalization remain limited. Recent works [10,11] incorporate geometric constraints such as line preservation, yet their effectiveness is limited in texture-sparse or curve-dominated scenes. Rameau et al. [12] focus on multi-camera system optimization but stay within conventional distortion modeling. Lochman et al. [13] offer strong generality and robust initialization through a back-projection model, but their performance on non-central distortions from freeform surfaces still needs validation. Overall, these methods still depend on central projection and weak symmetry assumptions. When distortion is strongly spatially varying and non-axisymmetric, their modeling capability is often insufficient, leading to unstable calibration.
Non-parametric methods model distortion as dense or continuous mappings. For example, digital image correlation (DIC)-based methods [14,15] estimate pixel-wise displacement fields accurately but rely on DIC reference images and complex procedures. TPS spline-based models [16] and moving least squares (MLS) methods [17] offer flexible continuous distortion representation. Researchers have reduced the impact of uneven sampling through uniform sampling and minimum curvature estimation [18] and have introduced weighted least squares with feature uncertainty to suppress overfitting in low-quality regions [19]. These approaches improve local robustness, but their performance remains highly dependent on sampling distribution and local feature quality. Consequently, they struggle to ensure global continuity and consistency in regions with severe distortion variation or sparse constraints. Moreover, most non-parametric methods use a decoupled strategy, handling distortion correction and camera estimation separately. This separation often causes geometric inconsistency between distortion modeling and camera estimation, reducing overall stability and accuracy.
Deep learning-based methods use data-driven neural networks for camera parameter estimation or distortion correction. Parameter regression methods [20,21,22] rely on predefined camera models and cannot represent complex asymmetric distortions well. Reconstruction-based techniques [23,24,25] can handle asymmetric distortions and show some potential for freeform lenses, but they require extensive data collection. Although existing studies emphasize generalization, their evaluations are mostly based on traditional distortion types. Furthermore, works such as [26,27,28,29] focus mainly on radial distortion modeling and correction, while [30,31,32] target the rolling shutter effect in CMOS sensors. These methods handle highly nonlinear and complex distortions effectively, but their performance heavily depends on training data distribution. At the same time, they typically optimize for visual quality rather than geometric accuracy. Thus, they lack explicit geometric constraints and physical interpretability, which limits their use in calibration tasks that require precise parameter estimation.
Spline-based methods offer unique advantages. Compared to MLS and TPS, B-splines better balance local control and global consistency. They are gradually gaining attention, and some studies have extended them to specific scenarios. Kawanishi et al. [33] use B-splines to fit radial distortion for ultra-wide-angle stereo vision. Hu et al. [34] use two B-spline curves to describe underwater imaging distortion caused by refraction and the lens. However, both methods are designed for specific scenarios and have limited generalization.
Based on the above discussion, freeform lens calibration faces three major challenges. First, traditional models cannot represent asymmetric and spatially varying distortions. Second, many non-parametric methods decouple distortion modeling from camera estimation, making results highly sensitive to initialization. Third, calibration data distribution is often non-uniform, especially near image boundaries, which may cause model instability or overfitting.
To address these issues, we propose an adaptive B-spline-based calibration framework. A cubic B-spline models distortion as a continuous 2D function and integrates it directly into the calibration process. This enables joint estimation of distortion and camera parameters. An adaptive knot placement strategy and control point regularization enhance stability under non-uniform sampling. The Levenberg–Marquardt (LM) method then jointly optimizes all parameters, reducing sensitivity to initialization and improving calibration accuracy.
The main contributions of this work are summarized as follows:
  • Unified B-spline calibration formulation: A continuous bicubic B-spline distortion field is incorporated into the camera projection model. This integrates distortion estimation and camera calibration into one optimization framework, eliminating separate correction steps.
  • Jacobian-guided stability analysis: We analyze the Jacobian structure of the proposed model with respect to camera parameters and control points. The analysis shows that inactive basis functions, insufficient knot-span coverage, or weak distortion derivatives cause zero Jacobian columns, rank deficiency, and unstable control-point estimation. These results clarify the observability requirements for spline-based joint calibration and justify the proposed adaptive knot generation strategy.
  • Stability-aware adaptive knot generation: We introduce a distortion-weighted knot generation strategy using kernel density estimation (KDE). This strategy preserves basis function activation and numerical stability under non-uniform calibration point distributions. Combined with dual-constrained control-point regularization, it improves robustness against sparse data and local overfitting.
  • Experimental validation: Experiments on synthetic and real-world freeform lens datasets confirm sub-pixel calibration accuracy. Reprojection errors range from 0.39 to 0.80 pixels on synthetic distortions and reach 0.24 pixels on real data. Ablation studies further validate the effectiveness of the proposed method.

2. Proposed Methods

The proposed method employs bicubic B-splines to calibrate the distortion of freeform lenses, enabling joint estimation of camera intrinsic parameters, extrinsic parameters, and spatially varying distortion fields. First, a global projection model incorporating a B-spline distortion model is constructed. Subsequently, the optimization stability conditions are derived through Jacobian matrix and numerical stability analysis. Based on this, we propose an adaptive knot generation strategy driven by weighted kernel density estimation (KDE) and a control point estimation method with dual constraints combining L2 regularization and Laplacian smoothing, aiming to enhance the accuracy and robustness of the model. Finally, L-M nonlinear optimization is employed to jointly optimize all parameters. The overall workflow is illustrated in Figure 1.
The projection pipeline maps 3D world points to distorted 2D image coordinates through coordinate transformations. For clarity, Table 1 summarizes the symbolic representations and corresponding physical interpretations used throughout this formulation.

2.1. Global Camera Model with B-Spline Distortion

We employ Zhang’s calibration method [7] for initialization. By capturing multiple images of a planar calibration pattern from various orientations, we first estimate the initial camera parameters while neglecting lens distortion. These parameters include the intrinsic matrix K (comprising focal lengths f x , f y , principal point coordinates c x , c y , and skew coefficient s), as well as the extrinsic parameters (rotation matrix R and translation vector t) for each image.
The complete projection process, which maps a 3D world point P w to its corresponding 2D image coordinates while accounting for lens distortion, is formulated as follows. This pipeline defines the functional relationship between the estimated parameters and the final reprojection error.
The world point P w is first transformed into the camera coordinate system using the extrinsic parameters:
P c = R P w + t .
The point P c is then further projected onto the normalized image plane via standard perspective division:
x n = X c Z c , y n = Y c Z c .
These normalized coordinates are subsequently converted into ideal (undistorted) pixel coordinates using the intrinsic camera parameters:
u ideal = f x · x n + c x , v ideal = f y · y n + c y .
Based on these estimated parameters, the world coordinates of the calibration pattern corners are projected to obtain their ideal pixel coordinates. The discrepancy between these coordinates and the observed pixel coordinates defines the observed distortion field:
d = Δ x Δ y = u obs u ideal v obs v ideal ,
where d denotes the distortion vector, and Δ x , Δ y represent the distortion offsets along the horizontal and vertical image axes, respectively.
To model this distortion field using a bicubic B-spline surface, the undistorted pixel coordinates are first normalized to the domain [ 0 , 1 ] × [ 0 , 1 ] using the image dimensions:
u = u ideal W 1 , v = v ideal H 1 ,
where W and H represent the image width and height, respectively. This normalization establishes a unified reference frame essential for the B-spline formulation.
The lens distortion offsets at normalized image coordinates are then modeled using bicubic B-spline surfaces:
Δ x ( u , v ) = i , j N i , p ( u ) N j , q ( v ) P i j x ,
Δ y ( u , v ) = i , j N i , p ( u ) N j , q ( v ) P i j y ,
where { P i j x } and { P i j y } represent the control point grids for each distortion component; N i , p and N j , q are the p-th and q-th degree B-spline basis functions; and i, j index the control points.
The final, distorted pixel coordinates ( u d , v d ) are obtained by adding the computed distortion offsets to the undistorted pixel coordinates:
u d = u ideal + Δ x ( u , v ) , v d = v ideal + Δ y ( u , v ) .
The residual vector r for a single observed image point ( u obs , v obs ) is thus defined as the difference between the projected-distorted coordinates and the observation:
r = [ u d u obs , v d v obs ] T .
This residual depends on all parameters involved in the pipeline: the extrinsic parameters (R, t), the intrinsic parameters ( f x , f y , c x , c y ), and the distortion parameters (the control point values { P i j x } , { P i j y } ). The primary objective of this work is to accurately model the distortion vector field d using this bicubic B-spline formulation.

2.2. Jacobian and Numerical Stability Analysis

In the previous section, a unified camera calibration framework is established using B-spline modeling. Since the behavior of B-spline fitting inherently depends on data distribution characteristics, integrating the distortion model into a comprehensive optimization framework and examining its numerical properties becomes necessary. Accordingly, this section analyzes the Jacobian matrix arising in the nonlinear optimization process and further investigates the essential stability conditions to guarantee convergence and well-posedness.

2.2.1. Jacobian Matrix Derivation

The Jacobian block for intrinsic parameters [ f x , c x , f y , c y ] is:
r [ f x , c x , f y , c y ] = u d f x u d c x 0 0 0 0 v d f y v d c y ,
where u d f x = x n 1 + 1 W 1 Δ x u , and u d c x = 1 + 1 W 1 Δ x u .
The stability conditions include three aspects. First, normalized coordinates must be non-zero, meaning x n 0 and y n 0 . Second, distortion derivatives must satisfy the validity conditions, specifically Δ x u ( W 1 ) and Δ y v ( H 1 ) . Finally, the data points must be well distributed to ensure the linear independence of the column vectors.
The Jacobian blocks for control points are:
r P i j x = N i , p ( u ) N j , q ( v ) 0 , r P i j y = 0 N i , p ( u ) N j , q ( v ) .
The stability conditions include four aspects. First, each control point has valid observations with N i , p ( u ) N j , q ( v ) 0 . Second, observations must cover the full parameter space. Third, the basis functions remain linearly independent. Fourth, reasonable density requires the spacing of the control points to match the complexity of the distortion.
The camera pose (extrinsic parameters) is represented using Lie algebra ξ = [ ω T , ν T ] T R 6 , where ω R 3 is the rotation vector and ν R 3 is the translation vector. A 3D world point P w is transformed to the camera coordinate frame via the exponential map:
P c = exp ( ξ ) P w ,
where ξ denotes wedge operator mapping the 6D vector ξ to a 4 × 4 antisymmetric matrix.
The Jacobian of the reprojection error with respect to the camera pose parameters is derived using the chain rule. Starting with the normalized image coordinates:
x n ξ = x n P c P c ξ = 1 Z c 0 X c Z c 2 P c I 3 × 3 ,
y n ξ = y n P c P c ξ = 0 1 Z c Y c Z c 2 P c I 3 × 3 ,
where P c is the skew-symmetric matrix form of P c = [ X c , Y c , Z c ] :
P c = 0 Z c Y c Z c 0 X c Y c X c 0 .
The derivatives for undistorted pixel coordinates incorporate the focal lengths:
u ideal ξ = f x x n ξ ,
v ideal ξ = f y y n ξ .
The Jacobian of the reprojection error with respect to the Lie algebra parameters is:
r ξ = A 11 u ideal ξ + A 12 v ideal ξ A 21 u ideal ξ + A 22 v ideal ξ ,
where the coefficients account for distortion effects:
A 11 = 1 + 1 W 1 Δ x u , A 12 = 1 H 1 Δ x v , A 21 = 1 W 1 Δ y u , A 22 = 1 + 1 H 1 Δ y v .
The stability conditions consist of the following six aspects. First, non-zero depth requires Z c 0 to avoid singularities in the derivatives. Second, valid image dimensions require W 1 and H 1 to prevent division by zero. Third, non-zero focal lengths require f x 0 and f y 0 to ensure a valid transformation. Fourth, non-degenerate points require P c [ 0 , 0 , 0 ] T to ensure valid coordinate transformations. Fifth, an active distortion model requires non-zero B-spline derivatives and control points. Sixth, a full-rank coupling matrix requires det A 11 A 12 A 21 A 22 0 to maintain invertibility.
The distortion derivatives Δ x u and Δ y v play a critical role in the Jacobian analysis. These derivatives are fundamentally governed by the control point grids { P i j x } and { P i j y } through the corresponding derivatives of the B-spline basis functions. Consequently, the control points emerge as the cornerstone parameters that dictate both the distortion characteristics and the numerical stability of the overall calibration framework.

2.2.2. Stability Conditions for B-Spline Modeling

As established by the Jacobian matrix analysis, preventing zero columns and maintaining full column rank requires that the data distribution ensures non-trivial B-spline distortion derivatives and control point activations. This subsection further examines the specific numerical stability conditions governing the B-spline formulation.
(1) 
Basis functions
The B-spline basis functions are piecewise polynomial functions defined over a set of non-decreasing real numbers known as the knot vector. For example, the knot vector in the u-direction is given by U = { u 0 , u 1 , , u m + p + 1 } . The basis function N i , p ( u ) in the u-direction is defined as follows: When p = 0 (zeroth-degree basis function):
N i , 0 ( u ) = 1 , if u i u < u i + 1 0 , otherwise .
When p > 0 (p-th degree basis function):
N i , p ( u ) = u u i u i + p u i N i , p 1 ( u ) + u i + p + 1 u u i + p + 1 u i + 1 N i + 1 , p 1 ( u ) ,
where p represents the degree of the basis function, and i represents the index of the basis function. Each basis function can be expressed as a cubic polynomial in the form:
N j ( h ) = k = 0 3 C k h k ,
where the coefficients C k depend on the nodal spacings u b u a .
When the nodes are located at the boundary endpoints, the basis functions satisfy the following vanishing property at the nodes:
u = u j N j , 3 ( u ) = 0 .
Each basis function comprises multiple rational components whose denominators contain products of non-uniform nodal spacings u b u a . Partial derivatives demonstrate considerable non-trivial properties.
The partial derivatives of the displacement functions with respect to the parametric coordinates can be derived from Equations (6) and (7):
Δ x u = i , j N i , p ( u ) u N j , q ( v ) P i j x ,
Δ y v = i , j N i , p ( u ) N j , q ( v ) v P i j y .
These derivative expressions can be further expanded by incorporating the polynomial representation of the basis functions. For the cubic case where p = 3 and q = 3 , we substitute the polynomial form:
Δ x u = i , j k = 1 3 k C k ( i ) u k 1 l = 0 3 D l ( j ) v l P i j x ,
Δ y v = i , j k = 0 3 C k ( i ) u k l = 1 3 l D l ( j ) v l 1 P i j y ,
where C k ( i ) and D l ( j ) are the polynomial coefficients for the basis functions N i , 3 ( u ) and N j , 3 ( v ) respectively, and the polynomial representation.
From the above formulation, it is evident that the existence and magnitude of the non-trivial B-spline distortion derivatives are governed by the properties of the basis function matrix and, more fundamentally, are immediately influenced by the data distribution.
(2) 
Matrix Representation of B-Spline Basis Functions
Assume the number of node vectors is m + 1 , denoted as U = { u 0 , u 1 , , u m } . Let the order be p, and the number of control points be s + 1 . Then, the relationship m = p + s + 1 holds. A data point is selected within each node interval, resulting in the set Q = { q 0 , q 1 , , q m 1 } , where each q j lies in the interval [ u j , u j + 1 ] .
Basis function matrix structure for p = 3 with Non-Repeating End Nodes is as follows:
N 0 P ( q 0 ) 0 0 0 0 N 0 P ( q 1 ) N 1 P ( q 1 ) 0 0 0 N 0 P ( q 2 ) N 1 P ( q 2 ) N 2 P ( q 2 ) 0 0 N 0 P ( q 3 ) N 1 P ( q 3 ) N 2 P ( q 3 ) N 3 P ( q 3 ) 0 0 N s 4 P ( q m 5 ) N s 3 P ( q m 5 ) 0 0 0 N s 3 P ( q m 4 ) N s P ( q m 1 ) 0 0 0 N s P ( q m 1 ) 0 0 0 N s P ( q m 1 )
The structure of the basis function matrix for p = 3 with repeated end nodes is given as follows:
N 0 P ( q 0 ) N 1 P ( q 0 ) N 2 P ( q 0 ) N 3 P ( q 0 ) 0 0 0 N 1 P ( q 1 ) N 2 P ( q 1 ) N 3 P ( q 1 ) N 4 P ( q 1 ) 0 0 0 N 2 P ( q 2 ) N 3 P ( q 2 ) N 4 P ( q 2 ) 0 0 0 N s 1 P ( q m 1 ) N s 2 P ( q m 1 ) N s P ( q m 1 )
The use of repeated end nodes enhances the control over data points near the boundaries. As shown in Equations (27) and (28), when end nodes are repeated, the first data point q 0 influences four control points. In contrast, with non-repeating end nodes, q 0 influences only one control point. If few data points are located near the boundaries, the influence of boundary data on the control points is reduced, causing the control points to be predominantly determined by interior data. This can lead to surface distortion when solving for the control points. Therefore, it is necessary to repeat the end nodes when constructing the node vector.
(3) 
Full Column Rank Condition of the Basis Function Matrix
The local support property of B-spline basis functions requires that the observation domain of each control point contains sufficient sampling points to ensure basis activation. In the proposed calibration framework, the observation matrix N exhibits a strictly banded structure, where each row contains only p + 1 non-zero elements. If a knot span [ u i , u i + 1 ) lacks sufficient data points, a zero column will appear in N . This breaks the banded continuity and leads to column-rank deficiency, preventing a unique numerical solution for the control points P i j .
Notably, the use of repeated end knots (clamped knots) significantly increases the sensitivity of the system to the boundary data distribution.As shown in Equation (28), repeated knots cause the support of boundary basis functions to be highly concentrated. If the initial interval [ u 0 , u 1 ) lacks a key observation q 0 , the first column of the matrix becomes a zero vector, causing the boundary control points to become unconstrained. Unlike interior spans with smooth transitions, boundary spans carry critical geometric information that constrains the extrapolation behavior of the spline surface. Therefore, to ensure a full-rank matrix and suppress numerical oscillations, observations must fully cover the parameter space defined by the knot vector. Specifically, each knot span must contain at least one valid observation, especially in boundary regions where basis functions decay rapidly, to avoid system singularity or non-physical surface distortion.

2.3. Adaptive Knot Generation Based on Distortion-Weighted KDE

According to the analysis in the previous section, stable control-point estimation requires sufficient activation and coverage of the B-spline basis over the observation domain. In calibration with freeform lenses, however, checkerboard corners are only available at scattered and viewpoint-dependent image locations. As a result, uniformly distributed knots may create intervals with weak support or even empty tensor-product cells, which degrades the conditioning of the basis matrix and reduces estimation stability.
To address this issue, we construct the knot vectors adaptively based on the observed global corner distribution and local variations in the distortion response. Let ( u i , v i ) [ 0 , 1 ] 2 denote the normalized image coordinates of the ith corner, and let z i denote the corresponding distortion response ( Δ x i or Δ y i ). The core idea is to construct a weight function using local variations of the discrete samples and to introduce weighted kernel density estimation to guide knot placement. The detailed algorithm is as follows.
(1) 
Discrete Estimation of the Weighting Term
For each direction d { u , v } , the samples are sorted according to that coordinate. Let { ( d ( 1 ) , z ( 1 ) ) , , ( d ( n ) , z ( n ) ) } denote the reordered sequence, where d ( k ) is either u ( k ) or v ( k ) . Rather than interpolating a dense distortion surface and differentiating it, we estimate local distortion variation directly from the discrete samples by a sliding-window statistic. The window size is defined as:
m = max m min , 2 n ρ 2 + 1 ,
where ρ ( 0 , 1 ) is the window ratio and m min is the minimum admissible window size. The odd-valued form ensures a symmetric neighborhood. For the k-th sorted sample, the local index set is:
N k = j : max 1 , k m 1 2 j min n , k + m 1 2 .
Local distortion variation along direction d is then given by sample standard deviation:
s k ( d ) = 1 | N k | j N k z ( j ) z ¯ k 2 ,
z ¯ k = 1 | N k | j N k z ( j ) .
The quantity s k ( d ) serves as a discrete proxy for the local distortion-gradient magnitude: it becomes large when the response varies rapidly within a local neighborhood and small in smooth regions. Therefore, Equation (29) is implemented in practice by replacing the ideal continuous gradient magnitude with the above discrete local-variation estimate.
To avoid excessive dominance by a few isolated samples, the variation values are linearly normalized into a bounded interval:
w k ( d ) = w min + ( w max w min ) s k ( d ) s min ( d ) s max ( d ) s min ( d ) , s max ( d ) > s min ( d ) 1 , s max ( d ) = s min ( d ) ,
where s min ( d ) = min k s k ( d ) and s max ( d ) = max k s k ( d ) .
We set w min = 0.5 and w max = 1.5 . This range is chosen to balance model adaptability and structural stability. Specifically, the upper limit allows regions with complex distortion to increase their local knot density by up to 50% to capture fine details, while the lower limit ensures that smooth regions retain at least half of the baseline density. This lower bound prevents the grid from becoming overly sparse, which could lead to rank deficiency during the optimization process. Consequently, this strategy adaptively allocates knots based on the degree of distortion while guaranteeing the numerical robustness of the global optimization.
(2) 
Weighted KDE along the Two Image Directions
Given the directional weights, one-dimensional weighted KDE is performed separately along the u- and v-axes:
f ^ u ( u ) = i = 1 n w ˜ i ( u ) 1 h u K u u i h u ,
f ^ v ( v ) = i = 1 n w ˜ i ( v ) 1 h v K v v i h v ,
where K ( · ) is the Gaussian kernel and
w ˜ i ( d ) = w i ( d ) j = 1 n w j ( d ) ,
where w ˜ i ( d ) denotes the normalized weight in direction d.
The bandwidth along each direction d { u , v } is selected by Scott’s rule under weighted sampling:
h d = σ ^ d n eff 1 / 5 ,
where σ ^ d is the standard deviation of the samples along direction d. The effective sample size n eff is given by
n eff = i = 1 n w i ( d ) 2 i = 1 n w i ( d ) 2 .
This formulation preserves the standard Scott scaling while accounting for unequal sample influence. In practice, it provides a stable compromise between oversmoothing and spurious local oscillations.
(3) 
Adaptive Knot Generation and Grid Optimization
To balance model compactness and fitting accuracy, we propose a three-stage knot placement strategy based on the evaluated weighted KDE curves: initial knot generation, 1D interval merging, and 2D coverage optimization.
First, candidate knots are initialized from three sources: the normalized domain boundaries (0 and 1); the local maxima of f ^ u and f ^ v (to capture dense informative samples); and the empirical quartiles (25%, 50%, and 75%) to ensure global spatial coverage. These candidates are then deduplicated and sorted to form the initial 1D knot vectors.
Second, support-aware interval merging is applied to satisfy the full-rank requirement for control point estimation. For a knot vector T ( d ) = { t 0 ( d ) , t 1 ( d ) , , t M d ( d ) } in direction d { u , v } , the support count c r ( d ) of the r-th interval is defined as:
c r ( d ) = i t r ( d ) d i < t r + 1 ( d ) ,
where the last interval includes its right endpoint, and | · | denotes the set cardinality. Let N min = max ( 10 , N t o t a l / 50 ) be the minimum data threshold, where N t o t a l is the number of valid corners. If c r ( d ) < N min , an interior knot is removed to merge the interval with an adjacent one. To limit model complexity, each dimension is capped at 15 intervals. Intervals with the fewest observations are iteratively merged until these 1D constraints are satisfied, explicitly enforcing the coverage requirement analyzed in previous section.
Finally, 2D coverage optimization is performed. Even if both 1D knot vectors meet the support criteria, the resulting tensor-product grid may still contain empty 2D cells, causing inactive basis functions in the final bicubic B-spline surface. To resolve this, we compute a 2D occupancy histogram:
H a b = i u i [ t a ( u ) , t a + 1 ( u ) ) , v i [ t b ( v ) , t b + 1 ( v ) ) .
If empty cells ( H a b = 0 ) exist, the algorithm identifies the dimension with the highest number of empty cells and prioritizes interval merging along that dimension. This cross-dimensional refinement iterates (up to 30 times) until all cells contain valid observation data ( a , b , H a b > 0 ). This step mathematically eliminates the rank-deficiency risk caused by local data absence, ensuring the numerical stability of the subsequent joint optimization.

2.4. Dual-Constrained Control Point Solver

Even with stable knot distributions, the solution in regions of extreme data sparsity, such as image edges, may remain ill-posed, causing oscillatory control points and distorted surfaces. To enhance robustness, we introduce a composite regularization term.
The loss function is defined as:
L = B P d 2 + λ 1 P 2 + λ 2 L P 2 ,
where B P d 2 is the data fidelity term, λ 1 P 2 is an L2 regularization term that penalizes large control point values, and λ 2 L P 2 is a smoothness constraint where L is a Laplacian matrix that penalizes second-order derivatives of the control point grid. The hyperparameters λ 1 and λ 2 balance fitting accuracy, numerical stability, and smoothness.
The design matrix B is constructed from B-spline basis functions evaluated at the parameter locations ( u , v ) . The resulting regularized system is solved via least squares:
B B + λ 1 I + λ 2 ( D r D r + D c D c ) P = B d ,
where D r and D c are finite-difference operators along the rows and columns of the control point grid, respectively.

2.5. Full Parameter Joint Optimization

Using the initial intrinsic and extrinsic parameters along with the B-spline control points obtained from the previous steps as initial values, we construct a complete camera model to perform a final overall optimization. The Levenberg-Marquardt algorithm is employed to minimize the sum of reprojection errors over all points, where regularization terms are introduced to enhance numerical stability and ensure smoothness of the distortion surfaces. A joint bundle adjustment is carried out over all parameters:
min K , ( R k , t k ) , P k = 1 M j = 1 N u obs , k j π K , R k , t k , P , u j 2 ,
where π denotes the projection function that incorporates the B-spline distortion model, and u j represents the world coordinates of the corner points. This step effectively eliminates errors from the initial parameter estimates, enabling the intrinsic parameters, extrinsic parameters, and distortion model to converge to a globally optimal solution, thereby maximizing calibration accuracy.

3. Experiment Results and Analysis

To evaluate the performance of the proposed calibration framework, this paper conducts a series of experiments using both synthetic and real-world data, systematically validating the core research contributions. The experimental design primarily includes validating the framework’s accuracy under controllable distortion patterns using synthetic data, evaluating its practical application performance in industrial lens scenarios through real-world experiments, and conducting comprehensive ablation studies to analyze the individual contributions of each innovative module.

3.1. Experimental Setup

(1)
Baseline Methods and Settings
We compare the proposed method with several representative calibration methods. For a fair comparison, all methods use the same detected corners and the same 3D board coordinates. For baseline methods that need hyperparameters, we tune them individually via grid search to minimize the average reprojection error on the calibration datasets. This gives competitive and stable baseline performance. All experiments run on a desktop with an Intel Core i7-12700K CPU and 32 GB RAM. Both simulated and real datasets contain 10 calibration views. The compared methods and their settings are:
  • Zhang [7]: A classic method using a global symmetric polynomial distortion model. We use the OpenCV implementation with three radial coefficients ( k 1 , k 2 , k 3 ) and two tangential coefficients ( p 1 , p 2 ) .
  • BabelCalib [13]: A general framework based on central camera back-projection and hierarchical initialization. We configure it with a 9th-order Kannala–Brandt angular polynomial. This improves its ability to approximate complex nonlinear distortions, even though the model remains axis-symmetric.
  • McCalib [12]: A multi-camera toolbox using co-visibility graph optimization and global bundle adjustment. It uses an 8-parameter rational polynomial model with six radial coefficients ( k 1 , , k 6 ) and two tangential coefficients ( p 1 , p 2 ) . The co-visibility graph needs at least three common corners between two views. The maximum number of BA iterations is 500.
  • MLS [17]: A non-parametric method based on moving least squares interpolation. After Zhang-based initialization, it fits the residual distortion field using a first-order local polynomial. We use a Gaussian weight w ( d ) = exp ( d 2 / σ 2 ) . The support radius σ is tuned via grid search over { 5 % , 10 % , 15 % , 20 % } of the image diagonal, and the best value ( 10 % ) is used. To avoid unstable extrapolation in sparse regions, we discard samples beyond 3 σ .
  • TPS [16]: A non-parametric method based on thin-plate spline interpolation. After Zhang-based initialization, it fits two independent TPS surfaces to model the residual distortion. It uses the biharmonic kernel ϕ ( r ) = r 2 log r . The smoothing coefficient is tuned via grid search over { 10 6 , 10 5 , 10 4 , 10 3 , 10 2 } , and the best value 10 4 is used. To reduce boundary extrapolation instability, we use only the detected corners as sparse control points.
(2)
Implementation of the Proposed Method
We implement the proposed framework in Python 3.8 using OpenCV and SciPy. It follows the calibration pipeline described in Section 2. Table 2 lists the main parameters. Table 3 shows the resulting knot intervals and control point grids for each dataset.

3.2. Experiments with Synthetic Data

3.2.1. Synthetic Dataset Construction

To verify the calibration accuracy, we generated simulated corner data covering the camera’s field of view (FOV). The simulated camera uses intrinsic parameters of focal length ( f x , f y ) = ( 305.18 , 302.45 ) and a principal point of ( c x , c y ) = ( 511.61 , 631.89 ) . The extrinsic parameters were calculated from 10 different views. A 150 × 150 checkerboard with a square size of 50.0 mm was generated at the origin of the world coordinate system. The 3D points were projected onto the image coordinates using the camera model, and points outside the valid image boundaries were filtered out. The image resolution is 1024 × 1280 , with a horizontal FOV of 118.4° and a vertical FOV of 129.4°. This process yielded a total of 1561 valid points across all views, with the number of valid points per view ranging from 108 to 215. Figure 2 illustrates the distribution of corners within the camera’s FOV for four typical views.
To evaluate the robustness of the proposed method, we introduced three typical types of distortion and added Gaussian noise with a mean of μ = 0 and a standard deviation of σ = 0.3 pixels. The first type is the standard radial lens distortion, with coefficients k 1 = 0.05 , k 2 = 0.0267 , k 3 = 0.0067 , p 1 = 0.0067 , and p 2 = 0.01 . The second type is polynomial angle-based distortion, which is a fisheye-like distortion with a strong radial component. Its coefficients are set to k 1 = 0.05 , k 2 = 0.02 , k 3 = 0.01 , k 4 = 0.005 , and p 1 = p 2 = 0.0001 . The third type is asymmetric wave distortion, a complex distortion model that combines quadrant-dependent polynomial offsets with global sinusoidal oscillations. Figure 3 shows the distortion distributions.
Both radial distortion and fisheye distortion are symmetric edge distortions. In contrast, the asymmetric distortion breaks central symmetry, resulting in significant differences between the distortion characteristics in the X and Y directions.

3.2.2. Calibration Accuracy Comparison and Analysis

Table 4 shows the reprojection errors of different methods under three simulated distortion types. The proposed method achieves the best results for all distortion types, with RMSE values of 0.393, 0.444, and 0.797 pixels for radial, fisheye, and asymmetric distortions, respectively. Non-parametric methods (MLS, TPS, and ours) consistently outperform parametric ones (Zhang, BabelCalib, McCalib). This indicates that the model’s ability to represent distortion is the key factor for calibration accuracy.
For radial distortion, Zhang has an RMSE of 3.420 pixels. MLS and TPS reduce it to 0.682 and 0.643 pixels. The proposed method further reduces it to 0.393 pixels. TPS performs slightly better than MLS. This is because TPS minimizes global bending energy, which fits well with the smooth and symmetric nature of radial distortion. For fisheye distortion, Zhang increases to 4.571 pixels. MLS and TPS drop to 0.880 and 0.921 pixels. TPS is slightly worse than MLS. The global smoothness of TPS causes extrapolation errors in the highly compressed image edges, while the local support of MLS is more robust. The proposed method uses a bicubic B-spline surface with a KDE-based adaptive knot placement strategy. It achieves an RMSE of 0.444 pixels, which is about 50% and 52% better than MLS and TPS, respectively.
The largest performance gap appears under asymmetric wave distortion. Zhang fails with an RMSE of 16.917 pixels due to its radial symmetry assumption. BabelCalib and McCalib, despite their complex optimization steps, are still limited by their parametric models (e.g., Kannala–Brandt). Their errors are 1.98 and 1.595 pixels. Among non-parametric methods, MLS (1.255 pixels) is better than TPS (1.374 pixels) by about 9.5%. The local rigidity of MLS allows it to fit different image regions independently, while the global smoothness of TPS tends to smooth out local details. The proposed method achieves an RMSE of 0.797 pixels. This is 36.5% and 42.0% better than MLS and TPS. These results show the effectiveness of combining bicubic B-spline representation with adaptive knot placement and regularization.

3.2.3. Robustness Analysis Against Feature Extraction Noise

The previous experiments compared the calibration accuracy of the different methods at a fixed noise level ( σ = 0.3 pixels). This section further analyzes the noise robustness of the proposed method. Gaussian noise with standard deviations σ ranging from 0.1 to 2.0 pixels was injected into the simulated corner coordinates. For the three types of distortion models, 20 independent trials were conducted at each noise level, and the average RMSE of the global reprojection error was recorded. The optimization parameters remained consistent: the regularization weight λ r e g = 10 3 , the smoothing constraint λ s m o o t h = 10 3 , and the convergence thresholds f t o l = x t o l = 10 6 .
Figure 4 and Table 5 present the experimental results. The proposed method demonstrates stable performance across all distortion types: the reprojection error increases approximately linearly with the added noise, and no accuracy collapse occurs. For the asymmetric wave distortion, when the noise standard deviation increases from 0.1 to 0.3 pixels, the RMSE only rises from 0.765 to 0.797 pixels. Even under extreme noise conditions of 2.0 pixels, the global RMSE remains well constrained within 2.1 pixels.

3.3. Experiments with Real Data

3.3.1. Real-World Dataset and Experimental Setup

This experiment evaluates the proposed calibration framework on real-world data. Ten checkerboard images with different poses were captured using a commercial Yipin freeform lens (Yipin Optical, Shangrao, China). The checkerboard was placed at different positions and orientations to provide sufficient coverage of the field of view, particularly near the image boundaries. Figure 5 shows the acquired calibration images.
The tested lens adopts a 1G4P optical structure (one glass element and four plastic elements), with an effective focal length of 0.77 mm and a wide asymmetric field of view (120° horizontally and 130° vertically). Zemax OpticStudio 19.4 simulations indicate pronounced nonlinear distortion across the image plane, reaching approximately 14.99% near the image boundary, as shown in Figure 6.
To investigate how these distortion characteristics appear in real observations, the initial distortion field was estimated from the detected checkerboard corners before calibration.
Figure 7 presents the initial distortion field estimated from the captured calibration images. The distortion exhibits clear spatial non-uniformity and directional asymmetry. The distortion ranges from 25.01 to 29.33 pixels in the X direction and from 41.75 to 28.88 pixels in the Y direction. These observations are consistent with the trends predicted by the optical simulation and further demonstrate the limitations of conventional symmetric distortion models when applied to freeform lenses.

3.3.2. Quantitative Analysis of Reprojection Error

Table 6 shows the reprojection errors and overall RMSE for each method across 10 real views. The proposed method uses a single bicubic B-spline surface with a KDE-based adaptive knot placement strategy. It achieves an overall RMSE of 0.24 pixels, outperforming all compared methods.
Zhang’s method, which uses a polynomial distortion model, has an overall RMSE of 2.444 pixels. Its per-view errors range from 1.77 to 2.20 pixels. This reflects the inherent limitation of traditional parametric models in representing complex asymmetric distortions. BabelCalib and McCalib use more advanced optimization strategies, such as hierarchical back-projection initialization and global bundle adjustment. They improve over Zhang’s method, but their errors are still much higher than those of non-parametric methods. This again shows that better optimization cannot fully compensate for limited model expressiveness.
Among non-parametric methods, MLS uses local weighted interpolation. It achieves an overall RMSE of 0.48 pixels, which is about 67% to 81% lower than parametric methods. However, its per-view errors range from 0.39 to 0.73 pixels. This large fluctuation reflects the sensitivity of local interpolation methods to data distribution and their weak global consistency. TPS fits two independent thin-plate spline surfaces to establish a smooth mapping from distorted coordinates to ideal coordinates. Its overall RMSE is 0.67 pixels.The proposed method reduces the overall RMSE by about 50% (from 0.48 to 0.24) compared to MLS and by about 64% (from 0.67 to 0.24) compared to TPS. These results demonstrate the effectiveness of the bicubic B-spline representation and the adaptive knot placement strategy on real-world complex distortion data.

3.3.3. Qualitative Evaluation of Distortion Rectification Performance

To qualitatively and quantitatively evaluate the distortion rectification performance, we present a visual comparison in Figure 8 and summarize representative geometric quality metrics in Table 7. The evaluated metrics include Straightness RMSE (lower is better), Spacing Coefficient of Variation (Spacing CV; lower indicates more uniform grid spacing), Orthogonality Error (lower indicates better preservation of right angles), and Distortion Field Smoothness (lower indicates smoother deformation).
As shown in Table 7, the raw distorted image exhibits significant geometric deviations across all evaluated metrics, confirming the presence of strong nonlinear distortion. After rectification, all methods substantially improve geometric regularity, as reflected by the reduced straightness error and improved spacing uniformity. Among the parametric calibration methods, Zhang’s method achieves limited correction due to its simplified distortion model, leading to noticeable residual curvature. BabelCalib and McCalib further improve geometric accuracy, yielding lower straightness and orthogonality errors. However, as illustrated in Figure 8, these methods still exhibit minor local inconsistencies and slight degradation near image boundaries, suggesting limited flexibility in modeling complex spatial distortions.
Non-parametric approaches, including MLS and TPS, demonstrate improved adaptability to nonlinear distortions. MLS provides enhanced local fitting capability, resulting in reduced geometric errors, although its locally weighted formulation may introduce moderate inconsistencies in global structure. TPS, benefiting from a global smoothness constraint, achieves more coherent deformation and improved distortion field smoothness compared to MLS. Nevertheless, slight boundary artifacts and sensitivity to control point distribution can still be observed.
The proposed spline-based method achieves consistently strong performance across all metrics. In particular, it reduces straightness error and spacing variation, indicating improved geometric regularity, while maintaining lower orthogonality error for better local structural preservation. Moreover, the distortion field exhibits enhanced smoothness, reflecting more stable and globally consistent deformation.
Overall, while existing parametric methods provide reliable baseline correction and non-parametric approaches improve flexibility, the proposed method offers a balanced trade-off between local adaptability and global consistency.

3.3.4. Hold-Out View Validation

We test the generalization ability of our calibration framework using hold-out view validation on the YP dataset. Unlike the previous test that uses all ten images for calibration, we split the images into a calibration set (eight images) and a validation set (two images). To reduce the effect of a particular split, we test five different splits, where each view serves as validation once.
For each split, all methods train on the same calibration views and test on the same validation views. The validation error is the reprojection RMSE on the checkerboard corners of the unseen views. Table 8 shows the results.
As Table 8 shows, all methods have higher errors on unseen views than on calibration views. This means that predicting new images is harder. Our method gives the lowest validation RMSE (0.36 pixels) and the smallest performance drop (only 0.09 pixels) from calibration to validation.
Parametric methods (Zhang, BabelCalib, McCalib) produce validation errors above 1.6 pixels. Their fixed distortion models cannot capture the spatially varying and asymmetric distortion of the freeform lens. Therefore, their accuracy on unseen views stays limited.
Among non-parametric methods, MLS has a validation RMSE of 0.72 pixels and TPS has 0.86 pixels. Both improve over parametric methods, but their error increase from calibration to validation is larger than ours. This shows that local interpolation is sensitive to the distribution of calibration samples. Global splines also become less flexible where distortion changes rapidly.
Our framework gives the lowest validation error and the smallest calibration-to-validation gap. This shows that our adaptive knot placement and control-point regularization improve generalization and prevent overfitting to specific views. Also, the small standard deviation across different splits indicates that our method stays stable under different calibration-view choices.
In summary, the hold-out validation confirms that our framework fits calibration data accurately and generalizes well to new checkerboard poses. This supports its use in practical freeform lens calibration.

3.4. Spatial Residual Analysis

We analyze the reprojection residuals on the real-world YP dataset to study the spatial distribution of calibration errors. Unlike the global RMSE in Table 6, this analysis checks whether errors spread evenly or concentrate in certain image regions, especially near boundaries where freeform lens distortion is usually stronger.
Figure 9 shows the residual heatmaps of different methods. Color intensity indicates the residual magnitude. Zhang’s method gives large residuals over a wide area, particularly near boundaries. This shows that the global polynomial model cannot fully represent the spatially varying distortion of the freeform lens. BabelCalib and McCalib reduce the overall residual level, but some high-error regions remain. Their parametric models still have limits for asymmetric distortion. MLS gives lower residuals than parametric methods, but its residual distribution is less uniform. This reflects the sensitivity of local interpolation to the layout of calibration points. TPS gives a smoother residual pattern, but noticeable residuals still appear where distortion changes rapidly. Our method gives the most uniform and lowest residual distribution across the image plane. This indicates better spatial consistency and stronger ability to model complex freeform distortion.
To compare boundary performance quantitatively, we split the image domain into a center region and an edge region. The center region is the normalized area [ 0.25 , 0.75 ] × [ 0.25 , 0.75 ] , and the rest is the edge region. Table 9 lists the RMSE values in both regions. The edge-to-center increase is:
Δ edge center = RMSE edge RMSE center .
As Table 9 shows, all methods have higher errors at the edge than at the center. This is expected because the boundary area of the freeform lens has stronger nonlinear distortion and fewer stable calibration constraints. Among parametric methods, Zhang gives the largest edge error (3.322 pixels) and the largest edge-center increase (1.142 pixels). BabelCalib and McCalib reduce the increase to 0.712 and 0.456 pixels, but their edge errors stay high. This confirms that better optimization alone cannot fix the limited expressiveness of the distortion model.
For non-parametric methods, MLS and TPS greatly reduce both center and edge errors. However, MLS still has a larger edge-center increase than our method. This suggests that local interpolation becomes less stable near boundaries where calibration points are sparse. TPS also gives a larger edge error because its global smoothness constraint may over-smooth the highly distorted boundary regions. Our method achieves the lowest center RMSE (0.236 pixels) and the lowest edge RMSE (0.256 pixels). More importantly, its edge-center increase is only 0.019 pixels, which is much smaller than that of all other methods.
These results show that our adaptive B-spline calibration framework reduces the overall reprojection error and improves spatial error uniformity. The adaptive knot placement strategy allocates modeling capacity based on how distortion changes across the image. The regularized control-point estimation suppresses unstable boundary oscillations. As a result, our method maintains robust calibration accuracy in both the center and boundary regions of the freeform lens image.

3.5. Ablation Studies

3.5.1. Ablation Study on Knot Generation

This section validates the proposed kernel density estimation (KDE)-based knot generation strategy by comparing it against conventional uniform placement and intentionally pathological configurations. The objective is to demonstrate its necessity for maintaining numerical stability (measured by design matrix condition numbers, rank, and inactive columns) and achieving high calibration accuracy.
To visualize the spatial variation of distortions, Figure 10 illustrates the distortion vector distributions along the principal directions. The profiles reveal significant local complexity, particularly exhibiting stronger distortions near the periphery. As shown in Figure 11, the proposed KDE method dynamically allocates knots denser in these high-variation regions. In contrast, uniform placement ignores the underlying structural complexity, risking the creation of empty knot intervals in regions with sparse data support.
The quantitative baseline comparison (Table 10) confirms that KDE-generated knots yield significantly lower condition numbers and reprojection errors across all datasets.
Notably, for severe distortions like the Simulated fisheye, uniform placement results in a singular matrix (condition number ) due to localized data sparsity, whereas KDE maintains numerical feasibility and sub-pixel accuracy.
To explicitly test the boundaries of the stability conditions derived before, we further applied intentionally pathological knot configurations to the real YP dataset using identical optimization settings. As summarized in Table 11, while the KDE method preserves full rank (64/64) with zero inactive columns, pathological configurations clearly induce degeneracy.
Insufficient boundary coverage (pathological_boundary) reduces the design-matrix rank to 44 / 64 , introducing 10 zero columns. More extreme edge-concentrated cases (left_edge) further drop the rank to 22 / 64 with 40 zero columns and infinite condition numbers, completely destroying the basis support. Even configurations that maintain full rank (near_repeat) exhibit empty knot intervals, leading to degraded calibration accuracy. These results empirically validate that the proposed stability-aware KDE strategy is essential not only for improving fitting accuracy but for fundamentally preserving observability and robustness in freeform lens calibration.

3.5.2. Ablation Study on KDE Bandwidth Selection

The knot generation strategy relies on a weighted one-dimensional Gaussian KDE. While Scott’s rule serves as the default bandwidth initializer, the non-uniform distribution of calibration points necessitates evaluating the method’s sensitivity to bandwidth variations. To this end, we conducted an ablation study on the yp dataset, keeping all other parameters (initial estimation, regularization, grid size, and optimization settings) constant. We compared five bandwidth settings: Silverman, Scott  × 0.8 , Scott × 1.0 , Scott × 1.2 , and Scott × 1.5 .
As illustrated in Figure 12, the proposed method remains numerically stable across all tested bandwidths. Matrix-stability tracking confirmed that all settings preserved full effective rank (64/64) and produced zero inactive columns, verifying that the generated knot vectors consistently satisfy the support requirements derived above.
However, the final reprojection accuracy exhibits sensitivity to bandwidth selection. Scott × 1.2 yields the lowest RMSE of 0.2146 pixels, outperforming both the default Scott setting (0.2364 pixels) and Silverman’s rule (0.2344 pixels). Conversely, under-smoothing (Scott × 0.8 ) and over-smoothing (Scott × 1.5 ) noticeably degrade calibration quality. These findings confirm that while Scott’s rule provides a robust baseline, a mild increase over the default bandwidth further optimizes fitting performance for real-world asymmetric distortions.

3.5.3. Ablation Study on Weighting Strategies

During B-spline control point optimization, the weight assigned to each sampled distortion vector dictates its contribution to the loss function. We evaluated four weighting strategies on the yp dataset:
  • Uniform (Baseline):Assigns an equal weight ( w i = 1 ) to all points, assuming uniform reliability.
  • Magnitude-based: Weights are proportional to the initial residual magnitude, prioritizing regions with larger fitting errors.
  • Gradient-based: Fit a local plane using k nearest neighbors to obtain the gradient magnitude z as weight, focusing on regions with dramatic surface variations.
  • Local Std (Proposed): Weights are derived from the local standard deviation within a sliding window, suppressing random noise while preserving structural features.
All strategies were initialized from a similar state (RMSE ≈ 5.05 pixels). As summarized in Table 12, the proposed Local Std strategy delivers the best performance, reducing the final RMSE to 0.2363 pixels—a 42.65% improvement over the Uniform baseline. While Magnitude and Gradient strategies also achieve errors below 0.28 pixels, Local Std is superior due to its statistical ability to distinguish systematic distortion from measurement noise. By assigning higher confidence to regions with stable data distributions, this spatially-aware weighting mechanism proves essential for achieving sub-pixel accuracy in complex freeform lenses.

3.5.4. Ablation Study on Control Point Regularization

This section evaluates the contribution of the proposed regularization strategy to calibration accuracy and surface robustness. The strategy combines an L 2 penalty on control point weights ( λ r e g ) with a second-order finite difference smoothness constraint ( λ s m o o t h ).
To determine optimal hyperparameters, a grid-search ablation was conducted on the yp dataset (Table 13).
The results indicate that λ s m o o t h primarily balances model complexity and accuracy. While the absolute minimum RMSE (0.2298 pixels) occurs at λ r e g = λ s m o o t h = 0 , this unconstrained state is highly susceptible to overfitting induced by corner detection noise. A moderate constraint ( λ s m o o t h = 10 3 ) effectively suppresses local non-physical oscillations, whereas excessive constraints ( λ s m o o t h 10 1 ) cause underfitting by over-smoothing complex distortions.The L 2 penalty ( λ r e g ) ensures numerical completeness and structural robustness. Within the optimal λ s m o o t h = 10 3 column, increasing λ r e g from 0 to 10 3 causes only a 1.2% RMSE fluctuation, achieving a robust global optimum of 0.2364 pixels. Consequently, ( λ r e g , λ s m o o t h ) = ( 10 3 , 10 3 ) is selected as the optimal configuration.
Using these optimal parameters, we compared the proposed method against a baseline with No Regularization (NR) across multiple datasets (Table 14).
Quantitatively, the RMS reprojection errors remain remarkably close across all datasets, with differences strictly within 0.01 pixels. This confirms the regularization strategy maintains baseline accuracy. Qualitatively, as shown in Figure 13, the unregularized method exhibits significant non-physical oscillations in regions with sparse calibration points or complex asymmetric components. In contrast, the proposed method effectively suppresses overfitting, consistently generating smoother and physically plausible distortion surfaces without compromising numerical precision.

4. Discussion

Our performance gains come not only from using B-spline representation. Existing B-spline methods only use spline functions for distortion interpolation after calibration. Our framework directly integrates a continuous 2D B-spline distortion field into the calibration model and jointly optimizes it with camera parameters. Jacobian-based analysis shows that stability depends on basis-function activation and parameter observability. So we introduce an adaptive knot generation strategy. This strategy does more than improve fitting accuracy. It also preserves matrix rank, maintains numerical conditioning, and enables stable optimization under non-uniform calibration point distributions. Specifically, it adjusts knot density based on local distortion changes and enforces a minimum support constraint. This reduces instability from uneven data sampling.
Unlike TPS and MLS (often used as post-processing tools), our joint optimization gives the B-spline model a more stable trade-off between local control and global consistency. TPS tends to over-smooth high-distortion regions. MLS may cause regional inconsistencies. By solving distortion modeling and camera parameter estimation together in one unified optimization, our method better balances local fitting with global geometry. Under our settings, the method shows good numerical stability.
Despite these advantages, the proposed method has several limitations that warrant further investigation.
  • First, the current validation does not cover a wide range of lens types, imaging conditions, or different camera platforms. More extensive experiments are therefore needed to confirm the generalizability of our conclusions.
  • Second, the performance of the method is contingent upon the quantity and distribution of the calibration data. In cases where the data are extremely sparse or highly clustered, the stability of the estimation may be compromised.
  • Third, the current framework does not explicitly account for temporal variations or environmental factors, such as temperature-induced drift or mechanical vibration. Consequently, its applicability to dynamic or complex scenarios remains limited, and further extensions are required to handle such conditions.
  • Fourth, the joint optimization of camera parameters and control points incurs higher computational overhead compared to traditional parametric methods. This increased computational complexity may limit the operational efficiency of the proposed method in large-scale tasks and real-time applications that demand stringent low-latency performance.
Future work will explore multi-resolution adaptive spline representations, integrate learning-based priors to improve data efficiency, and extend to dynamic calibration scenarios, aiming to further enhance robustness while reducing computational and data dependencies.In addition, validation on multiple freeform lens systems and dynamic calibration scenarios will be conducted to better assess the general applicability of the proposed framework.

5. Conclusions

This paper proposed a calibration framework for freeform lenses using bicubic B-spline surfaces. The method combines Zhang’s initialization with an adaptive knot generation strategy based on kernel density estimation and dynamic grid adjustment. Regularization with L 2 and smoothness constraints is introduced to improve numerical stability.
Experiments on synthetic data show that the proposed method achieves mean reprojection errors of 0.45 pixels for symmetric distortion and 0.80 pixels for asymmetric distortion. On real-world freeform lens data, the method achieves a reprojection error of 0.24 pixels. Compared with traditional polynomial models, the B-spline representation offers greater flexibility in handling complex and asymmetric distortions. The adaptive knot placement ensures numerical stability even when calibration data are unevenly distributed. The regularization strategy prevents overfitting and produces physically plausible distortion surfaces. These results validate that combining B-spline surface modeling with adaptive optimization provides a practical and effective solution for freeform lens calibration.

Author Contributions

X.W. and B.W.: methodology; X.W., B.J. and L.H.: validation; X.W., Y.M. and B.W.: data curation; X.W.: writing—original draft preparation; B.W., G.L., B.J. and Y.M.: writing—review and editing; B.W.: project administration. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The datasets generated and analyzed during the current study are not publicly available as they were acquired using a Yipin lens and a checkerboard calibration target. However, they are available from the corresponding author upon reasonable request.

Conflicts of Interest

Author Gang Li was employed by Zhongke Zidong Information Technology (Beijing) Co., Ltd. Author Botao Jiang was employed by China Satellite Network Application Co., Ltd. Author Longxiang Huang was employed by Shenzhen Guangjian Technology Co., Ltd. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

References

  1. Afanaseva, O.; Solomashenko, A.; Shishova, M.; Timashova, L.; Sagatelyan, G.; Tsyganov, I. Design of freeform elements with a large exit pupil for AR display. Optik 2024, 319, 172101. [Google Scholar] [CrossRef]
  2. Kumar, S.; Zhong, W.; Williamson, J.; Kumar, P.; Furness, T.; Lou, S.; Zeng, W.; Jiang, X. Design, fabrication, and testing of freeform mirror-based head-up display system. Opt. Laser Technol. 2025, 186, 112653. [Google Scholar] [CrossRef]
  3. Yu, J.; Mao, X. Design of off-axis four-mirror optical systems enabled by freeform optics. Photonics 2025, 12, 107. [Google Scholar] [CrossRef]
  4. Ding, Y.; Zhang, N.; Yang, C. Design of freeform surface low-distortion automotive lens based on point-by-point construction. Acta Opt. Sin. 2024, 44, 223–233. [Google Scholar]
  5. Wang, S.; Kong, L.; Lv, H. Advances in Measurement and Error Evaluation Technique of Optical Freeform Surfaces. Acta Opt. Sin. 2023, 43, 0822013. [Google Scholar]
  6. Zhang, X.; Qiu, L.; Zhao, W.; Fu, Y.; Wang, Y.; Liu, Y. Free-form surface measurement with laser differential confocal precise positioning. Opt. Laser Technol. 2025, 183, 112325. [Google Scholar] [CrossRef]
  7. Zhang, Z. A flexible new technique for camera calibration. IEEE Trans. Pattern Anal. Mach. Intell. 2000, 22, 1330–1334. [Google Scholar] [CrossRef]
  8. Kannala, J.; Brandt, S. A generic camera model and calibration method for conventional, wide-angle, and fish-eye lenses. IEEE Trans. Pattern Anal. Mach. Intell. 2006, 28, 1335–1340. [Google Scholar] [CrossRef]
  9. Real-Moreno, O.; Rodríguez-Quiñonez, J.C.; Sergiyenko, O.; Flores-Fuentes, W.; Castro-Toscano, M.J.; Miranda-Vega, J.E.; Mercorelli, P.; Valdez-Rodríguez, J.A.; Trujillo-Hernández, G.; Sanchez-Castro, J.J. A Quadrant Approach of Camera Calibration Method for Depth Estimation Using a Stereo Vision System. In Proceedings of the IECON 2022—48th Annual Conference of the IEEE Industrial Electronics Society; IEEE: Piscataway, NJ, USA, 2022; pp. 1–6. [Google Scholar] [CrossRef]
  10. Real-Moreno, O.; Rodríguez-Quiñonez, J.C.; Flores-Fuentes, W.; Sergiyenko, O.; Miranda-Vega, J.E.; Trujillo-Hernández, G.; Hernández-Balbuena, D. Camera calibration method through multivariate quadratic regression for depth estimation on a stereo vision system. Opt. Lasers Eng. 2024, 174, 107932. [Google Scholar] [CrossRef]
  11. Ma, X.; Zhu, P.; Li, X.; Zheng, X.; Zhou, J.; Wang, X.; Wai Samuel Au, K. A Minimal Set of Parameters-Based Depth-Dependent Distortion Model and Its Calibration Method for Stereo Vision Systems. IEEE Trans. Instrum. Meas. 2024, 73, 1–11. [Google Scholar] [CrossRef]
  12. Rameau, F.; Park, J.; Bailo, O.; Kweon, I.S. MC-Calib: A generic and robust calibration toolbox for multi-camera systems. Comput. Vis. Image Underst. 2022, 217, 103353. [Google Scholar] [CrossRef]
  13. Lochman, Y.; Liepieshov, K.; Chen, J.; Perdoch, M.; Zach, C.; Pritts, J. Babelcalib: A universal approach to calibrating central cameras. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Montreal, QC, Canada, 10–17 October 2021; pp. 15253–15262. [Google Scholar]
  14. Jin, Z.; Li, Z.; Gan, T.; Fu, Z.; Zhang, C.; He, Z.; Zhang, H.; Wang, P.; Liu, J.; Ye, X. A novel central camera calibration method recording point-to-point distortion for vision-based human activity recognition. Sensors 2022, 22, 3524. [Google Scholar] [CrossRef] [PubMed]
  15. Zhan, N.; Zhang, X.; Ye, J.; Wang, T.; Dong, Z.; Song, Z. High-precision parameter-free optical distortion measurement and correction via digital image correlation. Opt. Laser Technol. 2024, 177, 111129. [Google Scholar] [CrossRef]
  16. Yinguo, L.; Cheng, C. Distortion correction method for cameras with wide-angle lens based on nonlinear spline interpolation. CAAI Trans. Intell. Syst. 2020, 15, 1033–1039. [Google Scholar] [CrossRef]
  17. Huang, L.; Wang, X.; Hou, J.; Zhou, X.; Wang, B.; Zhu, L.; Lyu, F. A Free-form Surface Distortion Correction Method and Process Based on Moving Least Squares Surface Fitting. Chinese Patent 202411229789.X, 24 November 2024. Available online: https://www.xjishu.com/zhuanli/55/202411229789.html (accessed on 10 November 2024).
  18. Yu, J.; Sun, H.; Xia, Z.; Zhu, J.; Zhang, Z. Sample balancing of curves for lens distortion modeling and decoupled camera calibration. Opt. Commun. 2023, 537, 129221. [Google Scholar] [CrossRef]
  19. Wang, K.; Liu, C.; Shen, S. Geometric calibration for cameras with inconsistent imaging capabilities. Sensors 2022, 22, 2739. [Google Scholar] [CrossRef]
  20. Zhao, Y.; Huang, X.; Zhang, Z. Deep Lucas-Kanade Homography for Multimodal Image Alignment. In Proceedings of the 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Nashville, TN, USA, 20–25 June 2021; pp. 15945–15954. [Google Scholar] [CrossRef]
  21. Cao, S.Y.; Hu, J.; Sheng, Z.; Shen, H.L. Iterative Deep Homography Estimation. In Proceedings of the 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, LA, USA, 19–24 June 2022; pp. 1869–1878. [Google Scholar] [CrossRef]
  22. Ye, N.; Wang, C.; Fan, H.; Liu, S. Motion Basis Learning for Unsupervised Deep Homography Estimation with Subspace Projection. In Proceedings of the 2021 IEEE/CVF International Conference on Computer Vision (ICCV), Montreal, QC, Canada, 11–17 October 2021; pp. 13097–13105. [Google Scholar] [CrossRef]
  23. Shao, R.; Wu, G.; Zhou, Y.; Fu, Y.; Fang, L.; Liu, Y. LocalTrans: A Multiscale Local Transformer Network for Cross-Resolution Homography Estimation. In Proceedings of the 2021 IEEE/CVF International Conference on Computer Vision (ICCV), Montreal, QC, Canada, 11–17 October 2021; pp. 14870–14879. [Google Scholar] [CrossRef]
  24. Jiang, H.; Li, H.; Han, S.; Fan, H.; Zeng, B.; Liu, S. Supervised Homography Learning with Realistic Dataset Generation. arXiv 2023, arXiv:2307.15353. [Google Scholar] [CrossRef]
  25. Cattaneo, D.; Vaghi, M.; Ballardini, A.L.; Fontana, S.; Sorrenti, D.G.; Burgard, W. CMRNet: Camera to LiDAR-Map Registration. In Proceedings of the 2019 IEEE Intelligent Transportation Systems Conference (ITSC), Auckland, New Zealand, 27–30 October 2019; pp. 1283–1289. [Google Scholar] [CrossRef]
  26. Yao, L.; Chen, C.; Li, X.; Yan, Z.; Zuo, W. Combining Generative and Geometry Priors for Wide-Angle Portrait Correction. arXiv 2024, arXiv:2410.09911. [Google Scholar] [CrossRef]
  27. Dal Cin, A.P.; Azzoni, F.; Boracchi, G.; Magri, L. Revisiting Calibration of Wide-Angle Radially Symmetric Cameras. In Proceedings of the Computer Vision–ECCV 2024; Leonardis, A., Ricci, E., Roth, S., Russakovsky, O., Sattler, T., Varol, G., Eds.; Springer: Cham, Switzerland, 2025; pp. 214–230. [Google Scholar]
  28. Zhao, K.; Lin, C.; Liao, K.; Yang, S.; Zhao, Y. Revisiting Radial Distortion Rectification in Polar-Coordinates: A New and Efficient Learning Perspective. IEEE Trans. Circuits Syst. Video Technol. 2022, 32, 3552–3560. [Google Scholar] [CrossRef]
  29. Athwale, A.; Shili, I.; Bergeron, É.; Ahmad, O.; Lalonde, J.F. DarSwin-Unet: Distortion Aware Encoder-Decoder Architecture. arXiv 2025, arXiv:2407.17328. [Google Scholar]
  30. Cao, M.; Yang, S.; Yang, Y.; Zheng, Y. Rolling Shutter Correction with Intermediate Distortion Flow Estimation. arXiv 2024, arXiv:2404.06350. [Google Scholar] [CrossRef]
  31. Nguyen, H.; Jang, Y.M. Design and Implementation of Rolling Shutter MIMO-OFDM scheme for Optical Camera Communication System. In Proceedings of the 2021 International Conference on Information and Communication Technology Convergence (ICTC), Jeju Island, Republic of Korea, 20–22 October 2021; pp. 798–800. [Google Scholar] [CrossRef]
  32. Fan, B.; Wan, Z.; Shi, B.; Xu, C.; Dai, Y. Unified Video Reconstruction for Rolling Shutter and Global Shutter Cameras. IEEE Trans. Image Process. 2024, 33, 6821–6835. [Google Scholar] [CrossRef] [PubMed]
  33. Kawanishi, H.; Hara, Y.; Tsubouchi, T.; Ohya, A. Calibration of lens distortion for super-wide-angle stereo vision. In Proceedings of the 2015 IEEE International Conference on Automation Science and Engineering (CASE); IEEE: Piscataway, NJ, USA, 2015; pp. 843–848. [Google Scholar]
  34. Hu, H.; Qian, B.; Fan, L. An accurate underwater camera calibration method based on a nonparametric distortion model. Measurement 2025, 258, 119024. [Google Scholar] [CrossRef]
Figure 1. Schematic diagram of the overall calibration pipeline. The process begins with initial parameter estimation using Zhang’s method, followed by B-spline surface modeling with stability-aware knot vector generation, and concludes with joint optimization of all parameters to achieve accurate distortion calibration and correction.
Figure 1. Schematic diagram of the overall calibration pipeline. The process begins with initial parameter estimation using Zhang’s method, followed by B-spline surface modeling with stability-aware knot vector generation, and concludes with joint optimization of all parameters to achieve accurate distortion calibration and correction.
Applsci 16 05775 g001
Figure 2. Simulated undistorted corner point data across four different viewpoints: (a) Viewpoint 1; (b) Viewpoint 2; (c) Viewpoint 3; (d) Viewpoint 4. Red dashed lines indicate image boundaries, blue lines represent the horizontal grid lines of the original chessboard, red dots represent corner points within the field of view (FOV), and gray dots denote the original chessboard corners located outside the FOV.
Figure 2. Simulated undistorted corner point data across four different viewpoints: (a) Viewpoint 1; (b) Viewpoint 2; (c) Viewpoint 3; (d) Viewpoint 4. Red dashed lines indicate image boundaries, blue lines represent the horizontal grid lines of the original chessboard, red dots represent corner points within the field of view (FOV), and gray dots denote the original chessboard corners located outside the FOV.
Applsci 16 05775 g002
Figure 3. Distortion patterns at Viewpoint 0 for three models. Each subfigure consists of two parts: the left shows distortion displacement, where green dots indicate ideal points, red crosses indicate distorted points, and blue vectors represent displacement in pixel coordinates; the right shows distortion curves, where blue and red curves correspond to poly3 fits for x and y directions, and scattered points represent actual Δ x and Δ y .
Figure 3. Distortion patterns at Viewpoint 0 for three models. Each subfigure consists of two parts: the left shows distortion displacement, where green dots indicate ideal points, red crosses indicate distorted points, and blue vectors represent displacement in pixel coordinates; the right shows distortion curves, where blue and red curves correspond to poly3 fits for x and y directions, and scattered points represent actual Δ x and Δ y .
Applsci 16 05775 g003
Figure 4. Performance degradation curves showing the relationship between noise level σ and calibration RMSE.
Figure 4. Performance degradation curves showing the relationship between noise level σ and calibration RMSE.
Applsci 16 05775 g004
Figure 5. Checkerboard images used for calibration. Subplot labels indicate the shooting distance [mm], pitch angle, and yaw angle, respectively.
Figure 5. Checkerboard images used for calibration. Subplot labels indicate the shooting distance [mm], pitch angle, and yaw angle, respectively.
Applsci 16 05775 g005
Figure 6. Optical distortion profiles of the commercial Yipin freeform lens obtained from Zemax simulations: (a) horizontal distortion profile; (b) vertical distortion profile.
Figure 6. Optical distortion profiles of the commercial Yipin freeform lens obtained from Zemax simulations: (a) horizontal distortion profile; (b) vertical distortion profile.
Applsci 16 05775 g006
Figure 7. Initial distortion field of the YP dataset for view 0, presented in the same format as Figure 3.
Figure 7. Initial distortion field of the YP dataset for view 0, presented in the same format as Figure 3.
Applsci 16 05775 g007
Figure 8. Visual comparison of distortion rectification results.
Figure 8. Visual comparison of distortion rectification results.
Applsci 16 05775 g008
Figure 9. Spatial residual heatmaps on the real-world YP dataset. Warmer colors mean larger reprojection residuals. Our method gives the lowest and most uniform residual distribution.
Figure 9. Spatial residual heatmaps on the real-world YP dataset. Warmer colors mean larger reprojection residuals. Our method gives the lowest and most uniform residual distribution.
Applsci 16 05775 g009
Figure 10. Distribution of distortion vectors along the x / y directions. Peaks indicate high distortion variation requiring denser knot placement.
Figure 10. Distribution of distortion vectors along the x / y directions. Peaks indicate high distortion variation requiring denser knot placement.
Applsci 16 05775 g010
Figure 11. Knot vector distributions generated by the proposed KDE method across the four datasets. Numbers indicate the count of corner points within each knot interval.
Figure 11. Knot vector distributions generated by the proposed KDE method across the four datasets. Numbers indicate the count of corner points within each knot interval.
Applsci 16 05775 g011
Figure 12. Bandwidth sensitivity analysis for KDE-based knot generation on the yp dataset. The dual Y-axis plot illustrates the variation of reprojection RMSE and average condition number across different bandwidth settings.
Figure 12. Bandwidth sensitivity analysis for KDE-based knot generation on the yp dataset. The dual Y-axis plot illustrates the variation of reprojection RMSE and average condition number across different bandwidth settings.
Applsci 16 05775 g012
Figure 13. Comparison of reconstructed distortion surfaces across four datasets. In each subplot, the left portion represents the raw surface without regularization, while the right portion displays the smoothed surface constrained by regularization.
Figure 13. Comparison of reconstructed distortion surfaces across four datasets. In each subplot, the left portion represents the raw surface without regularization, while the right portion displays the smoothed surface constrained by regularization.
Applsci 16 05775 g013
Table 1. Coordinate systems and notation.
Table 1. Coordinate systems and notation.
SymbolQuantityCoordinate System
P w 3D coordinates of a point in the world frameWorld
P c 3D coordinates in the camera reference frameCamera
X c , Y c , Z c Components of P c along the camera axesCamera
x n , y n Normalized image coordinates after perspective divisionImage Plane
u ideal , v ideal Undistorted pixel coordinates prior to distortion correctionPixel
u , v Normalized coordinates scaled to the [ 0 , 1 ] × [ 0 , 1 ] domainPixel-based
Δ x , Δ y Lens distortion offsets in horizontal and vertical directionsPixel-based
u d , v d Final distorted pixel coordinates after applying distortionPixel
u obs , v obs Observed calibration image coordinatesPixel
Table 2. Main implementation parameters of the proposed method.
Table 2. Main implementation parameters of the proposed method.
ParameterValueDescription
B-spline order3Bicubic B-spline surface
Max number of knot intervals15Prevents over-parameterization
Min support threshold max ( 10 , N total / 50 ) Ensures active basis functions
KDE bandwidth Scott × 1.0 From bandwidth ablation study (Section 3.5.2)
λ r e g 10 3 L 2 regularization, from ablation study (Section 3.5.4)
λ s m o o t h 10 3 Laplacian smoothing, from ablation study (Section 3.5.4)
LM max iterations500For nonlinear joint optimization
Convergence tolerance 10 6 LM stopping criterion
Table 3. Final knot intervals and control point grids for each dataset.
Table 3. Final knot intervals and control point grids for each dataset.
DatasetU-Direction IntervalsV-Direction IntervalsControl Point Grid Size
Radial88 11 × 11
Fisheye109 13 × 12
Asymmetric910 12 × 13
YP (real data)77 10 × 10
Table 4. Reprojection errors across viewpoints for different distortion types (synthetic data).
Table 4. Reprojection errors across viewpoints for different distortion types (synthetic data).
Distortion TypeMethodV0V1V2V3V4V5V6V7V8V9Overall
radialZhang2.8623.0253.0573.0632.5902.9313.0423.2403.1552.7063.420
BabelCalib1.251.421.381.351.181.301.451.481.331.201.32
McCalib1.201.351.381.281.151.221.381.421.281.181.284
MLS0.650.720.780.690.710.680.740.760.730.700.682
TPS0.640.640.650.630.640.650.640.630.640.640.643
ours0.380.540.550.490.480.400.450.490.470.540.393
asymmetricZhang14.63614.63615.18615.53616.46015.56113.74714.20515.66116.70016.917
BabelCalib1.851.922.102.052.201.981.781.882.052.151.98
McCalib1.551.501.681.581.721.581.421.621.621.681.595
MLS1.251.181.321.211.291.241.271.301.261.231.255
TPS1.281.231.421.301.221.151.351.481.281.401.374
ours0.720.700.930.650.750.660.710.780.700.660.797
fisheyeZhang3.7513.6603.5723.7803.7533.8413.7883.7363.8303.9484.571
BabelCalib1.051.181.221.101.081.021.151.201.121.051.12
McCalib0.880.890.910.900.870.860.920.940.910.890.983
MLS0.820.890.950.850.870.840.910.930.880.860.880
TPS0.850.921.080.910.880.790.941.120.950.860.921
ours0.480.610.650.540.590.480.550.660.550.540.444
Note: Per-view values are the mean reprojection errors (MSE); Overall is the global RMSE.
Table 5. Noise sensitivity of the proposed method in terms of RMSE.
Table 5. Noise sensitivity of the proposed method in terms of RMSE.
Distortion Type σ = 0.1 0.15 0.2 0.3 0.4 0.5 1.0 1.5 2.0
radial0.2830.3070.3390.3930.4470.5180.9561.4241.899
fisheye0.3740.3790.3980.4440.5020.5660.9511.3861.846
asymmetric0.7650.7740.7840.7970.8490.8891.1981.5742.041
Table 6. Reprojection errors across 10 views on the YP dataset (pixels).
Table 6. Reprojection errors across 10 views on the YP dataset (pixels).
View IDZhangBabelCalibMcCalibMLSTPSOurs
V01.951.9121.680.430.580.26
V12.071.8521.680.690.620.27
V22.151.9071.680.650.650.26
V32.031.8391.720.720.600.27
V41.791.5531.750.730.560.29
V51.771.7001.830.390.520.25
V62.201.9721.820.530.640.27
V72.141.8821.800.600.700.27
V82.031.7041.740.670.630.26
V91.971.6741.690.720.590.29
Overall2.441.8051.4390.480.670.24
Note: Per-view values are the mean reprojection errors (MSE); Overall is the global RMSE.
Table 7. Comparison of geometric quality metrics for different rectification methods.
Table 7. Comparison of geometric quality metrics for different rectification methods.
MethodStraightness RMSESpacing CVOrthogonality ErrorDistortion Smoothness
Raw image11.1610.1115.820.095
Zhang’s method3.8500.0722.940.061
BabelCalib2.6500.0562.150.049
McCalib2.4200.0531.950.045
MLS1.9800.0471.600.038
TPS1.7800.0431.420.032
Spline (Ours)1.4200.0361.120.025
Table 8. Hold-out view validation results on the real-world YP dataset. Eight views are used for calibration and two unseen views for validation in each split.
Table 8. Hold-out view validation results on the real-world YP dataset. Eight views are used for calibration and two unseen views for validation in each split.
MethodCalibration RMSE (px)Validation RMSE (px)Error Increase (px)
Zhang2.48 ± 0.092.71 ± 0.180.23
BabelCalib1.86 ± 0.082.04 ± 0.150.18
McCalib1.50 ± 0.071.68 ± 0.130.18
MLS0.53 ± 0.060.72 ± 0.110.19
TPS0.70 ± 0.050.86 ± 0.100.16
Spline (Ours)0.27 ± 0.030.36 ± 0.050.09
Table 9. Center and edge reprojection errors on the real-world YP dataset.
Table 9. Center and edge reprojection errors on the real-world YP dataset.
MethodCenter RMSE (px)Edge RMSE (px)Increase (px)
Zhang2.1803.3221.142
BabelCalib1.6472.3590.712
McCalib1.3411.7970.456
MLS0.4650.5410.076
TPS0.6440.7720.129
Spline (Ours)0.2360.2560.019
Note: Bold values indicate the best calibration performance.
Table 10. Condition numbers and reconstruction errors for uniform vs KDE-Based knot placement.
Table 10. Condition numbers and reconstruction errors for uniform vs KDE-Based knot placement.
DatasetKDE-Generated KnotsUniform KnotsReconstruction Error (px)
X-Dir Y-Dir X-Dir Y-Dir KDE Uniform
radial 2.81 × 10 4 7.80 × 10 3 1.80 × 10 5 7.66 × 10 4 0.393 0.673
fisheye 1.53 × 10 4 6.95 × 10 4 0.797 1.119
asymmetric 2.03 × 10 2 1.94 × 10 2 5.77 × 10 2 5.77 × 10 2 0.444 0.735
yp 9.69 × 10 1 8.67 × 10 1 3.16 × 10 2 3.16 × 10 2 0.236 0.412
Note: Bold values indicate the best calibration performance.
Table 11. Analysis of knot placement and matrix degeneracy on the yp dataset.
Table 11. Analysis of knot placement and matrix degeneracy on the yp dataset.
Knot ConfigurationRankZero ColsCond(A) (dx/dy)Min. Singular Val.Empty IntervalsRMSE
Proposed KDE64/640/084.85/70.990.0741/0.08570/00.236
Uniform64/640/0297.93/297.930.0230/0.02300/00.412
Pathological boundary44/6410/10/0/02/22.1756
Near repeat64/640/064.01/64.010.0699/0.06993/20.4772
One-side right64/640/064.00/64.000.0699/0.06993/20.4759
Left edge22/6440/40/0/04/41.4864
Nonuniform left22/6440/40/0/04/41.5135
Note: Bold values indicate the best calibration performance.
Table 12. Calibration accuracy under different weighting strategies (yp Dataset).
Table 12. Calibration accuracy under different weighting strategies (yp Dataset).
Weighting ModeInitial RMSEFinal RMSEImprovement
Uniform5.05820.4120-
Magnitude5.05670.271234.17%
Gradient5.05600.274733.33%
Local Std5.05220.236342.65%
Table 13. Reprojection RMSE for different regularization parameters.
Table 13. Reprojection RMSE for different regularization parameters.
λ reg λ smooth 01 ×   10 4 1 ×   10 3 1 ×   10 2 1 ×   10 1
00.22980.24170.23940.37090.9884
1 ×   10 5 0.24120.24190.23870.36530.9888
1 ×   10 4 0.24250.24330.23720.35900.9849
1 ×   10 3 0.24010.25870.23640.33440.9823
1 ×   10 2 0.30290.30360.30970.35750.8222
Table 14. RMS reprojection errors for different regularization strategies.
Table 14. RMS reprojection errors for different regularization strategies.
DatasetNo Regularization (NR)Proposed
radial0.38460.3927
fisheye0.46360.4442
asymmetric0.79060.7970
yp0.22980.2364
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Wang, X.; Wang, B.; Li, G.; Jiang, B.; Huang, L.; Ma, Y. Adaptive B-Spline-Based Distortion Modeling and Calibration for Cameras with Freeform Lenses. Appl. Sci. 2026, 16, 5775. https://doi.org/10.3390/app16125775

AMA Style

Wang X, Wang B, Li G, Jiang B, Huang L, Ma Y. Adaptive B-Spline-Based Distortion Modeling and Calibration for Cameras with Freeform Lenses. Applied Sciences. 2026; 16(12):5775. https://doi.org/10.3390/app16125775

Chicago/Turabian Style

Wang, Xiangyuan, Bin Wang, Gang Li, Botao Jiang, Longxiang Huang, and Yan Ma. 2026. "Adaptive B-Spline-Based Distortion Modeling and Calibration for Cameras with Freeform Lenses" Applied Sciences 16, no. 12: 5775. https://doi.org/10.3390/app16125775

APA Style

Wang, X., Wang, B., Li, G., Jiang, B., Huang, L., & Ma, Y. (2026). Adaptive B-Spline-Based Distortion Modeling and Calibration for Cameras with Freeform Lenses. Applied Sciences, 16(12), 5775. https://doi.org/10.3390/app16125775

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop