Concept

Colour matrix — where it appears

The 3x3 that carries a device's own channels into a colorimetric space, fitted rather than derived. It is exact only if the device's sensitivities are a linear combination of the matching functions, which no real camera's are, so the matrix is right for one illuminant and approximate for the rest.

Named by 22 essays across 2 fields — each of them below, with the objects they name alongside it.

Everything between the photons and the picture, and what each stage decides. The 8 stages of a camera pipeline. Only the second is physics; every one after it is a decision somebody made, and the reason two cameras pointed at the same scene disagree is that they made different ones.

Raw is not a picture

A raw file is three integrals per site and a list of decisions nobody has taken yet. Every one of those decisions has a defensible answer and none of them has a correct one, which is why two converters open the same file and disagree.

imaging · Capture
A silicon sensor's best possible impersonation of the standard observer. The 1931 matching functions in outline, and the closest linear combination of the sensor's three sensitivities laid over them; underneath, what is left over at each wavelength. The residual is 31.7 per cent of the matching functions' own magnitude, worst at 440 nm. Colour reproduction is exact if and only if this is zero.

Luther said when it would work

There is an exact condition under which a fixed three-by-three matrix converts camera raw to XYZ correctly for every spectrum in existence. It was stated in 1927, it is a theorem rather than a guideline, and no camera ever built satisfies it.

imaging · Capture
A camera profile is a fit, and the sample set is a hidden argument to it. Per-surface ΔE00 after the best 3 × 3 from raw to XYZ, fitted on 12 surfaces at chroma 0.2 and tested twice: on those same surfaces (mean 0.65) and on 12 at chroma 0.9 (mean 1.75). Both bars come from the same matrix; only the surfaces differ.

A camera profile is a fit

Since no matrix is exact, the one a manufacturer ships is a least-squares compromise over a set of surfaces somebody chose. Fitted on desaturated patches it is excellent on desaturated patches — and the sample set is a hidden argument to every camera profile in existence.

imaging · Capture
The best a camera profile can do on the surfaces it was fitted to. Per-surface ΔE00 after the best 3 × 3 from raw to XYZ, fitted on 12 surfaces at chroma 0.7 and tested on those same 12 surfaces — mean 1.45, worst 2.58. This is the most favourable measurement it is possible to make of a camera and it is the one usually published.

No matrix is right everywhere

The best three-by-three this sensor admits, fitted and tested on the same twenty-four surfaces, leaves a worst case of ΔE00 2.85. A control sensor built to satisfy Luther's condition reaches ten to the minus seven under the identical computation, which is what makes the first number a measurement.

imaging · Capture
Correcting colour costs noise, and the two cannot both be least. Sweeping the colour matrix from its own diagonal — a white balance with no cross terms — to the full least-squares fit. Mean ΔE00 falls from 18.61 to 1.29; photon noise rises by a factor of 1.03. At 10000 photons per pixel.

Correcting colour costs noise

The matrix that turns a sensor's raw into XYZ has large off-diagonal terms of both signs, because that is what correcting a sensor which fails Luther's condition requires. Differences of large numbers are where noise grows, and the full correction amplifies photon noise by 1.66 times.

imaging · Capture
Everything between the photons and the picture, and what each stage decides. The 8 stages of a camera pipeline. Only the second is physics; every one after it is a decision somebody made, and the reason two cameras pointed at the same scene disagree is that they made different ones.

A photograph is not a measurement

A photograph is a measurement made by an instrument whose kernel nobody published, under an illuminant nobody recorded, corrected by a matrix fitted to somebody else's surfaces, with two thirds of every pixel invented. It supports relative claims well and absolute ones badly, and it is used for the second.

imaging · Capture
How wrong a camera profile is, and who it is wrong for. A colour matrix fitted against the 1931 observer, evaluated four ways. Its residual against that observer is ΔE00 0.92 — the Luther failure, which is a property of the sensor and is the honest measurement of the camera. Against a person drawn from a population of 160, the worst-off twentieth report 3.35. And a camera with no spectral error whatever, reporting the standard observer's own tristimulus values exactly, would leave 3.47. The camera is not the problem. It was fitted to somebody who does not exist, and so is the standard it was fitted against.

Fitted to an eye nobody has

A camera profile's residual against the observer it was fitted to is under a unit, and that is the number everybody quotes. Against a person drawn from a population it is 3.35 at the ninety-fifth percentile — and a camera with no spectral error whatever, reporting the standard observer's tristimulus values exactly, would carry 3.47. The camera is not the problem.

imaging · Capture
The basis a camera balances in is a different basis for every light. A camera's white balance is a per-channel gain on raw values, which is a von Kries adaptation in whatever basis the filter dyes give it. That basis is not a property of the dyes alone: it is the dyes and the light in the room, and it moves when the light does. Each bar is how far the basis has turned, in degrees, from where it sits under D65. A sensor satisfying the Luther condition would have a bar of exactly zero on every row, because for such a sensor the light cancels — which is the one property nobody buys a sensor for.

A camera balances in another basis

White balance is a per-channel gain on raw values, which makes it a von Kries adaptation in whatever axes the filter dyes happen to give. Those axes are not a property of the dyes alone — they move with the light, by up to seventeen degrees across the adaptation census — and the sensor for which they would not move is the one that adapts worst of all.

imaging · Capture
The best possible 3×3, and the patches it makes worse. Each row is one patch printed on a brightened sheet, measured under both conditions. The pale bar is how far apart the two measurements are; the dark bar is what is left after the best least-squares 3×3 over the whole set has been applied. It leaves 23 per cent of the mean, and — the part a mean hides — it makes 4 patches worse than doing nothing. The solids are the ones it damages: the ink blocks the ultraviolet, so a solid barely disagrees between the two conditions and the correction has no business touching it. A matrix has no way to apply itself only where the paper is showing.

A tolerance cannot cross a condition

If two measurement conditions disagree by seven units, the obvious repair is a correction matrix fitted between them. The best least-squares 3×3 over seventeen printed patches leaves 23 per cent of the disagreement and makes five patches worse than doing nothing — because the term it is trying to remove is proportional to how much paper is showing, and no linear map on three numbers can express that.

difference · Metric
Two lamps of the same colour, and one sheet that is two colours under them. The same brightened sheet under a xenon flash, the same flash behind its cover glass, and a phosphor-converted white LED of nearly the same chromaticity. Each patch is computed relative to its own lamp's white, which is what a perfect white balance does — so everything a camera can see and correct has already been removed. What is left is ΔE00 11.8 between the first and the last, against 3.2 between the two lamps themselves. The LED has no emission below 380 nanometres at all, because its pump die is at 450, so the sheet simply does not fluoresce under it and nothing in the photograph records why.

A camera cannot record the excitation

Two lamps of nearly the same chromaticity, one with ultraviolet and one with none, put a brightened sheet twelve units apart after a perfect white balance. Nothing in the camera measured the difference — the filter stack removed the band before the sensor saw it — so the correction that would fix the picture needs a quantity the file does not contain.

imaging · Capture
What a camera matrix reports on its own chart, and what it delivers off it. The same camera fitted on charts of increasing chromatic range. The left bar of each pair is the mean error on the chart the matrix was fitted to, which is the number a profile comes with; the right bar is the error on a saturated set it never saw. At the thinnest chart the fit reports 0.19 ΔE00 and delivers 1.65, a factor of 8.6. The gap closes as the chart widens, and it closes because the chart improves rather than because the camera does.

The chart decides the profile

A camera's colour matrix is nine numbers fitted to a set of patches somebody chose, and the number that comes with it is the error on those patches. On a chart with no chromatic range that number is 0.19 ΔE00 and the matrix delivers 1.65 — and a second matrix, indistinguishable on the chart, delivers 2.03.

imaging · Capture
A camera matrix fitted under each light, used under each light. Mean ΔE00 over the same surfaces, with the matrix fitted under the row's light and the scene under the column's. The diagonal is what a profile's data sheet quotes and is between 1.0 and 1.2 everywhere. Off it the numbers rise steeply: the matrix fitted under illuminant A reports 1.17 there and delivers 9.34 under a 9000 K daylight, a factor of 8.0. Nothing about the camera changes between cells.

A matrix is fitted under one light

A camera's colour matrix is nine numbers determined by a chart photographed under a particular illuminant, and the error it quotes is the error under that illuminant. Fitted under a tungsten lamp and used under a cold sky it delivers eight times as much — and the two-matrix scheme every real profile uses turns out not to be a compromise at all.

imaging · Capture
Each departure over forty-two surfaces rather than one. The same six departures measured over a family of forty-two analytic reflectances — an absorption band of stated centre, width and depth — with the smallest, the median, the ninety-fifth percentile and the largest marked. Every one of them spans more than a factor of three, and the ranking between them is not stable across the family: what decides a departure's size is which sample it is asked about, because a departure is a pairing and the sample is one of the two factors. Quoting any single number for what an observer's age is worth is quoting a choice of example.

The chart was measured by an observer too

A camera profile is fitted so that the camera's numbers reproduce the chart's measured tristimulus values. Those values were computed through the 1931 observer, so the fit inherits every departure in this round — and the fit's own residual, at 0.19 ΔE₀₀ on the chart, is fifteen times smaller than the term it cannot see.

imaging · Capture
One infrared-cut filter, crossed at four angles. The transmittance of the same interference filter for light crossing it at the centre of a frame and at three steeper angles, from 560 to 760 nm. Its half-transmission edge is at 665 nm straight on and moves to 658, 646 and 630 nm, following the edge wavelength times the square root of one minus the squared sine of the angle over the square of the stack's effective index, 1.8. The deepest reds are what it takes away, and a lamp decides how much light there was in them.

The corner of the frame has another filter

A camera's infrared-cut filter is an interference stack, and light crossing it at an angle sees its edge moved towards the blue — from 665 nm at the centre of a frame to 646 at twenty-five degrees. The corner's red channel loses a tenth of its response under daylight and a sixth under tungsten. A grey-card gain map makes the corner exactly right under the lamp it was made under; under a tungsten lamp the same grey is 2.6 colour differences wrong, under a white LED 4.2, and even under its own lamp the coloured patches are not corrected, because a moved edge is not a gain.

imaging · Capture
A black level slightly wrong, through the balance, under daylight. A grey ramp from half a per cent to seventy-two per cent reflectance, with a pedestal error of a tenth, three tenths and one per cent of white left in all three raw channels before the white balance, against the same ramp with none. The horizontal axis is the grey's reflectance, logarithmic. At a three-tenths error a two per cent grey is 2.4 colour differences off, most of it chroma, and a seventy-two per cent grey 0.21. An equal offset in the raw channels is not equal after three different gains.

A black level is multiplied by the balance

Every raw value carries a pedestal that is subtracted before anything else, and a white balance is then a different gain in each channel. Subtracting a constant and multiplying by one commute only when the constant is zero or the gains are equal. So a pedestal left three thousandths of white too high becomes 2.4 colour differences in a two per cent grey, most of it chroma, in the colour the lamp starves — and pushing that shadow four stops in editing makes it 8.9. An offset in proportion to the lamp's own white is the exception, and it is exactly grey.

imaging · Capture
Three corrections for the corner of a frame, each made under daylight. The mean colour difference over twenty-four coloured patches between the centre of a frame and its corner, against the angle light arrives at, after three corrections each fitted under daylight, D65 and used under it: a grey-card gain map, a correction confined to the red channel's row, and a full three-by-three matrix. All three leave the grey exact. At 25° the gain map leaves 1.86, the red row 0.93 and the matrix 0.90; at 35°, 3.81, 1.95 and 1.81. Six more numbers buy almost nothing, because the moved edge is in one channel.

A corner is corrected by one row

A grey-card gain map makes the corner of a frame exactly right on grey and leaves coloured patches 1.86 colour differences wrong at twenty-five degrees. A three-by-three matrix fitted at that position halves it — and six of its nine numbers do nothing, because the moved filter edge is in one channel. The three that matter rebuild the lost red from green and blue, they carry to another lamp better than a gain map in eleven cases of twelve, and in the twelfth, a row fitted under tungsten and used in daylight, they leave the grey 9.2 off.

imaging · Capture
Two matrices blended by colour temperature, under fourteen lamps. For each lamp, with the neutral held exact as a converter holds it: the mean colour difference over twelve test surfaces with a matrix fitted under that lamp (the short bar) and with the tungsten and daylight matrices blended at the weight its correlated colour temperature gives (the long bar). Smooth lamps on or near the locus sit within 6 per cent of their own matrix. The lamps with lines or narrow bands in them sit a median of 2.2 times theirs, from 1.38 for a broadband tube to 5.2 for a three-emitter source.

Two matrices do not reach a white LED

A camera profile's two matrices, blended by the scene's colour temperature, are as good as a matrix fitted anywhere along daylight. Under a white LED or a fluorescent tube the same blend leaves colours twice as far off as a matrix fitted under that lamp, and no weight inside the profile's range repairs it. What decides it is not how far the lamp sits from the Planckian locus — a triphosphor tube sits nearly on it and fares worst — but whether its spectrum has lines in it, which a white balance reading cannot see.

imaging · Capture
The confusion matrix, and which corner the common lamps are in. Twelve fixtures sorted two ways. Down the page is what their spectra are; across is what flicker says. The two corners on the diagonal are 7 fixtures the classifier gets right. The 3 missed are structured lamps that do not flicker — a white LED and a warm LED on constant drivers, and a three-emitter fixture — and those are the lamps most modern interiors are lit by. The 2 false alarms are smooth lamps that do flicker: a halogen lamp on mains and a tinted radiator, both of which a photograph of a room is quite likely to contain.

Flicker sorts lamps the wrong way

A camera cannot see a spectral line in its own white, so the essay on the two-matrix profile named the classifiers a device might have instead, and the first of them was flicker. Flicker is measurable, and it measures the wrong thing. It sorts lamps by how their power is delivered while the matrix needs them sorted by how their spectrum is shaped, and the two are independent: a white LED on a constant driver is perfectly steady and strongly structured, and it is what most indoor photographs are lit by.

imaging · Capture
The four places a clamp could sit are two pipelines. Every pair of clamp positions, with the largest difference their delivered values reach over a grid of raw inputs that includes negative ones. Two of the six are exactly zero: a clamp at zero commutes with the white balance, which is a positive scale applied channel by channel, and with the tone curve, which is monotone and fixes zero. It does not commute with the colour matrix, which is the only step that mixes the channels — so the four positions collapse to two, before the matrix and after it, and no measurement of any scene can say more than which side a converter is on.

Four places to clamp are two pipelines

The essay on clipped noise ended on a procedure: a black frame and a dim grey card at a high amplification would place each raw converter's clamp. A procedure is a claim that a measurement identifies something, and this one identifies less than it looks. A clamp at zero commutes with the white balance and with the tone curve and not with the colour matrix, so the four positions are two pipelines — and the measurement separates them, on a card at half a per cent of white rather than on the black frame.

imaging · Capture
How far each lamp's sensor reading is from what the camera predicts, with RGB + clear. Fourteen lamps, six smooth and eight structured, each scored by how far an ambient-light sensor with red, green, blue and clear channels reads from what the camera's white predicts through a map fitted on smooth radiators and daylights. The smooth lamps score at most 0.057 and the structured at least 0.133; the dashed line is the threshold at the gap's geometric middle, 0.087. The lights the map was fitted on score at most 0.0113. Every lamp falls on its own side of the line.

Two sensors disagree about deep red, not lines

A phone's ambient-light sensor and its camera read the same lamp differently, and the difference sorts fourteen lamps into smooth and structured without a single mistake — where flicker made five. It is not reading their lines. Almost all of it comes from the sensor's clear channel collecting deep red the camera's infrared cut throws away, so daylight with its far red trimmed is called structured and a white LED with a far-red emitter is called smooth.

imaging · Capture
The calibration error a narrow fourth channel survives, by where it is placed. For a red, green and blue ambient sensor with one more channel 10 nm wide, centred from 450 to 640 nm: the first calibration error at which some lamp of fourteen is misclassified. Dashed: the channel pooled into the whole residual, as the ambient sensor's disagreement was read; its best is ±1.50 per cent. Solid: the channel read on its own, as its departure from what the camera's white predicts for it; its best is ±4.0 per cent, at 450 nm. Crosses mark centres where the channel read alone does not separate the lamps at all. The two horizontal lines are the red, green and blue design (±1 per cent) and the design with a clear channel (±4 per cent).

A narrow channel has to be read on its own

An ambient sensor with a clear channel tells structured lamps from smooth ones by reading deep red, and one without it reads structure but breaks at one per cent of calibration error. A narrow fourth channel between the camera's peaks was proposed to have both. Pooled into the sensor's disagreement with the camera, it reads structure and breaks at one and a quarter per cent — no better than the design it was meant to rescue. Read on its own, as its departure from what the camera predicts for it, a channel at 450 nm holds to four per cent, the clear channel's figure, and far red does not move it.

imaging · Capture
Four ways to correct the corner, under each of four lamps, at 25°. The mean colour error left on the chart's coloured patches at the corner of the frame, under each lamp, after: the red row fitted under that lamp; one red row fitted on the chart under all four lamps with the grey held under daylight; a grey-card gain map calibrated under daylight; and the worst of the other lamps' rows used by mistake. daylight: 0.93, 1.33, 1.86, 4.91; tungsten: 0.99, 1.45, 1.87, 3.26; white LED: 0.36, 1.39, 3.28, 1.77; fluorescent: 0.37, 1.56, 3.09, 2.45. The pooled row holds every lamp between 1.33 and 1.56.

One row for every lamp costs the lamps that lose least

A corner correction fitted under one lamp is right under that lamp and can be badly wrong under another, so a converter unsure of its lamp was offered a single row fitted under several at once. Pooled over four lamps, one row holds every lamp's corner between 1.33 and 1.56 colour differences — no lamp worse than a grey-card map, and none near the 4.91 a wrong row can leave. The price falls on the white LED and the fluorescent tube, which it leaves four times worse than their own rows, because they lose the least red at the corner and the pooled row is built to repair the lamps that lose the most. Two rows, one per class of lamp, keep almost all of both.

imaging · Capture

Named alongside it

The objects these essays reach for when they reach for this one.

Camera rawSpectral sensitivityWhite balanceCalibrationLeast-squaresLuther conditionIdentifiabilityIlluminantHeld-out validationInfraredLED emissionCamera profile

All concepts