Two matrices do not reach a white LED
Assumes A matrix is fitted under one light, A lamp is not a blackbody and White is a region.
A matrix is fitted under one light found that the two-matrix scheme every raw camera profile uses is not a compromise: a tungsten matrix and a daylight matrix, blended at the right weight, reach what a matrix fitted at 4000 K reaches, to three decimal places. It said where that result stopped. The lights it tested were a tungsten lamp and four daylights, a smooth one-parameter family, and a fluorescent tube or a white LED is not on that family — so a weight derived from such a lamp’s correlated colour temperature chooses a point on a line the lamp does not lie on.
The blend spans daylight and misses the lamps with lines
The line between a profile’s two matrices passes through the matrix every smooth lamp near the Planckian locus needs, and misses by a factor of about two the matrix every white LED and fluorescent tube needs — a miss no choice of weight inside the profile’s range repairs, and one decided by the lamp’s spectral structure rather than by its chromaticity.
- Smooth lamps on or near the locus sit within 6 per cent of their own matrix at the weight their colour temperature gives.
- Lamps with lines or narrow bands sit a median of 2.2 times their own matrix’s error, from 1.38 for a broadband tube to 4.1 for a triphosphor tube and 5.2 for a three-emitter source.
- The triphosphor tube is 0.0035 below the locus and is the worst tube; a smooth radiator tinted 0.016 above it costs 4 per cent.
- Scored without holding the neutral, the blend under a white LED looks nearly five times worse still — 9.17 against 1.96 — because it puts the LED’s own white 14.5 colour differences from white, which a converter’s white balance removes before anybody sees it.
How the profile chooses its matrix
A raw camera profile carries two colour matrices, one fitted under a tungsten-class illuminant and one under a daylight-class one. For each photograph it estimates the scene’s correlated colour temperature from the camera’s reading of the white, computes a weight that is linear in the reciprocal of that temperature — zero at the tungsten calibration and one at the daylight calibration — and uses the blend. Outside the two calibrations the weight is held at the nearer end.
Two separate claims are hidden in that procedure. The first is that the matrix a lamp needs lies on the straight line between the two calibration matrices. The second is that a lamp’s colour temperature says where on the line. Along the daylight family both are true, which is what the earlier measurement found: the family’s spectra are nearly a straight path through a space of three basis functions, there is no D65 lamp but there is a D65 curve, and a smooth map of a nearly straight path is nearly straight.
A white LED is a blue die under a yellow phosphor with a trough between them, and a fluorescent tube puts a third of its light into four mercury lines — a lamp is not a blackbody, and both are sold by a colour temperature anyway. Neither claim has any reason to hold for them, and the two can fail independently.
Most of the first failure is the white
The first measurement looks catastrophic, and it has to be unpicked before anything else can be said.
Scored the way the fitted-light table was scored — raw values through the blended matrix to tristimulus values, compared with the lamp’s own white — the blend under a neutral white LED is 9.17 colour differences off, under a triphosphor tube 8.85 and under a cool LED 9.97. Almost all of that is the white. The same blend puts the neutral LED’s own white 14.5 units from white and the tube’s 14.5, so every surface under those lamps inherits a large cast before its own error is counted.
No photograph shows that cast. A converter balances each channel by the camera’s own reading of the lamp and forces the neutral to come out neutral before the matrix’s colour work is judged — a camera balances in another basis, but it balances. Holding the neutral exact, the blend under the neutral LED leaves 1.96, under the tube 2.37 and under the cool LED 1.92. Under the smooth lamps near the locus the white is under two units and the two scorings agree to within six hundredths, which is why the earlier table could leave it out. The pink-tinted radiator is the smooth exception, with its white 5.4 off and a raw score of 2.06 against 1.62 held — a first sign that distance below the locus does something of its own. Every number from here on holds the neutral, as a converter does.
What the blend reaches, where it reaches
Along the smooth family nothing has changed. The published result is still there when the neutral is held.
A 3000 K radiator gets 1.20 from the blend and 1.19 from its own matrix; 4000 K daylight 1.18 and 1.17; 5000 K daylight 1.14 and 1.11. A 4000 K radiator, which the daylight family does not contain, gets 1.18 against 1.11, and 1.13 at its best weight. These lamps are on the line.
The lamps with lines are not. A neutral white LED gets 1.96 from the blend and 0.89 from its own matrix; a warm LED 2.17 against 0.96; a halophosphate tube 1.90 against 0.91. A triphosphor tube gets 2.37 against 0.57, with a worst surface of 6.1 against 1.2, and a three-emitter source 1.75 against 0.33. The matrices fitted under these lamps are as good as any smooth lamp’s and often better — the likely reading is that a narrow-banded light asks the sensor to match the observer at fewer wavelengths, which a three-by-three can do more nearly — and the blend is between one and a half and five times worse than they are.
The weight cannot fix it
The obvious objection is that the colour temperature is choosing a poor weight, and a better one would close the gap.
For the neutral LED the colour temperature gives a weight of 0.74 and 1.96; the best weight anywhere is 1.06, at 1.89. The halophosphate tube’s colour temperature gives 0.65 and its best weight is 0.60, both at 1.90. For those lamps the weight is nearly right and it does not matter, because the curve’s lowest point is nowhere near the lamp’s own matrix. The line passes the matrix those lamps need at a distance, and sliding along the line cannot shorten it.
For some lamps the best point is not even on the part of the line a profile uses. The triphosphor tube’s best weight is 1.64, past the daylight calibration, where the blend reaches 1.61 — and a profile, which holds the weight at one, reaches 2.08. The cool LED’s best weight is 1.38 and the three-emitter source’s 1.44. Extrapolating past daylight is what those lamps would want, and it would still leave them two to four times their own matrix.
So the blend’s failure under these lamps is a property of the line, not of the weight: the matrices a lamp with lines needs are off the line between a tungsten matrix and a daylight one, and colour temperature is not the variable that would find them.
Why lines move the matrix off the line
A camera’s best matrix under a lamp is a least-squares fit of the observer’s three matching functions by the sensor’s three sensitivities, and the fit is weighted by the lamp’s spectrum multiplied by the surfaces. Luther said when it would work: if the sensitivities were a linear transform of the matching functions the weighting would not matter and one matrix would serve every light. They are not, so the weighting decides which wavelengths the fit tries hardest to get right.
A smooth lamp spreads that weighting across the whole band, and moving from tungsten to daylight tilts it from the red end towards the blue — gradually, along a path the two calibration matrices bracket. A lamp with lines puts most of its weight on a handful of narrow bands, and the best fit for it is the fit that matches the observer at those wavelengths and gives up elsewhere. A triphosphor tube concentrates its light in a band near 450 nanometres and in narrow lines at 543, 611, 626 and 651, with mercury’s own lines standing on top; no tilt of a smooth spectrum weights the band that way, so no point between two smooth-lamp matrices is its matrix.
That is the same reason the colour is right first in a spectral reconstruction while the spectrum is still wrong: three numbers summarise a light, and two lights with the same three numbers can weight the spectrum in entirely different places.
Distance from the locus moves the weight instead
A lamp can also be off the locus with no lines in it at all, and that separates the two claims cleanly.
Tinted green, 0.018 above the locus, the radiator’s best blend is 0.06 from its own matrix. Tinted pink, 0.015 below, the gap is 0.16, and at 0.024 below it is 0.33. Both sides move off the line a little, and the pink side moves off it more than twice as fast. The broad tint changes the weighting only gently, which is why the gap stays small next to the lamps with lines.
What the pink side does badly is the weight. The pink-tinted radiator’s colour temperature is 3513 K and gives a weight of 0.33; its best weight is 0.93, and the blend at the colour temperature’s weight costs 1.62 against 1.26 at the best. Taking a band out of the green leaves the lamp’s balance of red against blue — which is what moves a camera matrix from its tungsten form towards its daylight form — exactly where it was, and it still lowers the correlated colour temperature from 4000 K to 3513 K, because the nearest point on the locus to a chromaticity depends on how much green the light has as well. So the profile reaches for the tungsten matrix when the lamp’s red and blue call for a weight near the daylight one. White is a region on the diagram, and a colour temperature names a line through it rather than a point.
So the two failures have two causes, and they can be told apart. Distance from the locus puts the weight in the wrong place on a line that still passes the right matrix; spectral structure moves the right matrix off the line, and the worst tube in the set is nearly on the locus.
A third matrix is a class, not a lamp
If the lamps with lines need matrices off the line, the repair a profile could carry is a third matrix fitted under one of them.
One matrix fitted under the neutral LED takes the cool LED from 1.92 to 1.01, the warm LED from 2.17 to 0.99, the halophosphate tube from 1.90 to 1.11 and the triphosphor tube from 2.37 to 1.66. The three-emitter source goes from 1.75 to 1.37 and the broadband tube barely moves, 1.53 to 1.48. For seven of the eight lamps with lines a third calibration under a common white LED is better than the two-matrix blend, often close to the lamp’s own matrix.
The eighth is the warning. An LED with a red phosphor gets 1.98 from the third matrix against 1.66 from the blend. Its added red band moves its weighting towards the long-wavelength end, where a tungsten lamp puts its light, and away from the yellow hump of an ordinary LED. The class that shares a matrix is a class of spectra, and LED is a name for a device rather than for a spectrum. A profile carrying three matrices would need to decide which of them a photograph belongs to, and the decision is not the one it makes now.
The camera cannot see which kind of lamp it is under
The profile chooses its weight from the camera’s reading of the white, and that reading is three numbers. Three numbers cannot see a line: a triphosphor tube and a smooth lamp of the same chromaticity give the same three numbers, and nothing in the raw white balance says which of them lit the scene.
So the information that decides whether the two-matrix blend is right is exactly the information the white balance reading discards. It is not a matter of a better estimator of colour temperature — an image does not determine the light in any case, and here even a perfect estimate of the lamp’s chromaticity would choose the wrong matrix for a tube sitting on the locus.
The information has to come from elsewhere. A lamp driven from the mains flickers, and the shutter samples the lamp at a rate that can reveal it; a separate sensor with more than three spectral channels can tell a line spectrum from a smooth one; a photographer can name the lighting. Each supplies what the three numbers cannot, and each is outside the colour pipeline as profiles are currently written.
What a profile could say about itself
The measurement suggests a short list, in increasing order of cost.
Name the family the two matrices span. A two-matrix profile is exact along the smooth family between its calibrations and interpolating a straight line through matrix space everywhere else. Saying so costs nothing and tells a user that indoor photographs under tubes and LEDs are outside what the profile was built for.
Calibrate a third matrix under the common white LED, and accept that it serves the LED and tube family rather than every lamp with the word LED on the box. The seven of eight improvements are large, and the lighting most interiors now have is that family.
Choose between the matrices by the kind of spectrum, not by colour temperature, using whatever information a device has that is not the white balance reading. The cost of choosing wrongly runs one way: a third matrix used under a smooth lamp, or a two-matrix blend used under a tube, and the blend’s version of that mistake is the one every current profile makes indoors.
How the lamps and matrices were computed
The camera is the silicon sensor with its infrared-cut filter, and the surfaces are the twelve-patch test set at chroma 0.45. Each matrix is the least-squares three-by-three from raw values to tristimulus values over those surfaces under the named light. The two calibration matrices are fitted under illuminant A and D65, and the blend weight is linear in reciprocal correlated colour temperature between the two, clamped to their range.
The lamps are closed-form spectra: thermal radiators, CIE daylights, radiators multiplied by one plus or minus a broad band at 540 nanometres, white LEDs built from a blue die and a phosphor with and without a red band, three phosphor mixtures with mercury lines, and a three-emitter source. Correlated colour temperature and Duv are computed in the 1960 diagram. The neutral is held by scaling each matrix’s rows so that the camera’s raw reading of the lamp maps exactly onto the lamp’s own white, and errors are mean ΔE₀₀ over the surfaces with that white as the reference.
What this leaves out
A real profile is more than two matrices. It carries tables and a tone curve as well, and its tables are calibrated under the same two illuminants, so they inherit the same line rather than escaping it; they are not modelled.
The white is held by scaling rows in tristimulus space, which is the simplest way of making the neutral exact. A converter that adapts with a chromatic adaptation transform in a cone-like basis would put a slightly different error on the coloured surfaces, and the ordering of the lamps would have to be checked under it.
And the lamps are constructions. Real LEDs span a wider range of phosphors, and real tubes a wider range of line strengths; the argument that structure rather than chromaticity decides is general, and the individual numbers are this set’s.
The habit: an interpolation variable has to be the one the answer depends on
An interpolation between two calibrations is exact along the path its calibrations were taken on, and its accuracy anywhere else depends on whether the interpolation variable is the variable the answer actually varies with. Colour temperature is the variable along which smooth lights differ. It is not the variable along which a camera matrix differs.
The move is to test an interpolation off the path it was built on, with inputs chosen to vary what the interpolation variable does not measure. Here that meant lamps of the same colour temperature with different spectra, and lamps with the same spectral smoothness at different distances from the locus.
The failure mode is to trust an interpolation because it is exact where it was verified. A scheme that is free along daylight has told nothing about a tube, and a tube is what most photographs indoors are lit by.
Where the scheme comes from
Two calibration illuminants with interpolation in reciprocal colour temperature is the arrangement of the digital negative raw specification and is carried by most raw profile formats. That fluorescent and LED lighting is harder for camera colour reproduction than daylight or tungsten is widely reported, and multi-illuminant and spectrally-informed camera calibration is an active area.
That the white carries most of the blend’s apparent error under such lamps, that distance from the locus misplaces the weight while spectral structure moves the required matrix off the line, and that a third matrix from one LED helps every lamp with lines except one with a red phosphor, are computed here on one modelled sensor.
Still open: whether a camera can classify its own lamp
The repair needs a decision this sensor cannot make from its raw white. Whether a device’s other information — flicker measured through the shutter, a spectral sensor with six or eight channels, the difference between the camera’s white reading and a second sensor’s — separates the lamps whose matrices are on the line from those whose matrices are not, and at what rate of mistakes, is a classification problem on real lamps rather than a computation, and it would say whether a three-matrix profile can choose its third matrix in practice.
What this makes readable
Essays that name this one as a prerequisite.
Named alongside this one
Essays reaching for the same objects. Nobody chose these; they are what the index of named objects makes visible.
- A corner is corrected by one row calibration · camera raw · colour matrix · identifiability · white balance
- One row for every lamp costs the lamps that lose least calibration · camera raw · colour matrix · led emission · white balance
- The corner of the frame has another filter calibration · camera raw · colour matrix · correlated colour temperature · white balance
- Four places to clamp are two pipelines camera raw · colour matrix · identifiability · white balance
- The chart decides the profile calibration · camera raw · colour matrix · identifiability
- A black level is multiplied by the balance camera raw · colour matrix · white balance
What links here
Every essay whose body links to this one.
The objects this essay names
Each one links to every other essay that touches it.
CalibrationCamera rawColour matrixCorrelated colour temperatureDuvFluorescentIdentifiabilityInterpolationLED emissionWhite balance