Visual ForensicsRutvij Khatri•9 min read•Published 2026-10-14

Analyzing Light and Shadow Consistency in Photographic Forensics

Learn how to detect composite photos and deepfakes by tracking vanishing points, shadow angles, and 3D illumination vectors.

Executive Verdict & Direct Answer
✓ 100% Client-Side In-Browser Engine

Learn how to detect composite photos and deepfakes by tracking vanishing points, shadow angles, and 3D illumination vectors. In authentic scenes, lines cast from shadow tips through their casting vertices must converge at a single light source position in 2D perspective projection.

The Physics of Illumination in Photography

In authentic outdoor photographs, every visible shadow is cast by a single primary light source: the sun. Because the sun is approximately 93 million miles away, its rays arrive parallel to one another across the scene.

In indoor environments or studio setups, illumination radiates outward from finite point sources (such as lamps or flashes). Regardless of the environment, projective geometry dictates that connecting points on objects with their corresponding cast shadow points must converge at a single geometric coordinate: the light source location.

When digital artists composite a person or object from one image into another, matching the exact 3D light vector, elevation angle, and ambient diffusion is extraordinarily difficult.

Key Investigative Takeaway

In authentic scenes, lines cast from shadow tips through their casting vertices must converge at a single light source position in 2D perspective projection.

Geometric Verification: The 2D Vanishing Point Method

To detect composite insertions geometrically, forensic examiners execute a three-step vanishing point analysis:

1. Identify shadow pairs: Locate recognizable reference points (such as the tip of a person’s nose, fingertips, or shoe heels) and their exact cast shadow coordinates on the ground.

2. Draw constraint rays: Project a straight line extending from the shadow point through the casting object point upward into the sky.

3. Check intersection consistency: Repeat this process for multiple objects across the frame. If the constraint lines fail to intersect at a common vanishing point, the subjects were photographed under disparate lighting conditions and composited together.

Specular Highlights and Corneal Reflections

The human eye acts as a spherical mirror. The cornea reflects the surrounding light environment, creating tiny bright white reflections known as "specular highlights" or "catchlights."

In authentic portraits, the shape, size, and position of the specular highlight in both the left and right eyes will be nearly identical and consistent with other people standing in the same scene. AI-generated deepfakes and amateur composites frequently render inconsistent corneal reflections across the two eyes.

Forensic Verification Techniques: Lighting vs. Metadata vs. ELA

Assessing resilience against re-compression, screenshotting, and platform metadata stripping.

Feature / DimensionOverlayCheck (Client-Side)EXIF Metadata AnalysisError Level Analysis (ELA)
Resilience to Social Media Stripping
Visual lighting geometry remains 100% intact
Fails (EXIF is deleted by Twitter/Facebook)Degrades under heavy re-compression
Detects Physical Studio Compositing
Detects mismatched light vectors
Cannot detectMay pass if shot with same camera

Command-Line Automation & CLI Workflows

For security engineers and forensic examiners automating pipelines or conducting terminal audits, the equivalent low-level commands can be executed natively:

Contrast Enhancement for Shadow Boundary Analysis via ImageMagick
bash
magick input.jpg -colorspace Gray -sigmoidal-contrast 10,20% shadow_edges.png
Technical Breakdown: Converts the image to grayscale and applies high non-linear sigmoidal contrast to reveal faint shadow penumbra boundaries.

Frequently Asked Technical Questions

Q1:Can multi-light sources cause false positives in shadow analysis?

Yes. In stadium sports photography or multi-flash photography, subjects cast multiple distinct shadows. Examiners must group shadows by intensity and verify convergence per individual light source.

#shadow analysis image forensics#light consistency forensics#detect composite photo#vanishing point forensics#3d illumination vector
RK
Rutvij KhatriSecurity Analyst & Aspiring Security Engineer

Security Analyst and Aspiring Security Engineer passionate about client-side media verification, binary parsing, web application security auditing, CTF steganography challenges, and zero-knowledge privacy architecture.

Connect on LinkedIn

Companion Verification & Privacy Toolkits

Cross-Cluster Workflows

Related Deep Dives in Visual Forensics