What a camera does

A stop is not a stop afterwards

Doubling the light is exactly a factor of two in raw values and in tristimulus values, which is the one thing about exposure everybody is sure of. A stop taken after the tone curve is a factor of something else, and matching the two on an eighteen per cent grey leaves the rest of the frame between three and four colour differences apart at the mean and up to eleven at the worst patch. The gain that matches one stop is 2.47 rather than 2.

Assumes A contrast control is three controls, The order is not in the documentation and A blown highlight turns.

Exposure is the one quantity in photography that everybody is confident about. Twice the light is twice the signal: the sensor counts photons, the count is linear in the number arriving, and a stop is a factor of two in every raw value in the file. Nothing in this essay disputes any of that.

A stop taken in raw, and the same lightness reached afterwards. Each row is a stop of exposure applied to the raw values, against a gain applied after the whole pipeline and solved so that an eighteen per cent grey comes out at the same lightness. The two are then the same brightness by construction and differ by 4.2 colour differences at the mean and 11.1 at the worst patch. A stop is a scalar in front of the curve and is not a scalar behind it.
Fig. 1 A stop taken in raw against a gain applied after the whole pipeline, solved so that an eighteen per cent grey comes out at the same lightness. The two are the same brightness by construction and are not the same picture.

The claim

A stop of exposure is exactly a scalar in front of the tone curve and is not a scalar behind it, so an exposure correction applied to a developed image is not the exposure that was not taken.

  • Matched on an eighteen per cent grey, the rest of the frame is 3.25 to 4.20 colour differences apart at the mean across a stop up and two stops down, and 8.7 to 11.2 at the worst patch.
  • The gain that matches one stop is 2.47, not 2, and the gain that matches two stops down is 0.142 rather than 0.25.
  • The disagreement does not fall as the correction gets smaller in the way a rounding error would. Two stops down costs 4.20 and one stop down costs 4.12.
  • And it scales with the curve. Softening the curve to a fifth of its strength drops the mean from 4.12 to 1.71.

What is exactly true

The linear half is worth stating carefully because it is the half everything else is measured against.

A photosite integrates photons. Doubling the exposure time, or opening the aperture a stop, or doubling the scene’s illumination, doubles the count — to the accuracy of the sensor’s own linearity, which on modern hardware is very good indeed until the well fills. The tristimulus values that follow are integrals of the same light against the observer’s curves, so they double too. This is the same linearity the whole of colorimetry rests on and it holds over about three and a bit decades of light, which is the operating band no standard states.

So a stop taken at the sensor is a scalar multiplication applied to everything, and scalar multiplications commute with each other, compose by multiplying, and are exactly invertible.

The curve, and what it does to a mid grey. The tone curve used throughout these essays: a smooth S applied in the encoded variable, at strength 0.70, plotted here against linear light. The diagonal is the identity. Its slope through the middle is 1.34 against 0.50 at the toe, which is what makes it a contrast control: the middle of the range is stretched and both ends are compressed. An eighteen per cent grey comes out at 16.9 per cent. Everything measured here follows from the curve being applied to each channel separately.
Fig. 2 The curve everything downstream passes through. It is a straight line through the origin nowhere, so a scalar in front of it is not a scalar behind it.

The tone curve is where that stops. A scalar in front of a function is the same as a scalar behind it exactly when the function is linear and passes through the origin, and a tone curve is neither: it has a toe, a steep middle and a shoulder, and its whole purpose is to be none of those things at once.

What the comparison has to be fair about

Comparing the two requires care, because the obvious comparison is rigged.

A stop in raw and a factor of two applied afterwards are plainly different — the second is not even the same brightness, since the curve compresses a doubling into much less than a doubling. Comparing those two would measure the fact that the curve compresses, which nobody disputes and which a photographer would fix in half a second by moving the slider further.

So the two are matched first. The downstream gain is solved by bisection so that an eighteen per cent grey — a mid-tone that clips at neither end of the sweep — comes out at exactly the same lightness in both. The match is exact to fourteen decimal places. What is then measured is everything else.

That is the honest form of the question a photographer is actually asking, which is not whether a slider is the same as an f-stop but whether, with the mid-tones put right afterwards, the rest of the picture is right too.

A stop taken in raw, and the same lightness reached afterwards. Each row is a stop of exposure applied to the raw values, against a gain applied after the whole pipeline and solved so that an eighteen per cent grey comes out at the same lightness. The two are then the same brightness by construction and differ by 4.1 colour differences at the mean and 8.8 at the worst patch. A stop is a scalar in front of the curve and is not a scalar behind it.
Fig. 3 The same measurement over a wider range. Three stops down costs less than one stop down, because a large correction pushes the whole frame into the toe of the curve where its slope varies least.

The gains that come out of the matching are the first result. One stop up needs a downstream gain of 2.47 rather than 2; one stop down needs 0.376 rather than 0.5; two stops down needs 0.142 rather than 0.25; three stops down needs 0.057 rather than 0.125.

The gain is not the exposure factor and it is not any simple function of it, because it is solved against a curve rather than derived. A converter’s exposure slider that is calibrated in stops is calibrated by exactly this kind of solve, against exactly this kind of curve, and its numbers are therefore a property of the curve rather than of light.

What is left over

Once the grey matches, the rest of the frame does not.

At one stop up the mean discrepancy is 3.25 colour differences and the worst patch is 8.69. At one stop down, 4.12 and 8.82. At two stops down, 4.20 and 11.15. These are not small numbers on any scale this collection uses: the tolerance in a delivery contract is one unit, and a camera profile’s own residual is about the same.

The shape of the discrepancy is where the mechanism shows. A patch that sits in the steep middle of the curve is affected differently from one on the toe or the shoulder, so the leftover error is a function of each patch’s own level — largest where the curve’s slope differs most between the two positions the patch occupies in the two runs.

A contrast control is a saturation control and a hue control. The same hue circle at five curve strengths. The worst hue rotation rises monotonically from 0.7 degrees to 5.7, and the chroma gain from 1.04 to 1.34. A photographer raising contrast is raising saturation by an amount nobody wrote down and turning hue by an amount that depends on which hue it is.
Fig. 4 What the curve does to hue and chroma as its strength rises. An exposure correction moves a colour along the curve, so it moves it through this too — the chroma gain is not the same at two levels, and a corrected picture has different saturation from a correctly exposed one.

And the discrepancy is not only a lightness error. Moving a colour along the curve moves it through the chroma gain measured on the previous rung, so a picture exposed a stop down and corrected afterwards has different saturation from one exposed correctly — not merely different brightness that has been fixed.

Where in the frame the error lands

A mean of four colour differences over thirty patches could be four everywhere or forty on three of them, and the two would call for different responses.

It is neither. The per-patch errors run from under a unit on the darkest patches to 8.8 on the worst, and the ordering is not by colour but by level: the patches nearest the middle of the tone range are the ones that move most, and the ones at either end move least.

That is what the mechanism predicts. The leftover error at a patch is set by how differently the curve’s slope treats it in the two runs, and a patch already in the toe of the curve is in the toe in both. A patch in the steep middle is in the steep middle in one and somewhere else in the other, so the two runs disagree most about the tones a photographer is looking at.

The practical form is uncomfortable. The correction is matched on a mid-tone, so the mid-tone is exactly right; the tones immediately around it are the ones most wrong. A frame checked by its grey card and passed is a frame whose worst error is a stop away from the grey card in either direction.

What the gain being 2.47 means

The gains the matching produces are worth a moment on their own, because they are the number a converter’s exposure slider actually applies and they are not the number on the slider.

One stop up needs 2.47. Two stops down needs 0.142 rather than the 0.25 a scalar would give — a factor of 1.76 away. Three stops down needs 0.057 against 0.125, a factor of 2.2.

The departure grows as the correction grows, and it grows because the curve’s compression grows: a correction that has to move a mid-tone a long way has to fight more of the curve’s shoulder or toe to do it.

So a slider marked in stops on a developed image is applying a gain solved against a curve, and the solve is done by whoever wrote the software against whatever curve they were using. Two editors with the same slider at the same setting apply different gains, and neither is wrong, because the number on the slider was never a physical quantity in the first place.

The raw converter’s slider is different and is exact. Its number really is a factor of two to the power of the setting, applied to the raw values, and it is the one place in the chain where the word stop means what it means at the camera.

What it does not decay like

A reader would expect the error to shrink as the correction shrinks, and it does not do so in the way an approximation error would.

Two stops down costs 4.20 at the mean and one stop down costs 4.12 — nearly the same. Three stops down costs 2.88, which is less. The reason is that a large downward correction pushes the whole frame into the toe of the curve, where the slope is nearly constant, and a region of nearly constant slope is a region where a scalar behaves like a scalar.

So the error is largest for the corrections a photographer actually makes — a stop either way, which is where the frame straddles the steepest part of the curve — and falls away for the extreme corrections nobody makes because the picture would be ruined anyway.

A stop taken in raw, and the same lightness reached afterwards. Each row is a stop of exposure applied to the raw values, against a gain applied after the whole pipeline and solved so that an eighteen per cent grey comes out at the same lightness. The two are then the same brightness by construction and differ by 1.8 colour differences at the mean and 7.0 at the worst patch. A stop is a scalar in front of the curve and is not a scalar behind it.
Fig. 5 The same two corrections with a much gentler curve. The mean falls from 4.12 to 1.71 and from 3.25 to 1.83, which is the check that the effect belongs to the curve rather than to the pipeline around it.

Softening the curve is the control. At a fifth of the strength the discrepancies fall to 1.71 and 1.83, and at zero strength — a straight line — they would be exactly zero, because a scalar and a linear map commute. Every number in this essay is a measurement of the curve’s departure from a straight line, expressed in the units a viewer would notice.

The practical form

Three consequences, and the third is the one worth acting on.

Raw exposure correction is not the same operation as an exposure slider on a developed image, and every converter has both. A raw converter’s exposure control multiplies before the curve and is exact; an image editor’s brightness or exposure control multiplies after it and is not — the same distinction a mixture line makes between light and its reading. They are given the same name and often the same units.

A correction cannot be undone by its inverse. Applying a downstream gain of 2.47 and then one of 1/2.47 returns exactly where it started, since gains compose; but applying a raw stop up and a downstream stop down does not, and the residual is the numbers above.

Three exchanges, two of which move the colour. The documented pipeline is a white balance, a colour matrix, a tone curve and a clip. Each bar is what happens when two neighbours change places, over 30 surfaces the modelled sensor captures: the filled bar is the mean and the tick is the worst patch. Exchanging the balance and the matrix costs 9.2 colour differences at the mean and 13.2 at the worst. Exchanging the curve and the clip costs exactly nothing, and that is a theorem rather than a small number: a monotone curve onto the unit interval commutes with clamping to it.
Fig. 6 The pipeline’s three exchanges, for scale. An exposure correction taken in the wrong place costs more than the matrix-and-curve exchange and less than the balance-and-matrix one.

And bracketing is not a substitute for metering. Three frames a stop apart, developed and then matched, do not give the same picture as one frame exposed correctly — a claim that sounds obvious about clipping and is true here even with nothing clipped anywhere.

All twenty-four arrangements of four steps. Every permutation of the four operations, ranked by how far its picture lands from the documented one. 3 of the 24 are identical to it — the clip is a no-op wherever it follows the curve, and it is also a no-op before the matrix on values already inside the range. The rest run out to 64.8 colour differences at the mean and 98.1 at the worst patch. Nothing in a converter's documentation says which of the twenty-four it implements.
Fig. 7 The twenty-four arrangements from the first rung. An exposure correction is a twenty-fifth step, and where it goes is a decision of the same kind and of comparable size.

Read against the arrangement census, an exposure correction is another step whose position matters, and its cost sits between the two live exchanges: more than the matrix-and-curve disagreement at 0.60, less than the balance-and-matrix one at 9.21. The difference is that the first two are decisions a converter’s author makes once and the third is a decision a photographer makes on every frame.

The two operations, named apart

The clean statement of all of this is a distinction between two operations that share a word, and it is worth writing out because once it is written the rest is bookkeeping.

An exposure is a change to the scene’s illumination or to how much of it the sensor collects. It is a scalar on the light, it commutes with everything upstream of the curve, it composes by multiplying, and it is exactly invertible. A stop up followed by a stop down is the identity to the last bit.

A lift is a change to the numbers a rendering has already produced. It is a scalar on the output, it does not commute with the curve, and it composes with other lifts and with nothing else. A lift up followed by a lift down is also the identity, and a lift up followed by an exposure down is not.

The two are given one name because for most of photography’s history they were one operation: a print’s exposure and a negative’s exposure were both exposures, and the enlarger’s timer moved a quantity that really was light. Digital conversion split them and kept the word.

Every result in this essay is the size of that split, measured at the place a photographer meets it. Four colour differences at the mean is what it costs to use the word for both.

What a converter could offer

The repair here is not a metadata field, which makes it unusual among this round’s findings.

A converter already has everything it needs: the raw values, the curve, and the correction the user asked for. Applying an exposure correction as an exposure — multiplying the raw values and re-running the pipeline — costs one extra pass and is exactly right. Several raw converters do this and call the control exposure for that reason.

What they cannot do is offer it on an image whose raw values are gone. A JPEG, a rendered TIFF, a graded frame: for all of those the curve has already run and cannot be inverted, because it has a clip on the end of it and the clip is not invertible. So the operation an editor can offer is a lift, and the honest thing is to call it one.

The uncomfortable case is the third one, which is a converter offering an exposure control on a raw file and implementing it as a lift for speed. Nothing in the interface distinguishes that from the correct implementation, and the difference is the numbers above.

What was computed, and how

The scene is the thirty surfaces of this ladder — twenty-four coloured patches and a six-step grey scale — captured by this collection’s silicon sensor model under D65, with the matrix fitted on the same set.

The raw run multiplies every raw value by two to the power of the stop and runs the documented pipeline. The downstream run applies the pipeline unchanged and then multiplies the linear output by a gain, solved by sixty steps of bisection so that an eighteen per cent grey matches in lightness. The residual of that match is quoted in the figure and is at the floating-point floor.

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.
Fig. 8 The pipeline as this collection has drawn it since the imaging phase. Exposure enters at the far left of it, and every correction anybody applies enters at the far right.

The grey is used for the match rather than a scene patch because a coloured patch clips at one end of the sweep or the other, and a match made between two clipped values is not a match — both are pinned at white and the residual is zero for the wrong reason. That was the first version of this measurement and it reported two stops up as costing nothing at all.

The clipping question is otherwise kept out of this essay deliberately. Nothing in the range measured here saturates, so every number is the curve’s doing rather than the ceiling’s, and the ceiling is the next rung’s subject.

Where the model stops

One curve, one strength, one sensor. The structure — error largest at one stop, falling for large corrections, scaling with the curve’s strength, vanishing for a straight line — is the curve’s shape rather than its parameters, and would survive any curve with a toe and a shoulder.

The comparison matches on lightness at one patch. Matching instead on the mean lightness of the whole frame, or on a highlight, gives different gains and different residuals; the qualitative result is the same and the numbers move by tens of per cent.

And the real question a photographer has is about noise as well as colour, since underexposing and lifting costs signal-to-noise in a way this measurement is blind to. That trade is well understood — correcting colour costs noise is its companion on the matrix’s side — and is why the advice is to expose correctly; the colour cost measured here is a second reason for the same advice and is not the usual one.

The generalisation

The habit is about an operation that is exact in one representation being offered in another.

Every processing chain has a point where its numbers stop meaning the physical quantity and start meaning something perceptual, and operations defined on the physical quantity keep their names on the far side of that point. A gain, an average, a difference, a sum — all of them remain implementable and none of them remains the same operation.

The move is to ask, of any control, which side of the compression it acts on, and to give the two versions different names when both exist.

The failure mode is that the two versions get the same name and the same units, so a user reasons about one and operates the other. A slider marked in stops that does not multiply light by two to the power of the number on it is a unit borrowed from a quantity it is not measuring, and the borrowing is what makes the error invisible: everything about the interface says the operation is exact.

Who found it, and when

That exposure correction in a raw converter and brightness adjustment in an editor are different operations is understood by anybody who has used both, and the advice to correct exposure in raw rather than afterwards is standard.

The reason usually given is dynamic range: raw carries more headroom and more shadow detail, so a correction there has more information to work with. That is true and it is a different reason from this one, which holds even when nothing is clipped and no bit depth is lost. The colour cost of correcting in the wrong place does not appear in the sources consulted here, and its size — three to four colour differences at the mean — is larger than most of the effects those sources do discuss.

Where the ladder goes next

Everything measured on this rung was inside the sensor’s range, and the round’s remaining operation is the one that is not. The clip is the only step that destroys information, converters place it in different places, and two of them handed the same raw file disagree about a highlight by twenty-one colour differences and seventy-eight degrees of hue.

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.

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.

ChromaClippingDeclared inputDynamic rangeLightnessLuminanceMeasurement errorSpecificationStructural choiceTransfer function