The real instrument

No design separates the two coefficients

Separating a squared term from a fourth-power one was supposed to need marks at radii far apart, which is a statement about where edges are placed. It is not: one straight edge already runs from 20 px to 326. Spreading ninety-six marks over three edges or sixteen changes the answer by 23 per cent, spreading the offsets makes it 19 per cent worse, and the correlation stays at −0.98 whatever is done. What a plumb-line calibration determines is one number, to 1.52 thousandths, and which number depends on the model.

Worth reading first: Fitting a lens from straightness alone · Straight lines that are not.

The response is at the ends and the information is not spent a budget of marks along one straight edge and found where they belong: a radial map bows an edge by an amount growing as the square of the distance along it, so 93 per cent of an edge’s response lies in its outer quarters, and spending the marks there is nevertheless 16 per cent worse than spreading them evenly, because two clusters say nothing a shifted, tilted line could not say. What identifies the coefficient is a curvature, and a curvature needs three places.

All of that fits one coefficient. It ends on the correlation between two: over the field a single edge occupies, the squared term and the fourth-power term come out −0.997 correlated, which is to say they are very nearly the same parameter. Separating them, that essay said, needs marks at radii that differ enough for r2r^2 and r4r^4 to look different — a statement about distance from the picture’s centre rather than about distance along an edge — so the two design questions point in different directions, and the budget may have to be split deliberately.

It does not, and the reason is embarrassing in a useful way.

An edge is not at a radius

The premise of that closing paragraph is that an edge sits at a distance from the centre. Its own offset is a distance from the centre, and it is natural to read the offset as the radius at which the edge asks its question.

One straight edge already sweeps radii from 20 px to 326The band of radii each of four straight edges covers, laid at 20, 60, 125, 180 px from the picture's centre. An edge is not AT a radius: it passes closest to the centre at its own offset and runs out to the corner of the frame, so the edge at 20 px covers 20 to 326 px and the one at 180 px covers 180 to 372. Separating a squared term from a fourth-power one needs marks at radii far apart, and every edge already has them — which is why placing edges at different offsets buys so little.0100200300distance from the picture's centre, pxeach edge, by how far it passes from the centreoffset 20 px20–326offset 60 px60–330offset 125 px125–348offset 180 px180–372four edges, 82 marks eachevery one spans 16× in radius
Fig. 1 The band of radii each of four straight edges covers, laid at 20, 60, 125 and 180 px from the picture’s centre. An edge passes closest to the centre at its own offset and runs out to the corner of the frame.

An edge is a line, not a point. It passes closest to the centre at its offset and then runs away in both directions to the edges of the frame, so the marks along it sit at every radius from that offset out to the corner. The edge at 20 px covers radii from 20 to 326; the one at 180 px covers 180 to 372.

So the marks at widely separated radii that the two coefficients were said to need are already there, on every edge, for free. The question of how to get radii far apart has the same answer as the question the response is at the ends and the information is not already answered — spend the marks along the edge — because the length of an edge is the radial span.

That reframes the trade before measuring it. Two design questions that look like they pull in different directions turn out to be one question asked twice, and what remains is to check that the arithmetic agrees.

Spreading the budget over more edges barely matters

The first half of the supposed trade is how many edges one budget of marks is spread over. A budget is held exactly here, so that no design is rewarded for having longer edges — which is the confound that makes “more edges are better” look true when what is happening is that more edges is more marks.

Spending 96 marks on 3 edges or on 16 changes the answer by 23 per centThe precision of each radial coefficient against how many edges one budget of 96 marks is spread over, with the distortion centre free as well. Three edges of 32 marks give the first coefficient to 9.80e-3 and the second to 1.43e-2; 8 edges of 12 give 7.99e-3 and 1.11e-2; 16 edges of 6 give 8.42e-3. The best design for the first coefficient is 8 edges and for the second it is 12, and at 8 the second is within 0.6 per cent of its own best — the two are not in competition, because they are not separately determined.05101551015edges the budget is spread overhow precisely each coefficient is fixed, thousandthsfirst coefficientsecondbest for both: 8 edges96 marks, however they are spread23% across the sweep
Fig. 2 The precision of each coefficient against how many edges ninety-six marks are spread over, with the distortion centre free as well. Three edges of thirty-two marks against sixteen edges of six.

Three edges of thirty-two marks fix the first coefficient to 9.80 × 10⁻³ and the second to 1.43 × 10⁻²; eight edges of twelve give 7.99 × 10⁻³ and 1.11 × 10⁻²; sixteen edges of six give 8.42 × 10⁻³. The whole sweep spans 23 per cent, with a shallow best around eight edges and a slow decline either side — too few edges and each carries too much of the fitting, too many and each is too short to bend measurably.

And the answer to the question left open is already visible. The design best for the first coefficient is eight edges; the design best for the second is twelve, and at eight the second is within 0.6 per cent of its own best. They are not in competition, and the reason they are not is the correlation: two numbers that are −0.98 correlated are not two measurements to be traded against each other, they are one measurement reported twice.

Spreading the offsets makes it worse

The second half of the supposed trade is putting edges at different distances from the centre, which was the explicit proposal.

Spreading the edges over 130 px of offset instead of 10 makes the fit 19 per cent worse6 edges, 16 marks each, spread over bands of offsets from 10 px wide to 130. The first coefficient comes out at 6.94e-3 from the narrow band and 8.25e-3 from the wide one, and the correlation between the two coefficients moves from -0.9845 to -0.9830. Putting edges at different distances from the centre was the obvious way to give the two coefficients different radii to work on, and it does nothing, because each edge already runs from its own offset out to the frame's corner.0510255075100125how wide a band of offsets the edges are spread over, pxhow precisely each coefficient is fixed, thousandthsfirst coefficientsecond6 edges, 16 marks eachcorrelation -0.985 throughout
Fig. 3 Six edges of sixteen marks, spread over bands of offsets from ten pixels wide to a hundred and thirty. The first coefficient comes out slightly better from the narrow band.

Six edges crowded within ten pixels of one offset fix the first coefficient to 6.94 × 10⁻³. The same six edges spread over a hundred and thirty pixels of offset fix it to 8.25 × 10⁻³ — 19 per cent worse. The correlation between the coefficients moves from −0.9845 to −0.9830, which is no movement at all.

The direction is the informative part. Spreading the offsets was supposed to be the thing that separates the coefficients and it does the opposite, slightly, for a reason that has nothing to do with the coefficients: pushing edges outward shortens the chord each one cuts across the frame, and a shorter edge bends less. The radial span the spread was meant to buy was already there; what the spread actually spends is edge length.

This is the second time this field has found a design intuition pointing the wrong way. The lines that calibrate a lens found that crowding three edges on one side makes the coefficient ten times worse once the distortion centre is also unknown, which is a real and large effect about which side of the frame edges are on. The effect of which radius they are at, at a fixed budget, is a fifth of that and points the other way.

The axis nobody proposed

Both design questions turn out to move the answer by tens of per cent. One thing moves it by factors.

Eight times the marks buys 4.1 times the precision, against the 2.8 a square root predictsThe same 6 edges given more and more marks. The first coefficient comes out at 2.48e-2 from 24 marks and 5.99e-3 from 192, and the correlation between the two coefficients falls from -0.9965 to -0.9801. This is the axis neither design question named, and it is the only one with real slope in it: where the marks go changes the answer by tens of per cent and how many there are changes it by factors.2448961920.0070.010.020.03marks in the whole calibrationhow precisely each coefficient is fixedfirstsecond6 edges, the marks on them swept×4.1 for ×8
Fig. 4 The same six edges given more and more marks. Eight times the marks buys 4.1 times the precision, against the 2.8 a square root of the count would predict.

Twenty-four marks fix the first coefficient to 2.48 × 10⁻² and a hundred and ninety-two fix it to 5.99 × 10⁻³ — a factor of 4.1 for eight times the marks, where independent readings of one quantity would have given 2.8. The extra comes from the correlation, which falls from −0.9965 to −0.9801 over the same sweep: more marks not only average better, they begin to tell the two coefficients apart.

That is the practical answer to the question left open. A photographer deciding how to calibrate a lens through a plumb-line fit should not agonise over where the edges go, within reason; three edges and sixteen are within a quarter of each other, and narrow and wide bands of offset within a fifth. What matters is how many marks there are, and it matters by factors.

What is actually determined is one number

The correlation has been reported at every design above and has never left the neighbourhood of −0.98. It is worth stating what a correlation that size means rather than quoting it again.

The pair is determined along one direction to 1.52 thousandths and across it to 8.3The one-sigma region of the two coefficients from 6 edges of 16 marks, with the distortion centre free. The region is a sliver: the combination of the two that the marks fix is determined to 1.516e-3, and the same marks fix the first coefficient alone only to 8.251e-3 once the second is admitted — 5.4 times worse. Holding the second coefficient at zero gives the first to 1.516e-3, which is the stiff number again. A plumb-line calibration measures one number; which number it is depends on the model that was written down.-20-1001020-10010error in the first coefficient, thousandthserror in the second, thousandthsthe soft directionthe stiff combination, ±1.526 edges, 16 marks each, centre freecondition 5.4:1
Fig. 5 The one-sigma region of the two coefficients from six edges of sixteen marks, with the distortion centre free. It is a sliver, and the short direction across it is what the marks actually fix.

The region is a sliver. Along one direction in the plane of the two coefficients the marks fix a combination of them to 1.52 × 10⁻³; across that direction they fix nothing better than 8.3 × 10⁻³, which is 5.4 times worse. And the stiff number is not a new one: holding the second coefficient at zero and fitting only the first gives 1.52 × 10⁻³, the same figure to three places.

So admitting a second radial coefficient costs nothing at all in the direction the data are sharp and everything in the direction they are not. A plumb-line calibration of this kind measures one number. Which number it is depends on which model was written down — a one-coefficient model reports it as the first coefficient, a two-coefficient model reports it as a combination and reports each coefficient separately five times worse than the combination is known.

That is the honest form of the question “is a second coefficient worth fitting”. It is not worth fitting in order to know the second coefficient, which no design here knows well. It is worth fitting when the map matters more than the parameters — because a combination determined to 1.52 × 10⁻³ undistorts a picture as well whether it is reported as one number or as two.

Why the correlation is so hard to break

It is worth saying where a correlation of −0.98 comes from, because the number looks like a property of the fit and is a property of the functions.

A radial map moves a mark outward by r(k1r2+k2r4)r(k_1 r^2 + k_2 r^4), and over the range of radii any real frame holds — say 20 px to 370, which is a factor of eighteen — r2r^2 and r4r^4 are both smoothly increasing and both nearly featureless. Changing k1k_1 and compensating with k2k_2 moves every mark by a residual that is small over the whole range and exactly zero at two radii, and small everywhere is what a poorly identified pair means. Two functions are separable when one can be large where the other is small, and these two cannot: r4r^4 is r2r^2 multiplied by something that only ever grows.

Straight edges are not the only thing that behaves this way, and the shape is worth recognising. A lens destroys the invariant measures the same map from the other side, by what it does to a quantity a projection preserves; there the two coefficients enter the damage in nearly the same proportion too, and a reader handed the damage alone could not say which of them caused it.

That is why a design cannot rescue them. The marks can be put anywhere in the frame and the pair of functions they are asked to distinguish is the same pair, sampled over the same eighteenfold range of radius, because an edge covers that range whatever its offset.

The one thing that does help is the one thing measured above: more marks. The correlation falls from −0.9965 at twenty-four marks to −0.9801 at a hundred and ninety-two, which is exactly what averaging does to a nearly-degenerate pair — it does not make the functions more different, it makes the small residual between them measurable. Reading the marks more precisely would do the same thing, and fitting a lens from straightness alone is the essay about what that residual is made of.

What a photographer should take from it

Three statements, in the order they would be used.

Do not chase the arrangement. Within any sensible design — edges long enough to bend, spread across both sides of the frame so the distortion centre is not confused with a bow — the arrangement changes the answer by a fifth. The lines that calibrate a lens found the one arrangement that really does matter, which is not crowding every edge on one side, and past that the returns are small.

Count the marks. Eight times as many buys 4.1 times the precision, and that is the whole of the leverage available. A calibration from three photographs of a doorway is not a calibration from thirty, and nothing about where the doorways are makes up the difference. The gain is better than averaging because the correlation improves with the count as well, so the marks are doing two jobs at once and the second of them is the one no design could do.

And the returns are steep enough to plan against. Across the sweep the first coefficient’s precision improves as the mark count to the power 0.682 — better than the 0.5 an average of independent readings would give, because the correlation falls as well. The combination the marks really fix goes from 1.516 × 10⁻³ at ninety-six marks to 1.189 × 10⁻³ at a hundred and ninety-two. A reader who wants that combination to a part in a thousand therefore needs a little under four hundred marks, which is four or five photographs of an ordinary doorway read at a mark every few pixels — a budget, not an aspiration. Doubling it again buys a fifth, and at some point the half-pixel reading error becomes the thing to improve instead.

Decide what the number is for. If the answer wanted is a map — undistort this picture — then a two-coefficient fit is fine, because the combination the marks determine is determined to 1.52 × 10⁻³ and the map is that combination. If the answer wanted is a coefficient, to compare with a manufacturer’s figure or another lens’s, then a two-coefficient fit reports it 5.4 times worse than a one-coefficient fit reports its own, and the comparison is between numbers that do not mean the same thing.

What this does not settle

One lens, one frame, one noise level. Every number is for a wide camera with the barrel this field has used throughout, marks read to half a pixel, and a frame 690 by 400. A longer lens with less distortion bends its edges less and everything above scales with that; the shapes of the curves are the finding, not the magnitudes.

The distortion centre is free but nothing else is. The lines that calibrate a lens found the centre to be the parameter that makes crowding fatal, and it is free in every fit here. A real calibration also frees the focal length and the aspect, and those are not modelled.

A model is not the truth. Two radial coefficients are a polynomial fitted to a lens, and a barrel model folds at a radius it sets itself found that such a polynomial stops being invertible past a radius it chooses for itself. Determining a combination of its coefficients well says nothing about whether the lens obeys it.

And two coefficients may be the wrong pair. The division model reparameterises the same bending with one coefficient and a model that inverts has a horizon is about what that buys. Nothing here compares the two families; the question asked was about a design for a stated model.

And the information is a prediction. The precisions above are inverse Fisher information, which is what a fit would achieve if its residual were quadratic and its noise normal. That essay checked the prediction against a seeded Monte-Carlo fit for one coefficient; nothing here rechecks it for two.

Which marks, and how many

An edge is not at a radius. Every straight edge runs from its own closest approach out to the corner of the frame, so the edge at 20 px covers radii from 20 to 326 and the one at 180 covers 180 to 372, and the widely separated radii two coefficients were supposed to need are already on each of them.

So the trade that closing paragraph posed does not exist. Spreading ninety-six marks over three edges or sixteen changes the first coefficient’s precision by 23 per cent, with the best at eight; spreading six edges over a hundred and thirty pixels of offset instead of ten makes it 19 per cent worse, because it shortens the chords. The design best for one coefficient is within a per cent of the best for the other, at every point of both sweeps.

The correlation never moves: −0.98 at every design, against the −0.997 a single edge gave. What the marks fix is a combination, to 1.52 × 10⁻³, which is exactly what they fix for one coefficient when the second is held at zero; each coefficient alone is fixed 5.4 times worse. And the only axis with real slope in it is the one neither design question named — eight times the marks buys 4.1 times the precision.

Still open: whether a curved target breaks the correlation

Everything here is straight edges, because the plumb-line method is built on them: its residual is how far a set of marks departs from a straight line, and it needs no knowledge of the scene at all. That freedom is also the constraint, since every edge covers the same kind of radial band and the marks on any of them are therefore asking one kind of question.

A target that is known — a printed grid, a circle of stated radius — is a different instrument. Its residual can be how far the undistorted marks depart from the known shape, and a circle centred on the picture’s own centre would put every one of its marks at one radius, which is the arrangement no straight edge can produce.

The measurement that follows fits the same two coefficients to a set of concentric circles at stated radii, with the same total marks and the same reading noise, and reports the correlation and the two precisions against the number and spacing of the circles. If circles at widely different radii break the correlation where straight edges cannot, then the separation of the coefficients is bought by knowing the target rather than by any arrangement of marks — and the price of the plumb-line method’s independence from the scene is that it can only ever determine one number.

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.

Camera calibrationConditioningCorrelationerror propagationplumb-line calibrationPrincipal pointRadial distortionResidual