Abstract
This paper introduces a robust, low-parameter mathematical model for a camera’s Opto-Electronic Conversion Function (OECF) to resolve color mismatches in panoramic photography. By utilizing a specific arctan-based function and a refined error metric, the proposed method avoids the "degenerate solutions" that typically hinder automated color calibration, ensuring stable and visually seamless results.
Introduction
Stitching multiple photographs into a single panorama often results in visible seams due to variations in automatic exposure and white balance between shots. To fix this, it is necessary to model the camera's Opto-Electronic Conversion Function (OECF)—the internal curve mapping raw light intensity to pixel values. Estimating this curve from images is a complex problem; standard mathematical approaches often fail, producing "degenerate" results where the software maps the entire image to a single flat color to minimize error.
The OECF Model
The authors propose a monotonic function based on the arctangent to model the camera response:
$$S_a(x) = x + \frac{2}{\pi} \arctan\left(\frac{a \sin(\pi x)}{1 - a \cos(\pi x)}\right)$$
This model offers several key advantages. It uses a minimal number of parameters (typically one or two), which reduces computational complexity. Furthermore, the function behaves almost linearly with respect to its parameters, ensuring that optimization techniques like Levenberg-Marquardt converge reliably. As illustrated in Figure 1, the model can represent a wide variety of typical digital camera response curves by adjusting the parameter $a$.
Preventing Degeneracy with a Refined Error Metric
To prevent the optimization algorithm from collapsing into a degenerate state (e.g., mapping all pixels to zero), the authors developed an error metric expressed in an equalized image space and normalized by the derivative of the OECF. This constraint forces the algorithm to find a physically meaningful mapping that preserves image structure rather than finding a mathematical shortcut to zero error.
Results and Discussion
The model's performance is demonstrated through qualitative visual improvements in image stitching. Figure 2 shows a checkerboard blend of two images taken with varying automatic settings. Before correction, the exposure and color differences are jarring. After applying the OECF estimation and correction, the boundaries between the images become nearly invisible.
The method is also robust against "clipped" or saturated pixels, which are common in high-contrast scenes. Due to its low parameter count, the optimization is computationally efficient, making it suitable for real-time applications on mobile devices where processing power is limited.
Conclusion
By combining a stable arctan-based parametric model with a degeneracy-resistant error metric, this research provides a practical and efficient solution for color-consistent panoramic stitching. The approach successfully addresses the challenges of automated OECF estimation, leading to high-quality, seamless photographic results.
Summary updated