Abstract
We propose a novel camera calibration method for defocused images using a smartphone under the assumption that the defocus blur is modeled as a convolution of a sharp image with a Gaussian point spread function (PSF). In contrast to existing calibration approaches which require well-focused images, the proposed method achieves accurate camera calibration with severely defocused images. This robustness to defocus is due to the proposed set of unidirectional binary patterns, which simplifies 2D Gaussian deconvolution to a 1D Gaussian deconvolution problem with multiple observations. By capturing the set of patterns consecutively displayed on a smartphone, we formulate the feature extraction as a deconvolution problem to estimate feature point locations in sub-pixel accuracy and the blur kernel in each location. We also compensate the error in camera parameters due to refraction of the glass panel of the display device. We evaluate the performance of the proposed method on synthetic and real data. Even under severe defocus, our method shows accurate camera calibration result.
Introduction
Camera calibration is the foundational process of determining a camera’s internal characteristics (like focal length) and its position in space. Traditionally, this requires capturing sharp, in-focus images of a known pattern, usually a checkerboard. However, "perfect focus" isn't always possible. For instance, calibrating a camera for macro photography or a fixed-focus camera on a self-driving car meant for long distances often results in blurry calibration targets.
This defocus blur smears the corners of a checkerboard, leading to "corner rounding" and significant mathematical errors. Furthermore, while using digital screens as calibration targets is popular due to their flatness, the glass panel on these devices refracts light, introducing subtle but impactful spatial distortions that most models ignore.
Methodology
The proposed method introduces three main innovations to achieve robustness against defocus:
- Unidirectional Binary Patterns: Instead of a 2D checkerboard, the system uses a series of vertical and horizontal binary stripes. Mathematically, 2D defocus blur is complex to "undo." By using stripes, the 2D Gaussian deconvolution problem is simplified into a much more manageable 1D problem.
- Sub-pixel Feature Refinement: Because the patterns are simple stripes, the "edges" can be modeled as a step function convolved with a Gaussian blur kernel. The system captures multiple patterns consecutively to estimate both the exact sub-pixel location of the feature and the size of the blur kernel ($\sigma$) simultaneously.
- Refraction Correction: A physical model based on Snell’s Law is incorporated to compensate for light bending as it exits the smartphone's LCD through the glass cover. Glass thickness is treated as a variable to be optimized, ensuring the "perceived" location of the pixel matches its "actual" physical location.
Experimental Setup and Results
The researchers evaluated their approach using synthetic data, generating 300 random viewpoints with simulated Gaussian blur ranging from 0 to 20 pixels in standard deviation. In real-world tests, a stereo camera system focused at infinity was calibrated using an iPhone 5 held just 15cm away, creating a "severe defocus" scenario.
Key Results
- Superior Accuracy under Blur: In synthetic tests, while traditional methods like the Harris corner detector saw errors skyrocket as blur increased, the proposed method maintained a mean distance error of less than 0.1 pixels even at extreme blur levels ($\sigma = 20$).
- Real-world Performance: In the stereo camera setup, the proposed method achieved a mean reprojection error of 0.1158 pixels, significantly outperforming the zero-crossing method (0.2272) and standard checkerboard refinement (0.7024).
- Refraction Gains: Including the refraction correction model improved focal length estimation accuracy, bringing results much closer to the "ground truth" established by a large-scale distant checkerboard.
Discussion and Conclusion
The core insight of this work is the 1D simplification: while a 2D corner is hard to localize under blur, the axis of symmetry in a 1D stripe remains stable. This allows for focus-independent calibration, where a "long-distance" camera can be calibrated using a "short-distance" smartphone target without adjusting the lens.
While the method requires a digital display and is sensitive to image compression (JPEG artifacts), it provides a robust solution for scenarios where traditional targets fail. Future work may explore using the estimated blur size ($\sigma$) for "depth-from-defocus" applications, potentially turning the calibration process into a depth-sensing tool.
Summary updated