Measuring from one picture

A facade's corners see the horizon its widths could not

Read by its level widths, a six-metre facade saw a misplaced horizon only when it was 11.5 pixels out. Read by its two corners — the same wall's plumb edges — it sees 4.2, as well as the ground does, and four posts beside it bring that to 2.4. The corners' vanishing point is nearly six thousand pixels below the picture, but what the lines measure is its reciprocal, and in pixels of horizon their precision does not change from a camera pitched two degrees down to one pitched eight.

Worth reading first: The one thing a single view cannot give · What one picture of a plane determines.

A plumb wall tells a slope from a horizon, faintly looked for a second witness to the camera’s orientation. A picture whose ground fails its depth test might have a sloping street or a misplaced horizon, and the ground alone cannot say which. A wall standing plumb can, because a slope of the street changes nothing about the wall while a misplaced horizon leans it. The trouble was size. A horizon five pixels out moved the ground’s test by 2.1 per cent and the wall’s by 0.2, and even a facade six metres wide saw the horizon only when it was 11.5 pixels out, where the ground saw 4.7.

The essay ended on a witness it had not tried. The wall’s test read the facade’s level edges and assumed its verticals. The verticals can be read too. Every plumb edge in the picture — a wall’s corners, a door’s jambs, a lamp post — runs towards one vanishing point below the picture, and where that point lies is fixed by the horizon and the focal length. Two readings of one camera orientation, which a picture with plumb lines in it can compare. The essay’s own arithmetic made the prospect look doubtful: for a camera pitched seven degrees down the vanishing point is about six thousand pixels below, and a vertical 240 pixels long must be extended twenty-five times its length to reach it.

The arithmetic was measuring the wrong quantity.

The horizon the verticals imply

For a camera with no roll, the horizon and the vertical vanishing point stand on the principal column either side of the centre of the picture, and their distances from it multiply to the focal length squared: (vh−cy)(vv−cy)=−f2(v_h - c_y)(v_v - c_y) = -f^2. A reader who has the focal length and the plumb lines has a horizon, read off the lines’ convergence, without looking at the ground at all.

The picture is the standing camera of the earlier essays — 1.62 metres up, 700 pixels of focal length, pitched 6.78 degrees down at marked ground — with the six-metre facade 8.5 metres away and, for some readings, posts two and a half metres tall standing across the frame 7.5 metres away. Each vertical is read as a line: sampled every eight pixels along its image and each sample read across the line to 0.4 pixels, since a vertical edge has no feature along its own length. The lines are fitted, their common point found by least squares, and the horizon it implies compared with the horizon the reader assumed. The test is a number of pixels of horizon, directly.

Eight plumb lines lean in proportion to their column; read to 0.4 px they put the horizon 1.06 px from the true one, and a horizon read 5 px out predicts leans they refuseThe standing camera of the earlier essays, 1.62 m up and pitched 6.78° down, 700 px of focal length, looking at the facade's two corners 8.5 m away and six posts 2.5 m tall spread across the frame 7.5 m away. Every plumb line leans away from the picture's centre column by an angle that grows with its distance from it, because they all meet at the vertical vanishing point 5888 px below the principal point. The dots are the leans read from one picture, each line fitted to samples every 8 px read across it to 0.4 px: −1.696, 3.011, −3.087, −1.895, −0.640, 0.579, 1.963, 3.069°. The solid line is the lean each would have for the true horizon; the dashed, for a horizon read 5 px out, which moves the vanishing point to 6264 px below. Since the horizon and the vertical vanishing point stand either side of the centre at distances whose product is the focal length squared, the leans imply a horizon: here 132.84 px against 131.78. The slider moves the horizon read.-4-20240200400600the vertical's column in the picture (px)its lean from the picture's upright (degrees)horizon read 5 px outthe true horizontwo corners and six posts, read to 0.4 pximplied horizon +1.06 px
Fig. 1 Eight plumb lines — the facade’s corners and six posts — each lean from the picture’s upright in proportion to its column. Dots: one picture’s readings at 0.4 px. Solid: the leans the true horizon predicts; dashed: a horizon read 5 px out. This picture’s lines imply a horizon 1.06 px from the true one. The slider moves the horizon read.

Plumb lines lean away from the picture’s centre column, more the further out they stand, and every one of them points at the same place far below. The dots are the leans one picture delivers: from −3.1 to +3.1 degrees across the frame. The solid curve is what the true horizon predicts for each line, and the dots sit on it. A horizon read five pixels out predicts a vanishing point 376 pixels further down, and so leans that are all a little smaller — the dashed curve, which the dots do not follow. The picture’s lines put their own horizon 1.06 pixels from the true one; a reader who had read the horizon five pixels out would find the lines disagreeing with it by 3.9.

Two corners do what the whole facade’s widths could not

The question the earlier essay put was how far the horizon must be out before the verticals see it at three times their own scatter.

The facade's two corners see a horizon 4.2 px out, where its level widths see 11.5 and the ground 4.6; four posts more bring it to 2.4The smallest horizon error each witness sees at three times its own scatter, marks read to 0.4 px, the standing camera pitched 6.8° down. Plumb lines, each fitted to samples every 8 px read across it and the horizon read off their vanishing point: the facade's two corners 4.22 px; the corners and four posts 2.38 px; eight posts across the frame 2.45 px; sixteen posts across the frame 1.88 px; eight posts a metre tall 10.78 px; eight posts within 1.5 m 11.40 px. For comparison, the ground's depth test 4.63 px and the width test on the same 6 m facade 11.50 px. The corners are the facade's own verticals: the same wall read by its sides instead of its sills sees the horizon 2.7 times better. Length matters and so does spread: eight posts a metre tall, or eight crowded into a metre and a half, see no better than the wall's widths.the facade's two corners4.2 pxthe corners and four posts2.4 pxeight posts across the frame2.4 pxsixteen posts across the frame1.9 pxeight posts a metre tall10.8 pxeight posts within 1.5 m11.4 pxthe ground's depth test4.6 pxthe 6 m wall's widths11.5 pxshorter is better: the horizon error seen at 3× scatterdark: plumb lines
Fig. 2 The horizon error each witness sees at 3× its scatter, marks at 0.4 px. The facade’s two corners: 4.2 px. With four posts: 2.4. Eight posts across the frame: 2.4; sixteen: 1.9. Eight posts a metre tall: 10.8. Eight within 1.5 m: 11.4. For comparison, the ground’s depth test 4.6 px and the facade’s widths 11.5.

The facade’s two corners alone see a horizon 4.2 pixels out. The same facade read by its level widths saw 11.5. Nothing about the wall has changed but which of its edges is read, and reading its sides rather than its sills makes it 2.7 times the better witness — as good as the ground’s own depth test, which sees 4.6.

Adding verticals helps in the obvious way. The corners and four posts see 2.4 pixels; eight posts across the frame without the corners, 2.4; sixteen, 1.9. The gain falls off roughly as the square root of the count, since each line is an independent reading of the same convergence.

What a vertical is worth depends on two things, and the last two bars isolate them. Eight posts a metre tall — bollards rather than lamp posts — see only 10.8 pixels, because a line’s direction is known to the reading error over its length, and a line two-fifths as long, carrying two-fifths as many samples, is known more than four times worse. Eight full-height posts crowded within a metre and a half of one another see 11.4, because their leans differ only by how far apart they stand, and lines that nearly coincide say little about where they meet. The best witnesses are long and far apart: a facade’s two corners, six metres apart, are exactly that, and a row of lamp posts along a street across the frame is better still.

Why the far vanishing point did not matter

The worry in the earlier essay was that the vanishing point is very far away and a short line places it badly. Both halves are true. What they miss is that the horizon does not depend on the vanishing point’s distance but on its reciprocal.

The corners' vanishing point runs from 20,045 px below the centre to 3,293, and the horizon they see stays near 4.2 px until the frame cuts them shortThe facade's two corners read at camera pitches of 2, 3, 4, 5, 6, 7, 8, 9, 10, 12° (the standing camera, re-aimed), each corner seen as far up as the frame shows it: 239 px, 239 px, 239 px, 240 px, 241 px, 241 px, 242 px, 235 px, 223 px, 199 px of line. The vertical vanishing point stands 20045, 13357, 10010, 8001, 6660, 5701, 4981, 4420, 3970, 3293 px below the principal point. The smallest horizon error the corners see at three times their scatter: 4.18, 4.19, 4.19, 4.20, 4.21, 4.22, 4.23, 4.31, 4.83, 5.58 px; the ground's depth test: 4.50, 4.52, 4.55, 4.57, 4.60, 4.63, 4.67, 4.70, 4.74, 4.81 px. A far vanishing point is placed badly along the lines, but what the lines measure is its reciprocal — their lean per column — and the horizon's distance above the centre is that reciprocal times the focal length squared, so the horizon's precision does not care how far away the point is. It rises only once the frame begins to cut the corners short.0246234567891012how far the camera is pitched down, degreeshorizon error seen at 3× scatter (px)the facade's cornersthe ground's depth testmarks read to 0.4 pxa reciprocal, not a distance
Fig. 3 The facade’s corners at camera pitches from 2° to 12°: their vanishing point runs from 20,045 px below the centre to 3,293, and the horizon error they see at 3× scatter stays between 4.18 and 4.31 px up to 9°, rising to 5.58 at 12° as the frame cuts the corners short. The ground’s depth test, dashed, runs from 4.50 to 4.81.

Tip the camera from twelve degrees down to two and the corners’ vanishing point moves from 3,300 pixels below the centre of the picture to 20,000. A point twenty thousand pixels away, fixed by two lines 240 pixels long, is placed along the lines to within thousands of pixels. And the horizon the corners imply is known to the same precision at every pitch: 4.18 pixels at three times its scatter at two degrees, 4.22 at 6.8, 4.23 at eight.

The reason is in the product. The horizon’s distance above the centre is the focal length squared divided by the vanishing point’s distance below it — the focal length squared times the reciprocal of that distance. And the reciprocal is what the lines measure directly: a plumb line one column-width away from the centre leans by one over the vanishing point’s distance, so the lines’ lean per column is that reciprocal, read off a slope that the lines’ own length and spread fix. A vanishing point twice as far away is placed four times worse along the lines, and its reciprocal, which is all the horizon uses, is placed exactly as well. The earlier essay’s estimate — a horizon five pixels out moving the vanishing point by three hundred — was right, and it was the reason a far point looked hopeless; it is equally the reason the reading of the horizon is not.

The only thing that changes with pitch is how much of each corner the frame shows. A camera pitched more steeply cuts the facade’s tops off, and at twelve degrees the corners are 199 pixels long instead of 241; their threshold rises with it, to 5.6 pixels. The ground’s test changes even less, from 4.5 to 4.8 across the same range. So the two witnesses are equals at every pitch a standing photographer uses.

A far point is a near reciprocal

The same shape of mistake has been met before, in another guise. Depth is a reciprocal found a stereo pair’s disparity measuring one over the distance, so that a point twice as far is known four times worse in depth and exactly as well in disparity; the error that looks catastrophic in metres is a constant in the quantity the instrument actually reads. A vanishing point is a point at a distance too — a distance on the picture plane rather than in the scene — and plumb lines read it the same way a pair reads depth: through an angle, which is a reciprocal.

The practical rule that follows is to ask, of any quantity a construction needs, whether it needs the far point itself or only its reciprocal. A drawing that must place the far point on the page to run lines to it — a perspective construction with a vanishing point off the board — needs the point, and suffers from its distance. A reading that uses the point only through a product or a ratio, as the horizon does here, needs the reciprocal and does not suffer at all. The worry the earlier essay voiced about six thousand pixels was the first kind of worry applied to the second kind of use.

Telling a slope from a horizon

The earlier essay’s practical question was whether a second witness can say, of a picture whose ground fails its depth test, whether the street slopes or the horizon is out. It found that the facade’s widths could at about one degree of slope and a window’s could not within the slopes a street has.

Matched on the ground, a slope and a horizon are told apart 99 times in a hundred at half a degree by the facade's corners alone, and 100 with four posts beside themFor each slope, the horizon error that fails the ground's depth test by as much — 0.25° and 3.1 px, 0.5° and 6.1 px, 1° and 11.9 px, 2° and 22.7 px, 4° and 41.9 px — pictures of each, marks read to 0.4 px, 100 of each kind a point, called a horizon when the plumb lines' implied horizon disagrees with the one read by more than half the matched error. A sloping ground leaves plumb lines plumb, so the slope's pictures are read by their noise alone. The facade's corners: 72%, 99%, 100%, 100%, 100%. The corners and four posts: 96%, 100%, 100%, 100%, 100%. The 6 m wall's widths, in the earlier essay, reached 65% at a quarter of a degree and 95% at one.0.250.51240.4000.6000.8001the slope, and the horizon error that fails the ground's test as much (degrees, log scale)share of pictures the plumb lines call rightchancethe facade's two cornersthe corners and four posts100 pictures of each kind a pointplumb lines ignore the street
Fig. 4 Slopes and the horizon errors that fail the ground’s test as much (0.25° and 3.1 px to 4° and 41.9 px), 100 pictures of each at 0.4 px, called a horizon when the plumb lines disagree with the horizon read by more than half the matched error. The facade’s corners: 72% at 0.25°, 99% at 0.5°, 100% from 1°. With four posts: 96%, then 100%.

For each slope the figure takes the horizon error that fails the ground’s test by exactly as much, so that the ground alone has nothing to go on — a quarter of a degree matched by 3.1 pixels, half a degree by 6.1, one degree by 11.9. A sloping street leaves plumb lines plumb, so a picture of a slope reads the verticals’ noise alone; a picture of a misplaced horizon reads that horizon’s error in full. The rule is the one the earlier essay used: call it a horizon when the verticals disagree with the horizon read by more than half of what the matched horizon would give.

The facade’s corners get the answer right 72 times in a hundred at a quarter of a degree, 99 at half a degree and every time from one degree up. With four posts beside them, 96 times at a quarter of a degree. The facade’s widths, on the same pictures, reached 65 per cent at a quarter of a degree and 95 at one. The band the earlier essay found — slopes from a third of a degree to one, which the ground’s test could see and nothing could attribute — is closed by the verticals: from half a degree a single picture with a facade’s corners in it says which of the two it is.

What the verticals cannot separate

A plumb line reads the camera’s orientation, and the camera’s orientation is read through two assumptions, the horizon and the focal length. The ground’s test responds to the horizon and, as the triad in the earlier essay found, not to the focal length. The verticals respond to both.

A focal length 10% long moves the plumb lines' test by −17.5 px and leaves the ground's alone; a horizon 15 px out moves both — two tests, two lines through the originEach wrong assumption placed by what the plumb lines (the corners and four posts) and the ground's depth test read. A focal length read −10%, −5%, −2%, +2%, +5%, +10% off (solid): the plumb lines' implied horizon moves by 15.8, 8.1, 3.3, −3.4, −8.5, −17.5 px, since the two distances from the centre multiply to the focal length squared and a wrong focal length is a wrong product, and the ground's test does not move (9e-16). A horizon −15, −10, −5, 5, 10, 15 px out (dashed): the plumb lines by 15.0, 10.0, 5.0, −5.0, −10.0, −15.0 px, the ground by 6.10, 4.10, 2.07, −2.11, −4.25, −6.43%. The box is three times each test's scatter at 0.4 px: 2.38 px and 1.95%. With a sloping ground, which moves only the ground's test, the three mistakes lie on three lines.-505-10010the plumb lines' test: implied horizon less the one read (px)the ground's depth test (%)a focal length offa horizon outthe corners and four posts; the ground's depth pairbox: 3× scatter at 0.4 px
Fig. 5 Each wrong assumption placed by the plumb lines’ test (px) and the ground’s depth test (%). A focal length 10% short or long: the plumb lines by 15.8 or −17.5 px, the ground by nothing. A horizon 15 px out either way: the plumb lines by 15 px, the ground by 6.1 and 6.4%. The box is 3× each test’s scatter at 0.4 px.

A focal length ten per cent long moves the horizon the verticals imply by 17.5 pixels, because the implied horizon’s distance from the centre is the focal length squared over the vanishing point’s distance, and a focal length ten per cent long is a square twenty-one per cent larger. The ground’s depth test does not move at all. A horizon fifteen pixels out moves both: the verticals by fifteen pixels and the ground by six per cent.

So the two tests together place each mistake on its own line through the origin. A focal length off moves the verticals and leaves the ground; a horizon out moves both, in a fixed proportion; and a slope, which the verticals ignore, moves the ground alone. Three mistakes, three directions, and the pair of tests reads them apart with a sensitivity set by the better of the two witnesses rather than, as with the wall’s widths, by the worse. What the verticals cannot do on their own is say which of the camera’s two assumptions is wrong, since both move the implied horizon, and focusing is a zoom is the reminder that the focal length is the one more likely to be.

Why the widths were the wrong edges

The earlier essay explained why the wall’s widths were a weak witness: a horizon out leans a plumb wall by a fraction of a degree about a level line, and two level edges a couple of metres apart in height differ in reconstructed width by the lean times their height difference over their distance, a fraction of a per cent. That explanation was right, and it says what to read instead. The lean is the signal. The widths turn it into a second-order quantity, a difference of two lengths each measured to the reading error; the wall’s own sides are the lean, read directly as an angle in the picture.

Where each closure enters the stratification placed the camera closure as buying every plane’s affine and metric levels from a known camera, and the earlier essay added that every other plane in the picture is then a check on the camera’s numbers. The verticals are that check at its sharpest, because they are not a plane at all. They are a direction — the one direction every plumb object in the picture shares — and a direction’s vanishing point is the closure’s own quantity. The one thing a single view cannot give is a distance; the vertical vanishing point is not one, and the picture gives it freely.

What a reader should do with it

The procedure the earlier essays built gains a better second step. When the ground’s depth test fails, read the plumb lines rather than a facade’s widths: the corners of any building that faces the camera, door jambs, lamp posts, sign poles. Read each along its whole visible length, prefer lines that stand far apart across the frame, and read the horizon their convergence implies with the same focal length the closure used. If it agrees with the horizon read to within a few pixels, the ground slopes. If it disagrees in proportion to the ground’s failure, the horizon is out. If it disagrees and the ground passes, the focal length is wrong.

The facade’s widths still have a use, which the earlier essay found: they ignore the ground and they ignore everything about the lens except through the orientation. But as a witness of the horizon they are a weak reading of the same lean the corners carry, and which reference to measure from is again the lesson — the precision is in the choice of what to read.

What was assumed

The plumb lines are plumb. A building’s corners are vertical to a small fraction of a degree; a lamp post often leans by more, and a sign pole or a tree by much more. A vertical that leans by a quarter of a degree towards or away from the camera shifts its own contribution to the vanishing point by the same order as a horizon several pixels out, and many leaning posts add scatter rather than bias. How much a street’s worth of real posts costs was not measured here; the corners of buildings are the safer witnesses.

The camera has no roll. A rolled camera moves the vertical vanishing point off the principal column, and the product rule holds along the line through the centre perpendicular to the horizon rather than down the column. The reading generalises by fitting the roll from the verticals’ vanishing point’s sideways position, which the lines supply; it was not measured here.

The principal point is the centre of the picture. The product rule is written about the principal point. A lens shifted to keep verticals parallel — the principal point is not the centre — has moved it by design, and a cropped picture has moved it by accident. Both change the implied horizon by the shift, a first-order error in exactly the quantity being read.

The lines are straight. Radial distortion bends a vertical near the edge of the frame, and a bent line fitted as straight has a lean that depends on how much of it is visible. The corners here are well inside the frame; posts at its edge, where they help most, are also where a lens bends most.

Still open: what a street’s leaning posts cost

The picture here has plumb lines that are exactly plumb. The verticals most photographs have in quantity — lamp posts, signs, bollards, tree trunks — are not, and the ones that are, the corners of buildings, are usually few.

The measurement that settles what that trade is worth gives each post a random lean of a stated size, from a twentieth of a degree for a well-set steel column to half a degree for a timber pole, and asks how many leaning posts are worth one exactly plumb corner — whether sixteen posts leaning a tenth of a degree still see a horizon better than the facade’s two corners, or whether leans of that size put a floor under the reading that no number of posts goes below. A lean is random from post to post, so it should average down like the reading error does; but it does not shrink with the post’s length as the reading error does, and a tall post that leans is worth no more than a short 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.

Affine structureHorizonModel errorProjective stratificationsingle-view metrologyVanishing lineVanishing point