Luminance Gradient Scanner

Maps brightness gradients across an image using the Sobel operator, in three views: magnitude as a heatmap, gradient angle as colour, or raw grayscale. An exploration tool — it shows you where edge detail sits, it does not judge the image.

Drag & drop a file here, or

JPG PNG WebP GIF BMP AVIF Max 50MB • Processed in browser

Runs in your browser

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

Encodes the gradient angle at each pixel as a colour hue, and reports the strongest of eight 45° sectors. This is edge orientation — the direction brightness changes in, not the direction light comes from.

100% Private

All analysis runs locally in your browser via Web Worker. Nothing is uploaded to any server.

Advertisement

How it works

How luminance gradient analysis works

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, texture, hard shadow lines — versus gradually, as on skies and flat walls. Alongside the map it reports the mean and standard deviation of gradient magnitude, the maximum, and the strongest of eight 45° direction sectors. Those are descriptions of edge structure. They are not a manipulation test, and the tool deliberately returns no verdict: a splice and a busy patch of foliage are the same thing to a gradient operator. 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, so regions whose edges run the same way share a hue — useful for comparing two areas that should have the same structure. 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.

What the direction view shows

The gradient at a pixel points across the brightness change, so the direction view is a map of edge orientation: it follows the outlines of objects and the texture on their surfaces. The scanner reports the strongest of eight 45° sectors, weighted by magnitude and ignoring pixels below half the mean. Note what this is not — a light source. The outline of a cast shadow carries normals in every direction whatever the light is doing, which is why an earlier version of this tool reported a lighting verdict and why that verdict was removed rather than re-tuned. For copy-paste forgery analysis, use Clone Detection. For JPEG quality splice detection, try the JPEG Ghost Scanner.

Who uses luminance gradient analysis

Forensic examiners use gradient maps as one view among several when reading an image closely, alongside compression and texture views rather than instead of them. Journalism fact-checkers use them to inspect a region a source has questioned. Retouchers and photographers use them to see where edge detail sits in a frame — halo artefacts around a masked subject, over-sharpening, blown highlights that carry no gradient at all. In every case the output is something to look at and interpret; nothing here decides whether an image was edited. For metadata-level verification, combine with the Authenticity Checker. For a comprehensive forensic workflow, visit the photo forensics hub.

Gradient analysis answers a narrow question — where does brightness change fastest, and in which direction — and it answers it about every image equally, edited or not. It is a way of seeing, and it is most useful next to views that measure something different. 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.

Frequently Asked Questions

What is luminance gradient analysis?

It converts an image to grayscale and applies a 3x3 Sobel operator to compute brightness derivatives in the horizontal and vertical directions. The resulting magnitude map shows how quickly brightness changes at every pixel: flat surfaces are dark, edges and textures are bright. That is all it measures. It is a way of looking at an image, not a test it can pass or fail.

Does this tool detect compositing or manipulation?

No, and it does not claim to. The gradient map can make a boundary easier to see if you already suspect one, but nothing here decides whether an image was edited, and no figure on this page should be read that way. A brightly textured region and a pasted region look the same to a Sobel operator. For manipulation-specific analysis, use Noise Analysis, Clone Detection or the JPEG Ghost Scanner, and treat their output as evidence to interpret rather than as a conclusion.

What do the three color modes show?

Heatmap mode maps gradient magnitude from blue (low, flat areas) through green and yellow to red (strong edges and shadows). Direction mode encodes the gradient angle as colour hue and magnitude as brightness, so regions whose edges run the same way share a hue. Grayscale mode shows raw gradient magnitude in black and white for simple edge visualization.

Where did the lighting consistency verdict go?

It was removed in v2.178.0 because it did not measure lighting. It was the coefficient of variation of edge detail across 32x32 blocks, and measurement showed it could not separate the cases it claimed to: a splice of two halves of the same photograph and a splice of two different photographs both scored 0.470, a hard 2x brightness step down the middle of a frame read amber while a clean untouched photograph read red, and the highest score in the whole sample set belonged to a screenshot with no light source at all. It also moved across its own thresholds on nothing but a resize. A number that accuses real photographs is worse than no number, so it is gone rather than re-thresholded.

How is this different from ELA or noise analysis?

ELA works on JPEG compression levels and noise analysis works on texture residuals, and both of those return figures about the file. This tool returns a picture of where brightness changes fastest, plus the mean, spread and maximum of those changes and the strongest edge direction. Use it to look at an image alongside the other two, not to confirm what they say.

Is my image uploaded to a server?

No. All gradient analysis runs entirely in your browser using a Web Worker. The image never leaves your device. No data is transmitted, stored, or logged.

What resolution is the image analyzed at?

Images larger than 1500 px on the long edge are scaled down to that size before the gradients are computed, so a very large photo is examined at working resolution rather than at full size. Downscaling averages neighbouring pixels, which softens fine edges and lowers the gradient magnitudes reported beside it — the figures describe the scaled copy, so they are not comparable between two images unless both were analysed at the same size. The Analysis Details panel reports both the uploaded dimensions and the resolution the analysis actually ran at. Images smaller than 50 x 50 px are rejected.