Drawn confidently

A lens bends a table's tilt, not its lines

A street photographed through a lens with 2% of barrel distortion has its verticals bowed by 0.38 px, too little to see, while their straight chords still meet to 0.28 px. What has moved is where they meet: a lean table fitted to them reads a 20° tilt as 18.87°, and matches the photograph to four hundredths of a pixel. The table built from the camera's true tilt misses the same photograph by 1.58 px. A lens's distortion enters a table as a different constant, and a bowed line is a separate, smaller error that no table of straight leans can take back.

Worth reading first: The cube that is a box · Straight lines that are not.

A three-point street can be drawn without its third vanishing point. Each vertical is leant by a small angle read from its column, with the lean’s tangent proportional to the column’s distance from the middle of the sheet. A table of leans converges on the wrong point found that this table is exact for a pinhole camera that only tilts, provided its one constant is measured from the ground line the feet stand on. A rolled table is repaired by a sideways step found that a roll of a quarter of a degree costs it a pixel at the tops, and that one sideways step of the column it counts from takes back nearly all of it.

Both of those were drawn by a pinhole, and in a pinhole’s picture a vertical edge is a straight line. That is what lets one lean describe it. A drawing worked up from a photograph is drawn from a lens, and an ordinary wide lens has barrel distortion. Barrel distortion bows every straight line that does not pass through the centre of the picture. The rolled-table essay ended by asking what that does to a table. Does a table fitted to a distorted photograph read the tilt high or low, and how does its error at the tops compare with the bow itself? Can one more constant absorb the lens, or is a bowed line a kind of error no table of straight leans can take back?

Both halves of the last question turn out to be true, and they describe two different parts of what the lens does. The lens changes the leans, and a table absorbs that completely, as a different tilt. The lens also bends the lines, and no straight-line table can absorb that. On this street the first is several pixels and the second is a fraction of one.

The lens moves every point along its radius

The street is the one the earlier essays drew: nine vertical edges 10 m high, 25 m away, spread across 18 m. The camera is the same pinhole, a 595 px focal length on a 690 by 420 frame, tilted up by 20°. A lens is added in the simplest form that calibrations use, the first term of the Brown–Conrady polynomial. Each point moves along its own radius from the principal point, by a factor 1+k1r21 + k_1 r^2, with rr its distance from the centre in focal lengths. A negative k1k_1 is barrel. Rather than quote k1k_1, the essay quotes the distortion the way a lens review does, as how far it moves the frame’s corner: 2% barrel is k1=−0.043k_1 = -0.043, and 5% is −0.109-0.109.

A street at 20° of tilt photographed through a lens with barrel distortion of -5% at the cornerNine vertical edges of a street 25 m away and 10 m high, seen by a camera tilted up by 20°. Thin: the pinhole's picture, where every vertical is a straight line aimed at one third vanishing point. Heavy: the same edges through a lens that moves the frame's corner by -5%, which moves every point along its radius from the centre. The outer verticals are drawn in towards the middle, by up to 13.1 px at their feet, which lie well below the centre, and 2.6 px at their tops, and they bow by at most 0.99 px off the straight line through their own ends, too little to see at this scale. The centre vertical is untouched. The slider runs from 6% barrel to 4% pincushion.tops: through the lens (light), pinhole (dark)tilt 20°, corner -5%feet moved 13.1 px · bow 0.99 px
Fig. 1 The street at 20° of tilt. Thin lines: the pinhole’s picture, where each vertical is straight and all of them aim at one third vanishing point. Heavy: the same edges through a lens with 5% barrel distortion at the frame’s corner. The slider runs from 6% barrel to 4% pincushion.

Two things in the picture move, and they move by very different amounts. Every point is pulled towards the centre, by an amount that grows as the cube of its distance from it. The street’s feet lie 261 px below the centre at this tilt, further out than anything else in the drawing, so they move most: by up to 5.25 px at 2% barrel and 13.1 px at 5%. The tops lie almost on the centre row and barely move, 2.6 px at 5%. The centre vertical, which runs straight through the principal point, does not move sideways at all. Straight lines that are not made this point about any radial map: the only lines it leaves straight are those through its centre, and the bend of every other is decided by how far it passes from that one place.

The second thing, the bow, is barely visible even at 5%. A vertical is a short line, about 250 px on this sheet, and a radial map bends a short line very little: it moves the line’s two ends by different amounts, and the middle by nearly their average. Most of what the lens does to a vertical is to move its ends. That is a change of lean, not a change of straightness.

The bow is the part no table can draw

The bow is measured directly: the largest distance any point of each photographed vertical lies from the straight line through its own foot and top. That straight line, the chord, is what a draughtsman copying the photograph would rule.

A barrel lens bows a ten-metre street's verticals by under a pixelThe largest distance any of the street's nine verticals strays from the straight line through its own foot and top, against the barrel distortion of the lens, quoted as how far it moves the corner of the 690 by 420 frame. For the 10 m street at 20° of tilt it is 0.38 px at 2% and 0.99 px at 5%. Buildings twice as tall, so twice as long on the sheet, bow 1.18 and 2.97 px, about three times as much. At 10° of tilt the 10 m street bows 0.89 px at 5%. The vertical through the centre column does not bow at all.0123246barrel distortion at the frame's corner (%)worst bow off the chord (px)10 m high, 20°20 m high, 20°10 m high, 10°nine verticals, 25 m away5%: 0.99 px on a 10 m street
Fig. 2 The worst bow of any of the street’s verticals off its own chord, against barrel distortion at the frame’s corner: the 10 m street at 20° of tilt, a street twice as tall, and the 10 m street at 10°.

For the 10 m street at 20° the worst bow is 0.38 px at 2% barrel and 0.99 px at 5%. A street of buildings twice as tall, so twice as long on the sheet, bows 1.18 and 2.97 px, about three times as much. At 10° of tilt the 10 m street bows 0.89 px at 5%. Over the range of distortion an ordinary wide lens has before correction, a vertical of this street is bent by less than a pixel.

This is the part of a lens no table of straight leans can take back, and the reason is plain: a table draws straight lines, and the photograph’s verticals are not straight. However well each line’s lean is chosen, the drawn line lies off the photographed curve by the bow somewhere along its length. Every other error in this essay can be driven down by a better constant. This one is a floor.

It is a low floor, though, and that matters for what follows. The earlier essays priced a table’s errors at the tops of the lines in pixels, and a sub-pixel floor sits below the error of any hand. The useful question is what the lens does above the floor.

The chords still meet

A table’s lines meet at one point when the feet share a row. That was the first essay’s finding, and it is what makes a table’s failures invisible to the obvious test. A lens pulls the feet in towards the centre by different amounts and lifts the outer ones slightly off their row, so the photograph’s chords need not meet at one point any more. Whether they do is the first thing a reader checking a drawing against a photograph would look at.

The chords of a distorted street still meet, at a third point the lens has pushed awayThe straight lines through each vertical's foot and top in the photograph, at 20° of tilt. How far they pass from their best common point, rms (solid): 0.28 px at 2% barrel and 0.95 px at 5%. How far that common point lies beyond the pinhole's third vanishing point, 1425 px above the top of the sheet (dashed): 106 px at 2%, 304 px at 5%. A reader testing whether the verticals converge finds that they do, on a point that is not the camera's.0.1110100246barrel distortion at the frame's corner (%)distance (px)chords' miss, rmspoint moved awaytilt 20°, ten-metre street5%: miss 0.95 px, moved 304 px
Fig. 3 The chords of the photographed verticals at 20° of tilt: how far they pass from their best common point, rms, and how far that common point lies beyond the pinhole’s third vanishing point, against barrel distortion. The vertical axis is logarithmic.

They nearly do. At 2% barrel the chords miss their best common point by 0.28 px, rms, and at 5% by 0.95 px. A rolled table measured what a hand does when it aims each line at a correct point and slips half a degree: it misses its own common point by 12.6 px. The lens’s failure to converge is under a fortieth of a hand’s at 2%, and a thirteenth at 5%. A drawing copied from these chords passes the convergence test.

It passes it at the wrong point. The common point of the chords lies beyond the camera’s third vanishing point, which is 1,425 px above the top of the frame. At 2% barrel it is 106 px further up, and at 5%, 304 px. That is the same signature the earlier essays found twice: an error shared by every line, so that the lines agree with each other perfectly and disagree with the camera together. Both vanishing points on the paper is the test that cannot see it, because it asks whether the lines agree, not where.

What the lens moves is the tilt

A third vanishing point further away is a smaller tilt. A draughtsman who fits the table’s one constant to the photograph’s chords, by least squares on each chord’s lean against its column, is in effect reading the tilt from the photograph. The constant converts back to a tilt through the ground-line rule the first essay found, so with no lens the reading is exact.

A table fitted to a lens's chords reads the tilt wrong, low or high by which end of the verticals is further outThe tilt a draughtsman would read from the one constant of a ground-line table fitted to the photograph's chords, less the camera's true tilt, against the lens's distortion at the frame's corner. For the 10 m street, whose feet lie 261 px below the centre and tops 15 px below it at 20°, barrel reads the tilt low: at 2% by 0.25°, 1.13° and 1.96° at true tilts of 10°, 20° and 30°; at 5% by 0.64°, 2.93° and 5.34°. Pincushion reads high. A street 30 m high at 10° (dashed) has its tops 476 px above the centre, further out than its feet, and the same barrel reads it high, by 1.44° at 2%. With no distortion every reading is exact.-505-6-4-2024distortion at the frame's corner (%; barrel negative)tilt read minus true tilt (°)10 m, true 10°10 m, true 20°10 m, true 30°30 m, true 10°table fitted to the chords10 m at 20°, 5% barrel: reads 17.07°
Fig. 4 The tilt read from a ground-line table fitted to the photograph’s chords, less the camera’s true tilt, against distortion at the frame’s corner (barrel negative), for the 10 m street at three tilts and for a 30 m street at 10°.

With a lens it is not. For the 10 m street at 20°, 2% barrel reads the tilt as 18.87°, 1.13° low, and 5% barrel reads 17.07°, nearly three degrees low. The steeper the tilt, the more of it the lens takes: at 10° the 2% lens reads 0.25° low, at 30° 1.96° low. Pincushion reads high by much the same amounts. At a given tilt the error is close to a straight line through zero in the distortion: about 0.57° for each per cent of barrel at 20°, so a reader who knew the lens could put the tilt back by a rule of thumb.

The sign is not a property of barrel distortion, and the reason is worth stating because it predicts the 30 m street. A chord’s lean is set by how far its top sits to the side of its foot. Barrel distortion pulls both towards the centre, each by an amount that grows with its distance from the centre. On the 10 m street the feet are 261 px below the centre and the tops only 15 px below it, so the feet move in much further than the tops. That shrinks the sideways gap between them, which shrinks every lean, which is what a smaller tilt looks like. On a street of 30 m buildings at 10° the tops are 476 px above the centre, further out than the feet. Then the tops move in more, the gap grows, and the same 2% barrel reads the tilt 1.44° high. The lens moves the tilt towards whichever end of the verticals lies nearer the centre of the picture.

That gives a draughtsman a rule they can check on the photograph. If a street’s feet are the far end, as they are whenever the camera tilts up at buildings that do not fill the frame, a barrel lens flattens the tilt. If the tops are the far end, as with tall buildings shot from close by, it steepens it.

Fitted to the photograph, the table is the better copy

The rolled-table essay drew its tables from the true feet to the true lengths and scored the tops against the truth. Here there are two truths to score against: the photograph the draughtsman is copying, and the scene the photograph was of. The first is what a copyist is held to. The tables are drawn from the photograph’s own feet, to each chord’s length, and scored at the tops against the photograph first.

Fitted to the photograph, a table of straight leans misses it by its bow and no moreEach table draws the street's verticals from the photograph's own feet to each chord's length, at 20° of tilt. The table built from the camera's true tilt (dashed) misses the photograph's tops by 1.58 px at 2% barrel and 3.98 px at 5%. Fitted to the chords, the same one-constant table misses them by 0.039 and 0.124 px (solid); with a second, cubic constant, by 0.0004 and 0.0029 px (dotted). Along the whole of each line the fitted drawing is never further from the photograph than 0.40 and 1.05 px, while the bow itself (thin) is 0.38 and 0.99 px: what is left is the bend, which no straight line can follow.10⁻⁵10⁻⁴0.0010.010.1110246barrel distortion at the frame's corner (%)worst distance from the photograph (px)true camera's tablefitted, one constantfitted, two constantsthe bow itselftops; tilt 20°5%: 4.0 → 0.12 px; bow 0.99
Fig. 5 Against the photograph, at 20° of tilt: the worst error at the tops for the table built from the camera’s true tilt, the table fitted to the chords, the table fitted with a second, cubic constant, and the bow itself. The vertical axis is logarithmic.

The table built from the camera’s true tilt, the one that was exact for the pinhole, misses the photograph’s tops by 1.58 px at 2% barrel and 3.98 px at 5%. That is the error a draughtsman makes who knows the camera and does not know the lens. It grows in proportion to the distortion, and 2% of barrel costs about as much as 0.4° of roll did. The rolled-table essay found a hand-held camera is rarely closer to level than that, and two per cent is an ordinary figure for an uncorrected wide-angle lens.

Fit the one constant to the photograph’s chords instead, and the tops are within 0.039 px at 2% and 0.124 px at 5%. One number has absorbed nearly all of what the lens did to the leans. A second constant, a term in the cube of the column, absorbs the rest: 0.0004 px at 2% and 0.0029 px at 5%. So the answer to whether one more constant can take a lens back is that one more constant is barely needed, because the first one, refitted, already takes it.

What none of them can take back is the bow. Along the whole of each line the fitted drawing is never further from the photograph than 0.40 px at 2% and 1.05 px at 5%, and the bow is 0.38 and 0.99. The distance from the fitted drawing to the photograph is the bow and almost nothing else. The cubic table’s distance along the line is the bow, to the third decimal place. That is the sense in which a bowed line is a different kind of error. A lean table can match a lens’s chords as closely as anyone likes, by adding constants, and it then misses the photograph by exactly the amount the photograph’s lines are not straight.

A copy of a photograph is a copy of its lens

A table fitted to the photograph is the right tool for a copyist. It is the wrong tool for a draughtsman who wants the street, because the photograph is not a picture of the street through a pinhole, and a faithful copy of it is a faithful copy of the lens.

A table that copies the photograph copies the lens; taking the lens out first leaves nothingThe same drawings, now scored against the picture a pinhole would have made of the street, at 20° of tilt. The feet a draughtsman copies from the photograph are already up to 5.25 px from the pinhole's at 2% barrel and 13.13 px at 5% (thin). Tops drawn from them by the table fitted to the chords are 1.07 and 2.71 px out (solid); by the true camera's table, 2.61 and 6.55 px (dashed), since its correct leans start from moved feet. Moving the photograph's feet and tops back through the lens first, and then drawing the pinhole table, is exact at every distortion: the zero line.051015246barrel distortion at the frame's corner (%)worst distance from the scene's picture (px)the copied feettrue camera's tablefitted to the chordslens taken out firstagainst the pinhole's picture5%: fitted 2.7 px, lens out 0
Fig. 6 The same drawings scored against the pinhole’s picture of the street, at 20° of tilt: how far the copied feet already are from it, and the worst error at the tops for the table fitted to the chords, for the table built from the camera’s true tilt, and for the table drawn after the photograph’s feet and tops have been moved back through the lens.

The feet the draughtsman copies are already wrong before any table is used: up to 5.25 px from the pinhole’s at 2% and 13.1 px at 5%. Tops drawn from those feet by the fitted table are 1.07 and 2.71 px from the pinhole’s tops. Tops drawn by the true camera’s table are further out, 2.61 and 6.55 px, which looks paradoxical and is not. That table has the right leans, but it applies them at the wrong feet, and a right lean at a moved foot carries the move to the top as well. The fitted table’s wrong lean happens to point the line back towards where the pinhole’s top would be, so it partly cancels the moved foot.

Neither is a remedy. The remedy is to take the lens out first. Move the photograph’s feet and tops back through the inverse of the lens, which for a one-term polynomial is a short iteration on each point’s radius. They then lie on the pinhole’s picture, and the pinhole’s table drawn from them is exact at every distortion. In the figure that is the line along zero. The cost is knowing k1k_1.

That is less of an obstacle than it sounds, because the photograph carries its own calibration. The lines that calibrate a lens found that one straight edge 180 px from the centre fixes k1k_1 to 9.0×10−49.0 \times 10^{-4}, and fitting a lens from straightness alone recovered the coefficient from nothing but the knowledge that some edges were straight. A street is made of edges that are straight. Its verticals are not the best ones to use, since they are short and bow by under a pixel, and that is the measurement this essay leaves open at the end.

What drawings made from photographs inherit

The cube essays began with the cube that is a box, where a step the books gave no construction for turned out to be where the drawing’s error lived. The table essays have kept finding the same structure. Each shortcut leaves a drawing whose lines agree with each other and disagree with the camera together, and the disagreement shows only to a test that knows where the camera was.

A drawing traced from a barrel-distorted photograph of a street, with or without a table, has that structure exactly. Its verticals converge, to a fraction of a pixel. They converge on a point too far away, so a reader who recovers the camera from the drawing, as recovering the camera does from its vanishing points, reads a gentler tilt than the camera had. At 2% of barrel and 20° of tilt, a reading 1.13° low is not something a reader of the drawing alone could detect. Every internal test passes.

There is one place it would show. A three-point street also has horizontal edges, its rooflines and window rows, and those run across the whole frame. A long horizontal near the top of a frame should bow far more than a short vertical near the middle, since it is long and far from the centre, and the bow figure found that doubling a line’s length triples its bow. A drawing that copied the photograph’s rooflines faithfully would carry their bow, and a reader holding a straightedge to them would see that the photograph had a lens. A drawing that straightened them, as most draughtsmen would by habit, and kept the photograph’s verticals, has thrown away the only evidence of the lens and kept its effect on the tilt.

A one-term lens, centred, on one street

The lens has one radial term and no tangential one, centred on the frame. Real lenses need a second radial term at wide angles, and a decentred lens adds a small component that is not along the radius. The second term changes the numbers at the corners, where the street’s feet are not; a decentred lens would move the centre column the earlier essays leant everything about, which is the roll’s problem in another form.

Distortion is quoted at the frame’s corner. Published distortion figures are quoted at different places in the frame. On this frame the same lens moves the middle of a short edge by about 1.4 times less than it moves the corner, so a lens quoted elsewhere has to be converted before these figures are read off. They are all for the corner.

The feet lie outside the frame. At 20° of tilt on this sheet the street’s feet are 261 px below the centre, beyond the frame’s bottom edge at 210 px. The earlier essays’ street sat there too. The distortion polynomial is evaluated at the feet without complaint, and at these radii it is still far from where a barrel model folds back on itself, but a photograph would have cropped them, and a copyist would be extrapolating the feet.

The fitted constants are least-squares fits to the chords’ lean tangents. A draughtsman fitting by eye would weight the lines differently. The fit’s job is to show what one constant can absorb, and an eye that weights the outer lines more would absorb slightly more of the lens and slightly less of the middle.

Still open: whether the street can calibrate its own lens

Taking the lens out first made every table exact, and it needs k1k_1. The photograph contains the edges that could supply it: nine verticals and whatever horizontals the street has. But the verticals bow by 0.38 px at 2% barrel, and a calibration has to see that bow through the noise of edges found to a fraction of a pixel at best. Horizontals are long and bow more, but on a three-point street they converge towards two vanishing points, so they are not parallel in the picture and a fit has to know their convergence and their bow at once.

The measurement that settles it fits k1k_1 to the street’s own verticals and rooflines, with each edge located to a stated error, and asks three things: how precisely the verticals alone fix k1k_1, and whether that precision is enough to bring the undistorted table below the bow; how much the rooflines add, given that their vanishing points are unknown and must be fitted too; and whether a lens fitted from the street and then taken out leaves the table better than simply fitting the table’s constant to the chords, as this essay did, which needs no knowledge of the lens at all. If it does not, the copyist’s shortcut is the better method, and the lens is something a draughtsman can absorb and never needs to name.

A street can read its own lens, if its edges are found finely takes that measurement: the verticals alone read the lens well enough to beat the copyist’s table only from edges found to better than about two thirds of a pixel, rooflines carry the advantage to a full pixel, and the misfit has to be measured where the edges were read.

A lens moves a vertical’s ends far more than it bends its middle. The ends move the leans, and a table absorbs that as a different tilt, low when the feet are the far end and high when the tops are. The bend stays, under a pixel on this street, and it is the only error a table of straight leans cannot take back.

What links here

Computed from the collection, not written here: the essays that point at this one.

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 tiltRadial distortionthree-point perspectiveVanishing pointvertical vanishing point