Through water and glass

Turning the glass tells the window from the lens

A calibration done through a two-degree wedge of glass reports a lens decentred by about 1e-2 that does not exist, and hides the glass inside it. Calibrate twice with the glass turned between, and the glass's part turns while the lens's stays: a half turn finds a real lens decentring of 2.2e-3 to 5.2e-4 with readings to 0.4 px, where one calibration was 1.0e-2 out. Three calibrations spread evenly round the turn do better, because the loop the glass traces is not a circle. What never separates is the radial coefficient, which has no direction for a turn to carry.

Worth reading first: What survives a pane of glass · What a ray does at a surface.

A calibration through glass reports a prism calibrated a camera behind a two-degree wedge of glass with a model that knew nothing of the glass, and watched the model explain the glass away. Decentring terms took about three-quarters of the swirl the wedge makes, moved the principal point further than before, and reported a lens decentred by more than a hundredth that did not exist; the residual that had announced the glass went quiet over nearly twice the reach. The lens in that study had no distortion of its own, so everything the calibration reported was the glass.

That essay’s last paragraph named the one test that can tell a glass’s terms from a real lens’s without modelling the glass: move it. Turn the window about the camera’s axis between two calibrations, and the lens’s own terms stay where they are while the glass’s turn with it. The question was how much turn is enough, and whether the difference between two calibrations gives back the lens and the glass separately.

It does, with two qualifications the measurement did not expect: the glass’s part does not turn rigidly, and a radial term cannot be separated at all.

A loop around the lens

The camera below has a lens with distortion of its own now: a radial coefficient of −0.08 and decentring terms of 0.002 and −0.001, which is a modest real lens. In front of it is the same two-degree crown-glass wedge. It is calibrated from two rings of directions, 40 and 20 degrees off the axis, by the standard model — rotation, focal length, principal point, radial and decentring terms — twenty-four times, the wedge turned fifteen degrees about the camera’s axis between each.

Turned all the way round, the glass's decentring walks a loop around the lens's own — 1.9e-3, -9.6e-4 recovered against 2e-3, -1e-3A camera whose lens has a radial coefficient of -0.08 and decentring terms of 0.002 and -0.001, behind a 2° wedge, calibrated with exact readings by a model that knows nothing of the glass — rotation, focal length, principal point, radial and decentring terms — twenty-four times, the wedge turned 15° about the camera's axis between each. The decentring each calibration reports (dots, in order round the loop): from (1.14e-2, -5.04e-3) at no turn to (-7.74e-3, 3.76e-3) at a half turn. The glass's share turns with the glass; the lens's does not. Fitting one fixed vector and one turning vector to all twenty-four gives the lens's decentring as (1.94e-3, -9.64e-4) and the glass's as 1.05e-2 long; two calibrations a half turn apart give (1.83e-3, -6.40e-4). The loop is not a circle — its distance from the centre runs from 1.02e-2 to 1.09e-2 — because the glass's effect also depends on how it sits against the camera's own tilt.the lens's ownno turnhalf a turndecentring (t₁, t₂) reported at every 15° of turn, exact readingsthe lens sits inside the loop
Fig. 1 The two decentring coefficients each glass-blind calibration reports as the wedge turns in 15° steps, exact readings: a loop from (1.14e-2, −5.04e-3) at no turn to (−7.74e-3, 3.76e-3) at a half turn, around the lens’s own (2e-3, −1e-3). A fixed vector and a turning one fitted to all twenty-four give the lens as (1.94e-3, −9.64e-4).

Every calibration reports a decentring far larger than the lens has — around a hundredth, five times the lens’s own — and the reported value goes once round a loop as the glass goes once round. The lens’s own decentring sits inside the loop, near its centre. That is the whole idea made visible: the glass’s apparent decentring is a vector that the glass carries round with it, and the lens’s is a vector the glass cannot move.

Fitting that description to all twenty-four calibrations — one fixed vector for the lens, one vector that turns with the glass — returns the lens’s decentring as (1.94,−0.964)×10−3(1.94, -0.964)\times10^{-3} against the true (2,−1)×10−3(2, -1)\times10^{-3}, and the glass’s as a vector 1.05×10−21.05\times10^{-2} long. Two calibrations half a turn apart, the simplest version of the test, return (1.83,−0.640)×10−3(1.83, -0.640)\times10^{-3}: close in the first component and a third out in the second.

The loop is not quite a circle, and that is what limits the pair. Its distance from the lens’s point varies from 1.021.02 to 1.09×10−21.09\times10^{-2} round the turn, and the reported vector does not advance by exactly fifteen degrees at every step. The glass’s effect on the picture depends on how the wedge sits against the camera’s own slight tilt, not only on the wedge’s azimuth, and a model that assumes the glass’s decentring turns rigidly is off by the loop’s departure from roundness. Measured on the loop, the reported pair also goes round the opposite way to the glass, which is a fact about how Brown and Conrady wrote their two terms rather than about optics. Drag the turn and the ring shows it: a quarter turn of the glass carries the reported pair a quarter turn the opposite way round the lens’s point, from (1.14,−0.504)×10−2(1.14, -0.504)\times10^{-2} to (−0.234,−1.09)×10−2(-0.234, -1.09)\times10^{-2}, and at every stop the ring sits about a hundredth from the recovered centre.

What else turns, and what does not

The decentring is two of the calibration’s numbers. The principal point and the radial coefficient are the others the earlier essay found the glass pushing on.

The principal point the calibration reports turns with the glass, 13.9 px out, and averages to 0.23 px; the radial coefficient barely moves, -0.0791 to -0.0784 against -0.08The same twenty-four calibrations and one more at a full turn. The principal point each reports, across and down the picture (the two curves): up to 13.9 px from the true centre, going once round as the glass goes once round, so that its average over the turn is 0.10 and -0.21 px — the lens's own centre, which is 0 here, to within what the loop's lack of roundness leaves. The radial coefficient does not go round: it runs from -0.07908 to -0.07836, never within 0.0009 of the lens's -0.08. A radial term has no direction for the glass to carry round, so the glass's directionless share of it is the same at every turn, and what varies is only a small wander; a turn cannot separate the share.-10010090180270360how far the glass is turned about the camera's axis (degrees)principal point reported (px)acrossdownprincipal point reported at every 15° of turnk₁ -0.0791–-0.0784
Fig. 2 The principal point each calibration reports, across and down, as the glass turns a full turn: up to 13.9 px from the true centre, going once round, averaging 0.10 and −0.21 px over the turn. The radial coefficient runs from −0.0791 to −0.0784 against the lens’s −0.08, never within 0.0009 of it.

The principal point goes round as well: up to 13.9 pixels from the true centre, which is where the earlier essay found a decentring calibration pushing it, and its average over a full turn is 0.10 pixels across and −0.21 down — the true centre to within a quarter of a pixel. A wedge moves the centre, not the lens found that a radial-only calibration pins the wedge’s first effect on the principal point; turning the glass makes that point walk round the true centre, and the walk’s centre is the answer.

The radial coefficient does not go round. It wanders a little with the turn, between −0.0791 and −0.0784, and never comes within 0.0009 of the lens’s −0.08. The glass has a radial share of its own — a wedge bends rays off the axis by an amount that grows with the angle, some of which looks like barrel distortion — and the part of that share with no direction is the same at every turn. The wander is the glass’s interplay with the camera’s own tilt; the constant part survives any number of turns, and averaging the turned calibrations still leaves the radial coefficient about 0.0012 from the lens’s. The separation works for everything the glass does that points somewhere, and for nothing it does equally in every direction.

How small a turn is enough

Two calibrations are the practical case: a photographer who can turn a window, or a camera housing, once. The question is how far.

Two calibrations a half turn apart find the lens's decentring to 5.2e-4, against 1.0e-2 from one; a turn of 60° is the least that gets within half the lens's own 2.2e-3The lens's decentring recovered from two glass-blind calibrations, the second with the glass turned by a stated angle, taking the glass's apparent decentring to turn rigidly with it; readings to 0.4 px, 40 pairs a point, the median error shown. At 10, 20, 30, 45, 60, 90, 120, 150, 180°: 5.6e-3, 2.7e-3, 1.7e-3, 1.3e-3, 1.0e-3, 7.2e-4, 5.3e-4, 4.7e-4, 5.2e-4. With exact readings the same pairs leave 2.8e-4, 2.9e-4, 3.0e-4, 3.2e-4, 3.4e-4, 3.9e-4, 4.2e-4, 4.2e-4, 4.0e-4 — the floor the loop's lack of roundness sets. One calibration alone reports the glass and the lens together, 1.0e-2 from the lens's own, which is 2.2e-3 long. The separation divides the difference between the two calibrations by twice the sine of half the turn, so a small turn divides the readings' noise by a small number: the error falls roughly as one over that sine until the floor.3×10⁻⁴0.0010.0030.0150100150how far the glass is turned between the two calibrations (degrees)error in the lens's decentring (log scale)one calibrationthe lens's own decentringread to 0.4 pxexact readings40 pairs of calibrations a pointnoise ÷ 2 sin(ψ/2)
Fig. 3 The lens’s decentring from two calibrations, the second with the glass turned by a stated angle, readings to 0.4 px, 40 pairs a point. 1.0e-3 at 60°, 7.2e-4 at 90°, 5.2e-4 at 180°; 5.6e-3 at 10°. Exact readings leave a floor of 2.8e-4 to 4.2e-4. One calibration alone is 1.0e-2 out; the lens’s own decentring is 2.2e-3.

With readings to 0.4 pixels, one calibration reports the lens’s decentring 1.0×10−21.0\times10^{-2} away from the truth — the glass and the lens added together — against a lens whose own decentring is only 2.2×10−32.2\times10^{-3} long. Two calibrations ten degrees apart are hardly better, 5.6×10−35.6\times10^{-3}. At sixty degrees the pair finds the lens to 1.0×10−31.0\times10^{-3}, better than half the lens’s own size, which is the least turn that does. At ninety degrees, 7.2×10−47.2\times10^{-4}; at a half turn, 5.2×10−45.2\times10^{-4}.

The shape of the curve is the arithmetic of the separation. The glass’s vector is found from the difference between the two calibrations, divided by twice the sine of half the turn, and a small turn divides the readings’ noise by a small number. The error therefore falls roughly as one over that sine, until it meets the floor that the loop’s lack of roundness sets: with exact readings, two calibrations leave 2.82.8 to 4.2×10−44.2\times10^{-4} whatever the turn. At a half turn the noisy pairs are within a third of that floor. Turning further than about ninety degrees buys less than it seems to, because by then the loop, not the readings, is the limit.

Three turns beat two

The floor comes from assuming the loop is a circle, and the way to remove it is to sample the loop so that its departures cancel.

Spread evenly round the turn, 3 calibrations find the lens's decentring to 3.9e-4 and 12 to 1.9e-4; with exact readings the floor falls from 4.0e-4 to 7.3e-5The lens's decentring from calibrations with the glass turned to 2, 3, 4, 6, 8, 12 evenly spaced angles round a full turn, one fixed vector and one turning vector fitted to all of them; readings to 0.4 px, 30 sets a point, median error: 7.0e-4, 3.9e-4, 3.9e-4, 2.9e-4, 2.2e-4, 1.9e-4. With exact readings: 4.0e-4, 7.2e-5, 7.2e-5, 7.3e-5, 7.3e-5, 7.3e-5. More calibrations average the readings' noise, and they also average the loop's lack of roundness: a loop that bulges one way at one turn and the other way half a turn later has its bulges cancel when it is sampled evenly, so the floor falls too.234681210⁻⁴3×10⁻⁴0.001calibrations, spread evenly round a full turn (log scale)error in the lens's decentring (log scale)read to 0.4 pxexact readings30 sets a pointevenly round the turn
Fig. 4 The lens’s decentring from calibrations spread evenly round a full turn. Readings to 0.4 px, median of 30 sets: 7.0e-4 from 2, 3.9e-4 from 3, 2.9e-4 from 6, 1.9e-4 from 12. Exact readings: 4.0e-4 from 2, then 7.2e-5 from 3 or more.

Two calibrations half a turn apart leave the exact floor at 4.0×10−44.0\times10^{-4}. Three, a third of a turn apart, drop it to 7.2×10−57.2\times10^{-5}, and more calibrations leave it there. The loop bulges one way at one turn and the other way half a turn later — its departure from a circle goes round twice as the glass goes round once — and sampling it at three or more evenly spaced turns puts equal and opposite bulges into the fit, which cancel. With readings to 0.4 pixels the median error falls from 7.0×10−47.0\times10^{-4} with two calibrations to 3.9×10−43.9\times10^{-4} with three and 1.9×10−41.9\times10^{-4} with twelve, the readings’ noise now averaging down while the floor stays out of the way.

So the practical recipe is three calibrations, not two: the glass at its starting azimuth, a third of a turn round, and two-thirds. That finds a real lens’s decentring to about a fifth of its own size behind a window it never modelled, where one calibration was wrong by five times the size.

The readings have to reach out

A decentring term is a distortion that grows with the square of the distance from the centre of the picture. Readings near the axis hardly see it — the lens’s or the glass’s — and the separation then has little to separate.

A half turn separates the lens's decentring only if the readings reach far off the axis: 4.6e-3 at 15°, 3.2e-4 at 50°Two glass-blind calibrations a half turn apart, readings to 0.4 px, 30 pairs a point, against how far off the axis the two rings of readings reach. The lens's decentring recovered: 4.6e-3, 2.3e-3, 1.5e-3, 9.9e-4, 5.5e-4, 3.2e-4 at 15, 20, 25, 30, 40, 50°; from one calibration, glass and lens together: 1.2e-2, 1.1e-2, 1.1e-2, 1.1e-2, 1.0e-2, 8.8e-3; with exact readings the pair leaves 1.4e-3, 9.3e-4, 6.9e-4, 5.5e-4, 4.0e-4, 2.9e-4. The lens's own decentring is 2.2e-3 long, and 30° is the least reach at which the pair finds it to half that. A decentring term grows as the square of the distance from the centre, so readings near the axis hardly see it — the lens's or the glass's — and the difference between two calibrations is then mostly noise.0.0010.0120304050how far off the axis the readings reach (degrees)error in the lens's decentring (log scale)the lens's own decentringone calibrationa half turn, 0.4 pxa half turn, exact30 pairs a pointdecentring grows as r²
Fig. 5 Two calibrations a half turn apart, readings to 0.4 px, against how far off the axis the two rings reach: 4.6e-3 at 15°, 9.9e-4 at 30°, 3.2e-4 at 50°. One calibration: 1.2e-2 to 8.8e-3. Exact readings: 1.4e-3 at 15° to 2.9e-4 at 50°. Thirty degrees is the least reach that finds the lens to half its size.

With the rings reaching fifteen degrees off the axis, a half-turn pair finds the lens’s decentring to 4.6×10−34.6\times10^{-3}, twice the lens’s own size — no separation worth having. At thirty degrees, 9.9×10−49.9\times10^{-4}; at fifty, 3.2×10−43.2\times10^{-4}. Even with exact readings a short reach is poor, 1.4×10−31.4\times10^{-3} at fifteen degrees, because near the axis the wedge’s effect is almost a pure turn of the camera and a shift of the principal point, and what little of it looks like decentring is small against the lens’s own.

That reverses the lesson the earlier essay drew for the calibration alone. There, a longer reach let the glass-blind model hide the glass over a wider field, because extra terms had more to absorb; here, a longer reach is what lets two calibrations pull the glass back out. The reach that makes a single calibration most deceptive is the reach that makes a pair of them most honest.

What the term that does not turn costs

The radial coefficient is the one number turning cannot correct, and it is worth pricing, because a reader who turns the glass three times and trusts the result will trust this number too.

Across the whole turn the calibration reports a radial coefficient of about −0.0788 for a lens whose own is −0.08: the glass contributes about +0.0012, a barrel-like share about one and a half per cent of the lens’s own distortion. On this camera, with a 620-pixel focal length, a radial term moves a point at forty degrees off the axis — the edge of the readings’ reach — by the coefficient times the cube of the normalised radius times the focal length: about 0.44 pixels for that share. That is roughly the reading error itself, so a calibration that ignores it is wrong at the edge of its field by about what it could measure there, and less inside.

It is also the kind of error that stays hidden, for the reason the earlier essays kept finding. A radial term is exactly the shape a radial calibration is built to fit, so the glass’s share is absorbed into the lens’s coefficient without leaving any residual behind; nothing in the calibration’s own output says it is there. The decentring was the same until the glass was turned. The radial share has no turn to expose it.

For most uses that is an acceptable price — a lens described with 1.5 per cent too little barrel is a better description than one decentred by five times its true amount — but it is a price, and it grows with the wedge’s angle and the reach. A camera looking through a strongly tilted port, or reading far into the corners of its field, carries the glass’s radial share as a real error in every measurement it makes near the edge of the frame.

Why the reach matters as the square

The reach figure has a simple law under it, and it is the same one the lines that calibrate a lens found for straight edges: a distortion term is read in proportion to how far from the centre the evidence lies. A decentring term moves a point by an amount that grows as the square of its distance from the principal point; a reading error does not grow at all. Doubling the reach quadruples what each calibration sees of the decentring — the lens’s and the glass’s alike — against the same noise, and the difference between two calibrations, which is what the separation reads, grows with it.

That is also why the principal point walks round so widely, 13.9 pixels, while the decentring it trades against is about a hundredth. The principal point is not the centre is the reminder that the principal point is a fitted number like any other; behind glass it absorbs the part of the wedge’s effect that is a shift of the whole picture, and the part that grows across the picture goes to the decentring. Turning the glass sends both round their loops, and a calibration that reaches far enough out to see the second also fixes the first well.

Why turning works, and what it cannot do

The earlier essays in this sequence found the glass hiding in whatever terms a calibration offered it: first in a rotation, then in the principal point, then in decentring and thin-prism terms that describe a lens with a tilted element. The wedge recovered with the camera showed that a model which knows about the wedge can recover it directly, and a wedge of glass turns the camera behind it that its first effect is indistinguishable from turning the camera. Turning the glass is the physical version of what the model with the wedge in it does algebraically: it supplies the one fact that tells the glass from the lens, that the glass can move and the lens cannot.

What it cannot supply is anything the glass does symmetrically about the axis. A wedge’s radial share looks the same at every turn, and no rotation of the glass about the camera’s axis can reveal it. For that the glass must be modelled, removed, or turned about some other axis, which is a different experiment: tilting a window changes what a symmetric effect is symmetric about. A flat pane square to the axis is the limiting case, and a harmless one for a calibration: what survives a pane of glass found that a slab with parallel faces moves every point and no direction, so a calibration from distant targets sees nothing of it to separate, and a pane gives a product before it gives two numbers that what it does to near points arrives as one product of thickness and index. A dome port is the other symmetric case: the dome knows its offset in units of itself found that a centred dome bends nothing, and a decentred one bends rays by an amount with a direction — which a turn of the housing about the camera’s axis should carry round as it does the wedge’s.

So the answer to the earlier essay’s question is conditional in a useful way. A camera behind a window can be calibrated without modelling the window by turning it, for every term the window makes that points somewhere — the decentring and the principal point — with three turns a third of a revolution apart and readings reaching thirty degrees or more off the axis. For the radial coefficient, turning is no help, and a calibration through glass will keep reporting a lens with a little more barrel than it has.

What was assumed

The glass turns about the camera’s own axis. A housing’s window turned about an axis that is not the camera’s also moves the glass across the view, and adds a displacement the model reads as a change of principal point that does not go round a loop.

The glass is a thin wedge of fixed angle. A window of varying thickness, or a dome, is not carried round rigidly by a turn; its effect at each azimuth is different, and the loop is no longer one shape traced round.

The lens does not change between calibrations. A lens refocused between them, or whose zoom creeps, moves its own terms, which the separation would then attribute partly to the glass.

Readings are independent and to 0.4 pixels. A calibration target read to a tenth of a pixel lowers every noisy curve here by a factor of four and leaves the floors where they are, so three turns become worth more than two by a larger margin.

Still open: whether tilting the glass separates the radial share

Turning the glass about the camera’s axis separates everything the glass does that has a direction and nothing it does symmetrically. A wedge’s radial share, and all of a flat pane’s, is symmetric about the axis the turn is about. Tilting the glass instead — turning the window about an axis across the view — changes the axis its symmetric effect is symmetric about, so a symmetric effect in one position becomes an asymmetric one in the other.

The measurement that settles it calibrates the same camera behind a flat pane and behind the wedge, with the glass square to the axis and then tilted by a stated angle, and asks whether the difference between the two calibrations’ radial coefficients, decentring and principal point, fitted together, recovers the glass’s radial share and so the lens’s true radial coefficient — and how large a tilt is needed before the glass’s radial share, which a turn could not touch, stands clear of the reading error.

Shares its objects with

Essays that name at least two of the same things, and that neither author linked.

Named objects

A flat tag is an object no other essay names yet.

Brown–ConradyCamera calibrationIdentifiabilityModel errorPrincipal pointRadial distortionRefractive indexResidual