Abstract
Real-world lighting often consists of multiple illuminants with different spectra. Separating and manipulating these illuminants in post-process is a challenging problem that requires either significant manual input or calibrated scene geometry and lighting. In this work, we leverage a flash/no-flash image pair to analyze and edit scene illuminants based on their spectral differences. We derive a novel physics-based relationship between color variations in the observed flash/no-flash intensities and the spectra and surface shading corresponding to individual scene illuminants. Our technique uses this constraint to automatically separate an image into constituent images lit by each illuminant. This separation can be used to support applications like white balancing, lighting editing, and RGB photometric stereo, where we demonstrate results that outperform state-of-the-art techniques on a wide range of images.
Introduction: The Challenge of Mixed Illumination
In typical indoor and outdoor environments, scenes are rarely illuminated by a single light source. A single room might contain warm incandescent bulbs, green-tinted fluorescent tubes, and cool blue daylight from a window. For photographers and computer vision systems, this "mixed illumination" presents a significant challenge. Standard white balancing often fails, and editing the color or intensity of a specific light source usually requires tedious manual masking.
Technically, separating these light sources is an ill-posed problem. At any given pixel, a camera records a single color value that is a product of the object's reflectance and the combined spectra of all incident light. Without prior knowledge of 3D geometry or specialized lighting equipment, decomposing this mixture automatically has remained largely out of reach.
Methodology: Leveraging Flash and the Hull Constraint
The proposed method addresses this problem by utilizing a flash/no-flash image pair. By capturing two photos—one with the camera's flash and one without—the system can isolate the "pure flash" component. Since the flash's spectrum is known, it serves as a reference to estimate the scene's reflectance (the "true color" of objects) at every pixel.
The core innovation is the Hull Constraint. Once reflectance is estimated, the authors derive a reflectance-invariant mathematical property. They demonstrate that the observed light mixture at every pixel must lie within a "conic hull" defined by the spectra of the individual light sources. By projecting the light information from the no-flash image onto a 2D sphere, the algorithm identifies the "corners" of the resulting geometric shape (e.g., an arc for two lights, a triangle for three). These corners represent the pure spectra of the scene's illuminants, allowing the system to "unmix" the image into individual components.
Key Insights: Shadows and Reflectance Invariance
Several key insights drive the success of this approach:
- Shadows as a Feature: While often considered a nuisance, shadows are vital here. A pixel in the shadow of one light but illuminated by another provides a "pure" sample of the second light, helping the algorithm locate the vertices of the Hull Constraint more accurately.
- Reflectance Invariance: By mathematically removing the influence of object color, the method isolates light transport. This ensures the separation remains consistent regardless of the scene's material colors.
- Minimal Input: Moving from a single photo to a flash/no-flash pair provides the necessary information to transform an ambiguous estimation problem into a solvable physics-based optimization.
Results and Applications
The method was validated using synthetic data rendered in Mitsuba and real-world captures from a Nikon D800. It significantly outperforms standard "blind" separation techniques like Non-negative Matrix Factorization (NNMF).
- Quantitative Performance: In two-light scenarios, the method achieved a Signal-to-Noise Ratio (SNR) of 20.43 dB, more than doubling the 10.13 dB achieved by previous state-of-the-art methods.
- Lighting Editing: The decomposition allows for "post-capture lighting editing," where users can adjust the color and brightness of specific lights while maintaining realistic shadows and highlights.
- Photometric Stereo: The separated images enable high-accuracy 3D surface normal estimation. The two-shot approach yielded a mean error of only 0.57°, compared to 23.42° for single-shot methods.
Limitations and Conclusion
While powerful, the method has limitations. It relies on the flash reaching all parts of the scene, making it less effective for large-scale outdoor environments. Additionally, because standard cameras have only three color channels (RGB), the problem becomes highly ambiguous if four or more distinct light spectra are present. The current model also assumes Lambertian (matte) surfaces and may struggle with highly specular or mirror-like objects.
Future work includes extending the technique to video and integrating it into smartphone "Auto White Balance" systems to better handle complex indoor/outdoor lighting transitions.
Summary updated