Light and mirrors

The drawing does not run out of lines

Every post supplies a line to every lamp, so a drawing of five posts offers ten lines to two lamps and twenty to four — the unknowns and the constraints grow together and two posts fix any number of lights. What runs out is the partition, whose margin falls from 251 pixels to six as the share of lines assigned correctly falls from all to just over half.

Worth reading first: The lamp, out of the picture · Two lamps and one map.

A reader who has followed the count this far will ask the obvious next question, and it is the right one: how many lamps can a single drawing support?

The natural way to answer it is to count. Each lamp’s image is a point, so it costs two numbers. Each drawn line is one constraint on the point it passes through. Count the two, compare, and the answer falls out.

The count gives an answer that is correct and useless, and the way it is useless is the essay.

The lines do not run out; the partition doesEvery post supplies one line to every lamp, so the drawing never runs short: 2 lamps need 4 numbers and get 10 lines, 3 lamps need 6 numbers and get 15 lines, 4 lamps need 8 numbers and get 20 lines. What gets worse is telling the pencils apart. The bar is the smallest margin by which a line is nearer its own centre than any other, in pixels, and it falls from 252 to 38.6 — with the share of lines assigned to the right lamp beside it.how clearly each line belongs to one pencil2 lamps, 5 posts251.5 px100% assigned right3 lamps, 5 posts12.1 px73% assigned right4 lamps, 5 posts38.6 px40% assigned right0.5 px of clicking, lamps spread over 2 mthe counting of unknowns cannot see this
Fig. 1 How clearly each line belongs to one pencil, as lamps are added to a drawing of five posts, with the share assigned correctly beside it.

The arithmetic, which does not bind

Here is the count. With mm lamps and nn posts, every post casts one shadow per lamp, so the drawing contains m×nm \times n lines. Each lamp’s image is two unknowns, so there are 2m2m of them. Each line constrains the lamp it belongs to by one.

The lines available to each lamp are nn, and its unknowns are two, so the condition is n2n \geq 2: two posts determine any number of lamps.

Adding lamps does not spend the posts. It is not like adding unknowns to a fixed observation — each new lamp arrives with its own nn new lines, because it casts its own shadow of every post that is already there. Five posts give two lamps ten lines for four unknowns, three lamps fifteen for six, four lamps twenty for eight; the ratio is constant at n/2n/2 and there is no count at which the drawing runs short.

So the arithmetic says the answer is any number, and it is right.

The drawing, and the 2 centres it is being cut into5 posts, 10 drawn lines — one from each post's top through the tip of each shadow — and the 2 points they are being asked to pass through. Each line is drawn in the colour of the pencil it was assigned to. With the lamps 2.40 m apart and 1 pixel of clicking, this partition leaves 2.12 pixels against an expected 5.50.horizoncorrect from 19 cm, at 160 mm wide2 centres · 2.12 px
Fig. 2 Two lamps and five posts: ten lines for four unknowns, and every line belonging to one of two clearly separated pencils.

What actually fails

Run it and the answers get worse with every lamp added, on a drawing whose arithmetic never tightens.

Measure the margin: for each line, how much nearer it passes to its own pencil’s centre than to the nearest other one. At two lamps that margin is 251 pixels — the two pencils are in completely different parts of the picture and nothing is in doubt. At three lamps it is 12 pixels. At four it is 5.8, which is inside a careless reader’s clicking.

And the assignment goes with it. At two lamps every line is attached to the lamp that cast it. At three, 73 per cent are. At four, 55 per cent — barely better than a coin, on a drawing whose constraint count is two and a half times its unknown count.

The unknown that was not counted

The count above has a variable missing from it, and the missing variable is not continuous.

Along with the 2m2m numbers there is an assignment: which of the mnmn lines belongs to which pencil. That is a discrete object with mmnm^{mn} possibilities before any structure is imposed, and it is not a parameter in the sense the counting argument uses — it cannot be traded against a constraint, it has no derivative, and it does not appear in any Jacobian.

It is also the only thing that fails. The continuous solve is exactly determined and well behaved throughout: given the right labels, four centres come back from twenty lines without difficulty at any count tried. What degrades is the ability to find the labels, and the counting of unknowns is structurally blind to it.

This is not a new species of problem for this collection, and it is worth naming the earlier instance. A wrong match is not a small error makes the same point in the two-view field: a stereo correspondence that is wrong by one feature produces a reconstruction that is wrong by metres, and no amount of care in the continuous fit repairs it, because the damage was done in a discrete choice made before the fit began.

Continuous conditioning and discrete correctness are different quantities and the first does not report the second.

The discrete object’s size can be counted properly, and counting it explains why more posts make things worse rather than better. Each post casts exactly one shadow per lamp, so its mm lines must go one to each pencil — a permutation — and a global relabelling of the lamps changes nothing. So the number of distinct assignments is

(m!)n1,(m!)^{\,n-1},

which for two lamps and three posts is four, for four lamps and five posts is 331,776, and for four lamps and ten posts is over 2×10122\times10^{12}. The continuous problem improves linearly with the number of posts and the discrete one degrades exponentially, which is the essay’s observation with a factorial attached.

What rescues it in practice is that a wrong assignment is easy to reject rather than hard to avoid. A pencil containing lines from two different lamps misses its own centre by a fraction of the lamps’ image separation — about Sn1n2/(n1+n2)S\sqrt{n_1n_2}/(n_1+n_2) — so any wrong grouping fails loudly as soon as that separation exceeds the marking noise. The exponential space is therefore searched greedily: group two lines, test a third, and either extend the pencil or start another, which is linear in the lines rather than exponential in the posts.

Which sharpens the moral rather than softening it. The count of unknowns against constraints is not merely blind to the assignment; it is blind to the quantity that actually decides whether the assignment can be found, and that quantity is the lamps’ separation in the picture. A drawing with many posts and two lamps close together is the hard case, and the arithmetic that says it is over-determined is counting the wrong thing.

One correspondence moved 30 px, and where the damage wentThe clean fit is exact to 2.3e-13 px. Moving correspondence 9 by 30 px leaves every other point wrong too — the typical one by 0.54 px and the worst by 1.7 px — because a least-squares fit has nowhere to put a bad row except across all of them. Here the largest residual does fall on the culprit; it is not obliged to.00.50011.50010203040correspondenceepipolar error at every OTHER point, after one match is movedmedian 0.54 pxthe moved oneevery point wrong: median 0.54 px, worst 1.7 pxclean fit 2.3e-13 px
Fig. 3 The two-view field’s version of the same failure: one wrong correspondence, and a reconstruction that no fit repairs.

Two posts and two lamps: exactly determined and untestable

The other end of the count is worth walking into deliberately, because it is where the arithmetic is most obviously satisfied and the answer is least worth having.

Two posts and two lamps: four lines, four unknowns, exactly determined. Run it and the two centres come back exactly, with every line correctly assigned.

And there is no residual. Two lines through a point meet at that point whatever the lines are, so a pencil of two has nothing left over and nothing to disagree about — the fit reports zero and would report zero for any four lines, including four drawn at random.

That is the field’s founding warning in a new place. The lamp, out of the picture records it for a single lamp — two posts give a residual of zero and an answer that is a whole one-parameter family, which the essay calls the sharpest counter-example the site has to the idea that a small residual means a right answer. Here the answer is not a family; it is a point, and it is still untestable.

So the honest requirement is not n2n \geq 2 but n3n \geq 3: two posts to determine each lamp, and a third to be able to find out whether the determination is any good.

The natural remedy for a failing partition is more drawing, and it does less than it appears to.

Adding posts does improve the continuous fit: each pencil’s centre is averaged over more lines and its uncertainty falls as the root of the count. It does not improve the margin between pencils, because that margin is set by how far apart the lamps’ images are and by how well each line’s direction is known — neither of which changes when a post is added somewhere else.

Measured through the count criterion, the effect is nil: the separation at which two lamps part is 6.5 centimetres with three posts, 7.2 with five and 7.9 with nine. Three times the drawing, no resolution.

What would help is posts in places that put lines at new angles, since a pencil is badly determined along the common direction of its lines and well determined across it. That is an argument for a scattered arrangement rather than for a numerous one, and it is the same argument the degenerate row of posts makes at its extreme.

Which direction, and how much drawing, the limit depends onThe separation at which two lamps are counted as two, at 1 pixel of clicking, for three directions of separation and two amounts of drawing. Apart across the view they part at 7.2 centimetres; apart in height at 13.3; apart in depth at 32.0, because a separation along the line of sight is projected almost entirely away. Tripling the number of posts changes it by less than a tenth — the criterion compares a residual against an expectation computed from the same lines, so the count of lines cancels out of both.the separation at which two lamps partapart across the view7.2 cmapart in height13.3 cmapart in depth32.0 cmacross, with 3 posts6.4 cmacross, with 9 posts7.9 cm1 px of clicking, 12 drawings at each stepdirection matters; the amount of drawing does not
Fig. 4 The measurement that refuses the obvious remedy: three posts and nine give the same limit.

The two ways a count goes wrong, and their signatures

A reader running this on a real photograph will sometimes get the count wrong, and the two directions of error look completely different — which is useful, because it means the error is diagnosable rather than merely possible.

Over-counting splits one pencil. Ask for three centres where there are two, and the fit puts two of them a few pixels apart inside one real pencil, dividing its lines between them almost arbitrarily. The signature is unmistakable once looked for: two recovered centres closer together than the uncertainty of either, with the lines that share them interleaved rather than grouped. A reader seeing that should reduce the count by one and stop.

Under-counting produces a centre that is nowhere. Ask for one where there are two and the fit returns a compromise point between the two real images that belongs to neither, with every line missing it by a similar large amount. The signature there is the residual — 138 pixels on the drawing the previous rung measures, against an expectation of three — and the fact that the misses are systematic rather than scattered: half the lines pass one side of the compromise point and half the other, in two groups.

The second is easy to catch and the first is easy to miss, which is the wrong way round for a criterion that already has a bias toward more centres. It is another reason the count is taken as the smallest that fits rather than the best-scoring one.

The drawing, and the 3 centres it is being cut into5 posts, 10 drawn lines — one from each post's top through the tip of each shadow — and the 3 points they are being asked to pass through. Each line is drawn in the colour of the pencil it was assigned to. With the lamps 2.40 m apart and 1 pixel of clicking, this partition leaves 2.03 pixels against an expected 7.12.horizoncorrect from 19 cm, at 160 mm wide3 centres · 2.03 px
Fig. 5 Over-counting drawn: three centres asked of a two-lamp drawing, with two of them inside one pencil.

What a real drawing supports

Putting the three measurements together gives the practical answer, which is smaller than the arithmetic’s.

Two lamps: comfortably. Margin 251 pixels, every line assigned correctly, a count that survives a pixel of clicking with two orders of magnitude to spare.

Three: with care. Margin 12 pixels, three-quarters of the lines assigned correctly. The centres are still found — a misassigned line moves a centre by a few pixels rather than destroying it — but the count itself is now within reach of a careless reader.

Four: not from one drawing of five posts. Margin 5.8 pixels, assignment barely better than chance. A reader would need more posts and the lamps to be further apart, and the second of those is not usually available.

That ceiling is a fact about the arrangement rather than about the method, and it moves in the expected direction: lamps spread across a larger room, or posts at more bearings, push it up. What does not move it is anything the counting argument at the top of this essay measures.

The drawing, and the 2 centres it is being cut into5 posts, 10 drawn lines — one from each post's top through the tip of each shadow — and the 2 points they are being asked to pass through. Each line is drawn in the colour of the pencil it was assigned to. With the lamps 4.00 m apart and 1 pixel of clicking, this partition leaves 2.05 pixels against an expected 5.51.horizoncorrect from 19 cm, at 160 mm wide2 centres · 2.05 px
Fig. 6 The comfortable case, at four metres of separation, where a line’s membership is not in question anywhere in the drawing.

None of this is about the room

One clarification, because the arithmetic at the top of this essay looks as though it should be about lamps in a room and is not.

Every quantity here is in the picture. A lamp’s image is a point of the drawing; a pencil is a set of drawn lines; the margin is measured in pixels. Nothing needs the camera to be calibrated, the floor to be flat, or the room to be measured — which is what makes the count usable on a photograph whose provenance is unknown, and is the same freedom the floor’s absence from the ray family buys.

The room re-enters at exactly one point, and it re-enters for the position rather than for the count: turning a lamp’s image into a place needs the horizon, the ground plane and a known height, which is the second half of the original recovery. So a reader can be certain about how many lights there were and uncertain about where any of them was, and the two claims rest on completely different evidence.

That separation is worth keeping in mind when reading the numbers above. Twenty lines for eight unknowns is a statement about a drawing. Whether those eight numbers can be turned into four places in a room is a separate question with its own failure modes, most of which a floor that is not flat supplies.

What the angle between the two rays is worthThe recovery is exact at every one of these — 3e-14 m — and that is not the question. What changes is the price of a pixel: 5.9 mm of depth per pixel with the lamp 39° off the camera's ray, and 1 mm at 15.4°. A lamp beside the lens gives a shadow under the object and a measurement worth nothing.02.5057.5020253035angle between the camera's ray and the lamp's (°)millimetres of depth per pixel of error in the shadowexact at every anglethe cost of one pixel is what moves
Fig. 7 The step where the room enters, and where its conditioning is a separate question from the count’s.

Why the count is worth doing anyway

None of this makes the degrees-of-freedom count useless. It makes it a necessary condition, and this collection has a habit of saying what that means.

A count that comes out short is decisive: if a drawing has fewer constraints than unknowns, no method recovers the answer, and no cleverness in the fitting substitutes. That is the case three parallel views do not fix a solid is about, and it is worth having.

A count that comes out long is evidence of nothing, and treating it as evidence is the error. Necessary is not sufficient is the collection’s own phrase for the trap, coined for a cross-ratio test that gave a wrong method a perfect score, and it has now been met — by this file’s own record — four times: a conformality test evaluated where it could not fail, a sensitivity computed in a variable nobody perturbed, a residual maximised over two families, and now a parameter count blind to a discrete variable.

Where the ceiling comes from, in one sentence

The measurements above can be compressed into one statement, and it is worth having because it predicts rather than describes.

Two pencils are distinguishable when their centres are further apart than the uncertainty of either. With mm lamps spread over a room of a given size, the typical gap between neighbouring images falls roughly as 1/m1/m — the same total spread divided among more of them — while the uncertainty of each centre stays where the clicking put it. So the margin falls like 1/m1/m and the count at which it reaches the noise is set by the ratio of the spread to the clicking.

Measured, the margin goes 251, 12, 5.8 as the count goes 2, 3, 4 — falling much faster than 1/m1/m, because crowding the lamps also shortens the lever each pencil has and worsens each centre at the same time as it brings them together. The two effects compound, which is why the useful ceiling is three rather than the eight or ten a linear reading would suggest.

That compounding is the general reason a partition fails faster than a fit does, and it is the sentence to carry out of this rung: adding a component to a mixture damages both halves of the comparison the criterion makes.

What the count would need to be a real instrument

The ceiling of three lamps is a fact about this arrangement and this criterion. Two changes would move it, and both are worth naming because they say what a better method would look like rather than merely that one might exist.

A likelihood rather than a residual. The criterion here compares one number against another and throws away the extra lines’ information; a likelihood ratio between an mm-centre and an (m+1)(m+1)-centre model would use them, and would buy the root of the count that the extra posts do not currently deliver. The price is a noise model rather than a noise level — a claim about the distribution of a reader’s clicking rather than about its size.

A prior on where lamps are. Lamps in real rooms are on ceilings, in fittings, at similar heights, and in a small number of typical places. Every one of those is information the drawn lines do not contain and a reader has for free, and it is exactly what would rescue a partition whose margin is six pixels.

Neither is done here, and the reason is the field’s standing rule: the construction is kept to what a photograph contains, so that its answers do not depend on assumptions a reader cannot check. A method that used a prior would count more lamps and would be reporting a mixture of the drawing and the assumption — which is a fine thing to build and a different thing to publish.

The short version

Every post supplies a line to every lamp, so a drawing never runs out of constraints and two posts determine any number of lights.

What runs out is the assignment. The margin by which a line belongs to its own pencil falls from 251 pixels at two lamps to six at four, and the share of lines assigned correctly falls from all of them to just over half — on a drawing whose constraint count never stops exceeding its unknown count.

Three posts, not two, because two meet by construction and prove nothing. Two lamps comfortably, three with care, four not at all. And more posts buy a better fit and not a better count.

The lines do not run out; the partition doesEvery post supplies one line to every lamp, so the drawing never runs short: 2 lamps need 4 numbers and get 10 lines, 3 lamps need 6 numbers and get 15 lines, 4 lamps need 8 numbers and get 20 lines. What gets worse is telling the pencils apart. The bar is the smallest margin by which a line is nearer its own centre than any other, in pixels, and it falls from 250 to 43.5 — with the share of lines assigned to the right lamp beside it.how clearly each line belongs to one pencil2 lamps, 5 posts249.9 px100% assigned right3 lamps, 5 posts13.0 px73% assigned right4 lamps, 5 posts43.5 px40% assigned right1 px of clicking, lamps spread over 2 mthe counting of unknowns cannot see this
Fig. 8 The failure once more, at a pixel of clicking rather than half of one.

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.

ConditioningCorrespondencedegrees of freedomIdentifiabilityleast-squares intersectionLight recoveryOverfittingPencilPoint lightResidual