Instruments 8 min
Pixels that cannot be surfaces
Some colors in an image could not have come from any physical surface under the stated light. That is not an anomaly score — it is a proof.
Image forensics is mostly statistics. Estimate the lighting direction in different regions and flag disagreement. Look at noise characteristics, compression history, sensor artifacts. Each produces a score, and every score is arguable — an expert can always propose an innocent explanation, because the evidence is probabilistic.
There is a cleaner statement available for one narrow class of claim, and it is not statistical at all.
The object-color solid
Fix an illuminant and an observer. Consider every possible reflectance function — every function from wavelength to a value in [0, 1]. Each one produces a color. The set of all colors so produced is the object-color solid for that illuminant.
It is a bounded convex body, and it does not fill the space of colors. There are perfectly well-defined colors that no reflectance can produce, because producing them would require reflecting more light than arrives at some wavelength, or negative light at another.
That gives a decision procedure. Take a pixel. Interpret it as a surface color under a stated illuminant and exposure. Ask: does any reflectance in [0, 1] on the canonical grid produce this response? If the answer is no, that pixel is not a diffuse reflective surface under that light. Not improbably. Not suspiciously. It is outside the achievable set.
The tool extends this across a family of illuminants: a pixel is fine if it is realizable under at least one declared light. Only pixels realizable under none get flagged.
Quantifying the failure
A bare flag is not very useful, because it does not distinguish a pixel that barely misses from one that is wildly impossible.
So for every flagged pixel the tool binary-searches the overshoot: the smallest factor by which the pixel would have to be dimmed to become realizable. An overshoot of 1.3 means the pixel is thirty percent brighter than any surface could be under any of the declared lights.
That number is the actual output. It ranks the offenders, and it makes the result robust to the biggest assumption in the whole procedure.
The exposure problem, handled honestly
Everything above is stated relative to a diffuse white at a given exposure. A pixel is only “too bright for a surface” relative to some notion of how bright a white surface would be in that image.
Get the exposure wrong and verdicts shift. Assume a dimmer white and more pixels look impossible; assume a brighter one and fewer do. This is the load-bearing assumption, and hiding it would make the whole instrument dishonest.
Two things address it. The exposure is an explicit input, not an inference — the caller states it, and it appears in the output. And because per-pixel overshoot is reported rather than a bare boolean, a reader can see how far from the boundary each flag sits. A pixel with overshoot 1.02 would flip under a small exposure change. One at 1.4 would not.
There is also a small numerical honesty measure. The sRGB primaries’ white differs from a table-integrated D65 white by a fraction of a percent, so an exact white pixel can land epsilon outside the solid for reasons that are pure arithmetic. A 3% boundary tolerance absorbs that, which means hairline violations are deliberately not flagged. Better to miss a marginal case than to report a numerical artifact as physical evidence.
What a flag does and does not mean
This is the part that has to travel with the result, and it does — the note ships inside the response rather than living in the documentation.
A flag means: no reflectance in [0, 1] produces this pixel under any declared illuminant at the stated exposure.
A flag does not mean the image is fake. Several ordinary things legitimately exceed the bound. Fluorescent materials absorb at one wavelength and emit at another; they are not described by a reflectance at all. Light sources in the frame are not surfaces. Specular highlights clip. Screens, LEDs, retroreflectors — all real, all outside the object-color solid, all correctly flagged and entirely innocent.
So the honest phrasing is: this pixel is not a plain diffuse surface under the declared lights. That is a strong, checkable statement. “Fabricated” is a different claim requiring different evidence, and the tool does not make it.
Why the narrow claim is the useful one
It is tempting to package this as fake-image detection, which is what people want. It would also be wrong, and it would fail the first time someone ran it on a photograph containing a lamp.
The value of a certificate is that it holds. A tool that says “not a diffuse surface” and is always right about that is more useful in any setting where the answer matters than a tool that says “fake” and is sometimes right. The narrow claim is defensible under questioning; the broad one is not.
Everything in this lab is built on that trade, and this instrument is the clearest case of it: the strongest statement the physics supports, and not one word past it.