Lighting Inconsistency Analysis is a forensic technique that estimates the three-dimensional illumination environment from distinct objects or faces within a single image to detect physically impossible lighting mismatches. By modeling the light source direction, color temperature, and specular highlight geometry for each region of interest, analysts can identify composite images where inserted elements were captured under different lighting conditions than the background scene.
Glossary
Lighting Inconsistency Analysis

What is Lighting Inconsistency Analysis?
A digital image forensics technique that estimates the three-dimensional light environment from different objects or faces in a scene to identify mismatched illumination direction, color, or intensity, revealing composite or manipulated imagery.
The method exploits the fact that human forgers and generative models often fail to perfectly replicate the complex interplay of ambient occlusion, diffuse reflection, and cast shadows across spliced elements. Advanced implementations fit 3D morphable models to faces or use inverse rendering on surfaces to mathematically reconstruct the incident light field, flagging statistically significant deviations in estimated azimuth and elevation angles as evidence of tampering.
Key Forensic Characteristics
The core physical and computational principles used to estimate a scene's illumination environment and detect mismatches that reveal digital compositing or synthetic generation.
3D Light Direction Estimation
The foundational process of inferring the dominant light source vector from an object's shading pattern. By analyzing the intensity gradient across a surface—typically a face or a sphere-like object—algorithms solve for the Lambertian reflectance equation to compute the azimuth and elevation of the illuminant. A mismatch in the estimated light direction between two objects in the same scene is a primary indicator of compositing.
- Surface Normals: Calculated from a 3D model fit or photometric stereo.
- Cast Shadows: The angle of attached and cast shadows provides a geometric constraint on the light source position.
- Specular Highlights: The location of the brightest point on a glossy surface directly indicates the light vector.
Color Constancy & Illuminant Color
This analysis estimates the chromaticity of the light source(s) illuminating the scene. The human visual system automatically corrects for illuminant color, but forensic algorithms can reverse this process. If one face exhibits a warm, tungsten-like illuminant while another shows a cool, daylight-balanced illuminant, the image is a composite. Techniques include analyzing the distribution of pixel colors in the inverse-intensity chromaticity space to separate body reflection from interface reflection.
Specular Highlight Morphology
The shape, size, and intensity distribution of specular highlights on the eyes, skin, or glossy objects must be physically consistent. A specular highlight mismatch occurs when the reflection in the left eye points to a different light source shape than the right eye, or when the highlight on a foreground object does not match the scene's dominant light. Deepfake models often generate plausible but physically incorrect highlights that fail a photometric consistency check.
Ambient Occlusion & Contact Shadows
Ambient occlusion describes the soft, darkening effect in crevices and areas where objects meet, caused by the occlusion of diffuse environmental light. In a composite image, a pasted object often lacks correct contact shadows where it meets the ground plane, or exhibits ambient occlusion inconsistent with the background's geometry. This is a critical cue for detecting object insertion, as generative models frequently fail to model this global illumination phenomenon accurately.
Frequency Domain Illumination Analysis
By transforming an image into the frequency domain via a Discrete Fourier Transform (DFT) or wavelet decomposition, analysts can detect inconsistencies in lighting that are invisible in the spatial domain. Splicing boundaries often introduce high-frequency anomalies at the seam. Furthermore, the lighting of a synthetic face generated by a neural network may exhibit a different frequency signature—such as a lack of natural high-frequency noise or unnatural banding—compared to the authentic background.
3D Morphable Model (3DMM) Lighting Fit
A highly robust forensic technique involves fitting a 3D Morphable Model to a face in the image. This process simultaneously solves for the face's 3D shape, texture, and the parameters of the scene's illumination using spherical harmonics. The recovered lighting parameters from a questioned face can then be compared to those from a reference face or the background. A statistically significant deviation in the estimated spherical harmonic coefficients is a powerful, quantifiable metric of forgery.
Frequently Asked Questions
Explore the core concepts behind detecting synthetic media through the analysis of physical light inconsistencies.
Lighting Inconsistency Analysis is a forensic technique that estimates the three-dimensional light environment from different objects or faces in a scene to identify mismatched illumination direction, color, or intensity. It operates on the principle that a single authentic photograph captures a physically consistent light field. The process typically involves inverse rendering, where algorithms estimate the reflectance and surface normals of objects to back-calculate the position and color of light sources. If a face spliced from a donor image is illuminated from the left while the host scene's shadows fall to the right, the composite is flagged as a forgery. This method is highly effective against naive face-swaps and object insertions that fail to re-light the inserted element to match the target environment.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Core techniques used alongside lighting inconsistency analysis to build a comprehensive forensic assessment of image authenticity.
Specular Highlight Mismatch
A forgery detection method that compares the position, shape, and intensity of specular reflections in the eyes or on surfaces. In authentic images, highlights from the same light source appear in geometrically consistent locations. In composites, highlights often reveal physically impossible light source positions.
- Compares corneal reflections between subjects in a scene
- Detects mismatched highlight shapes indicating different source environments
- Often combined with lighting direction estimation for 3D scene reconstruction
3D Morphable Model Fitting
A forensic technique that fits a three-dimensional face model to a 2D image to estimate shape, texture, and illumination parameters. The recovered lighting coefficients from different faces in a scene must be consistent. Inconsistencies in the estimated spherical harmonics lighting between subjects indicate face-swapping or compositing.
- Recovers albedo, shape, and illumination separately
- Estimates full 3D light environment from a single face
- Detects impossible combinations of lighting direction and face geometry
Error Level Analysis (ELA)
A forensic method that re-saves an image at a known quality level and analyzes the difference from the original. Regions with different compression histories—such as spliced-in objects under different lighting—exhibit distinct error levels. This technique is particularly effective at identifying inconsistent shadow regions that have been composited from separate sources.
- Highlights areas with different JPEG compression histories
- Effective for detecting spliced objects with mismatched illumination
- Low computational cost for initial triage screening
Shadow Geometry Analysis
A specialized forensic technique that examines cast shadows within a scene to geometrically constrain the 3D position of the light source. Shadows from different objects must converge to a consistent illuminant position. Divergent shadow directions or impossible penumbra characteristics indicate compositing from multiple source images with different lighting conditions.
- Uses vanishing points of shadow edges to triangulate light position
- Analyzes shadow softness for light source size estimation
- Detects physically impossible shadow-object relationships
Color Constancy Inconsistency
A forensic method that estimates the illuminant color from different regions of an image. Each light source has a characteristic spectral power distribution that imparts a specific color cast. When spliced objects exhibit a different white balance signature than the background scene, it indicates they were captured under different illumination.
- Estimates scene illuminant from specular highlights and diffuse regions
- Detects mismatched color temperature between foreground and background
- Uses gray-world and white-patch assumptions for illuminant estimation
Temporal Consistency Analysis
A video forensics method that evaluates the coherence of illumination across consecutive frames. In authentic footage, lighting changes smoothly with camera or subject motion. Manipulated videos often exhibit flickering illumination estimates or abrupt changes in light direction and color temperature that violate physical continuity.
- Tracks lighting parameters frame-by-frame for stability
- Detects abrupt illumination changes at edit boundaries
- Correlates lighting variation with expected scene motion

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us