Luminance Gradient Scanner
Maps brightness gradients across an image using the Sobel operator. Composited elements from photos with different lighting produce abrupt gradient boundaries that reveal the edit.
500+ images analyzed
Drag & drop a file here, Ctrl+V to paste, oror
Sobel Gradient Operator
Computes horizontal and vertical gradients using a 3×3 Sobel kernel, then combines them into a magnitude map showing brightness transitions.
Direction Analysis
Uses gradient direction to determine the dominant light angle. Composited objects lit from different directions stand out in direction mode.
100% Private
All analysis runs locally in your browser via Web Worker. Nothing is uploaded to any server.
How luminance gradient analysis works
Every photograph records a scene lit by one or more light sources. This creates a brightness surface — smooth gradients from highlight to shadow that follow the geometry of objects and light direction. The Luminance Gradient Scanner converts the image to grayscale, then applies a 3×3 Sobel operator to compute horizontal and vertical brightness derivatives. The resulting magnitude map shows where brightness changes rapidly (edges, shadows) versus gradually (flat surfaces, skies). When someone composites elements from different photos, the pasted region carries its original lighting, creating abrupt gradient boundaries that don't match the surrounding scene. For noise-level detection, combine with the Noise Analysis Scanner.
Understanding the controls
Heatmap mode maps gradient magnitude from blue (flat, low gradient) through green and yellow to red (strong edges). Direction mode encodes the gradient angle as hue and magnitude as brightness — consistent lighting appears as a uniform dominant color, while composited regions show a different hue. Grayscale mode shows raw magnitude in black-and-white. Amplification (0.5–3×) scales the gradient for visibility — increase it on low-contrast images, decrease on high-contrast ones. The overlay toggle blends the gradient map at 50% opacity with the original for easier spatial orientation. Use the Re-run button to adjust parameters without re-uploading. For compression-based analysis, try the ELA Scanner.
Why lighting direction matters
A single light source produces gradients that flow in a consistent direction across all objects in a scene. The scanner computes the dominant gradient direction using an 8-sector histogram weighted by magnitude. When a person is pasted from a studio photo (lit from the left) into an outdoor scene (lit from above), the Direction mode reveals the mismatch as a contrasting hue in that region. The block-based consistency analysis divides the image into 32×32 blocks and computes the coefficient of variation — a high value with many anomalous blocks strongly suggests compositing. For copy-paste forgery analysis, use Clone Detection. For JPEG quality splice detection, try the JPEG Ghost Scanner.
Who uses luminance gradient analysis
Forensic investigators use gradient analysis to detect compositing in evidence images — pasted elements with inconsistent lighting are a hallmark of amateurish manipulation. Journalism fact-checkers verify press photos for signs of inserted or removed subjects. Insurance adjusters examine claim photos where objects appear to have been added to a scene with mismatched shadows. Scientific image reviewers check for undisclosed compositing in figure panels. Photographers use it to evaluate lighting setups and identify unwanted light spill. For metadata-level verification, combine with the Authenticity Checker. For a comprehensive forensic workflow, visit the photo forensics hub.
Luminance gradient analysis is particularly effective at catching composites that other forensic tools miss. ELA and noise analysis focus on compression and texture-level artifacts, while gradient analysis targets the physical property of light itself — its direction, intensity, and falloff. A well-executed composite may survive compression analysis but still betray its origin through inconsistent lighting. For best results, combine the Luminance Gradient Scanner with the Noise Analysis Scanner (texture-level manipulation) and the ELA Scanner (compression-level manipulation). All processing runs entirely in your browser via a Web Worker — your images are never uploaded. For AI-generated image detection, use the AI Detector. Learn more in our articles on detecting edited photos and image forensics guide.