Light and mirrors

A shadow edge read as a profile

A lamp, a stick and a camera recover a stepped object's profile to 4.9e-15 m rms when the marks are exact, and to 10.4 mm once they are read to two tenths of a pixel — the same linear law a fitted exponent of 1.001 confirms. What actually sets that number is the angle between the sweeping light plane and the camera's own ray — the amplification is least, 17.0 times a pixel, broadside at 6°, and grows without bound toward -36.1°, where the plane contains the camera's own eye and the recovery keeps none of its marks at all.

Worth reading first: A shadow across an edge · The lamp is the second eye.

A shadow across an edge read a shadow’s own kink as a fact about the receiver it fell across — a crease in a floor bent an otherwise straight shadow, and the bend measured the crease. The lamp is the second eye went further and used a shadow’s edge directly as a depth instrument, standing in for a second camera. This essay puts the identical idea to work with the shadow doing something neither of those did: sweeping continuously across an object’s own surface, one straight edge at a time, so that a single lamp, a single stick and a single camera together measure a whole profile rather than one point or one crease.

The method is a repeated application of one fact. A point lamp and a straight stick between them fix a plane — every point on the stick, together with the lamp, spans a plane in space, and moving or rotating the stick sweeps that plane through the room. Wherever the swept plane meets a surface, it draws a curve on that surface, and the shadow-edge visible in the camera’s picture is the image of exactly that curve. Because the plane itself is known — fixed entirely by the lamp’s position and the stick’s, neither of which depends at all on the object being scanned — a single marked point in the picture, together with the known plane, is enough to place that point in three dimensions: a lamp, a stick and a camera together measure depth.

This is worth setting immediately against the two-camera version of the same idea, because the difference in what is known in advance is the whole reason a single camera suffices here. A stereo pair recovers a point by intersecting two rays, neither of which is known until both pictures exist; a swept light plane recovers a point by intersecting one ray with one plane, and the plane is known the moment the lamp and stick are placed, before the camera has taken a single picture of the object at all. Trading a second camera for a lamp and a stick is possible exactly because a plane, unlike a second camera’s ray, does not need to be measured from the scene — it only needs to be built correctly and then swept.

The method: a plane, its intersection, and a camera

At one sweep angle, the shadow the stick casts crosses a stepped object below, and every point where the shadow’s own edge lands on the object is a point this method can place in space. The photograph above is exactly that scene at a sweep angle of 0°: the lamp and the stick sit above and to one side, out of this steeply-tilted camera’s own frame, and only the marks the shadow-edge leaves on the object are visible. At this angle, 20 of the sweep’s marks land on the object itself, and every one comes back to 1.5e-14 m of its true depth — a fifteen-decimal-place agreement worth being exact about what it does and does not establish, because it is the easiest number in this essay to over-read. The plane a mark is placed against is computed from the identical lamp-and-stick geometry the scene itself was generated from, so recovering a mark to the arithmetic floor checks that the ray–plane intersection is implemented correctly and nothing more; it cannot, by its own construction, ever detect an error in the plane itself, since an error in a known plane would move the true marks along with the recovered ones. The number that carries this essay’s actual claim is not this one — it is how the recovery behaves once the marks themselves, rather than the plane, are the imperfect part of the measurement, which the sections below take up directly.

With exact marks the recovered profile lies on the true one to 4.9e-15 m rmsThe true stepped profile, as a curve, and 208 of the sweep's marks that land on it, recovered from an exact image. Over the whole sweep of 1179 marks — most of them on the bare floor beside the object rather than on it — the residual is 4.9e-15 m rms, the arithmetic floor of the computation rather than a measurement of anything, which is the control the noisy sweep beside this one is read against.the true profileexact marksrms 4.9e-15 m
Fig. 1 The true stepped profile as a curve, and 208 of the sweep’s marks that land on it, recovered from an exact image. Over the whole sweep of 1179 marks, most landing on the bare floor beside the object rather than on it, the residual is 4.9e-15 m rms — the arithmetic floor of the computation, and the control the noisy sweep beside this one is read against, rather than a measurement of anything about the method’s own accuracy.

Real marks scatter, and by how much

A real camera reads a shadow’s edge to some finite precision, and the honest version of this method has to say what a mistaken mark costs rather than only what a perfect one returns.

With marks off by 0.20 px, the recovered profile scatters by 10.4 mm rmsThe true stepped profile, as a curve, and 208 of the sweep's marks that land on it, read to 0.20 px of their true position. Over the whole sweep of 1179 marks the scatter is 10.36 mm rms and 62.1 mm at the worst, which is the marking error amplified by how obliquely each ray meets the light plane.the true profilemarks off by 0.20 pxrms 10.36 mm
Fig. 2 The identical true profile and the identical 208 marks, now read to 0.20 px of their true position in the picture before being placed. The scatter over the whole sweep is 10.36 mm rms and 62.1 mm at the worst — the marking error amplified by how obliquely each ray happens to meet the light plane at that particular point of the sweep.

Ten millimetres of rms scatter from two tenths of a pixel of marking error is the first genuinely informative number this essay has produced, because it is a statement about the method under a condition a real camera actually faces rather than about an idealisation that cannot fail. It is also, on its own, incomplete: it reports one noise level at one sweep of angles, and neither the rate at which scatter grows with marking error nor why the worst mark is six times the rms is visible from a single frame. Both of those are the subject of the next two figures.

Two tenths of a pixel is not a contrived number chosen to make the method look bad or good; it is roughly what a sub-pixel edge-finder can be expected to manage on a shadow-edge with a modest amount of blur or sensor noise, which is why it is the value carried through the rest of this essay’s sweeps rather than the exact zero used only for the control above. A reader building an actual rig from this method would want the marking-error figure re-run at whatever precision their own edge-detection step actually achieves, since the 10.36 mm figure scales — as the next section shows — directly with that number rather than being some fixed property of the method itself.

The scatter is proportional to the marking error

Sweeping the marking error itself, rather than fixing it at one value, is what turns “off by two tenths of a pixel gives ten millimetres” into a law rather than an anecdote.

The profile's error is proportional to the marking error, at a fitted exponent of 1.001The recovered profile's rms error, swept over how far a mark is misread in the picture, from 0.02 to 0.8 pixels. A fitted power law gives an exponent of 1.0005 against a predicted one: doubling the marking error doubles the depth error, because the recovery is a linear intersection of a ray with a plane. With no marking error at all — not shown on these log axes, since it is zero — the residual is the arithmetic floor rather than a fourth point on this line.1e-32e-35e-31e-22e-25e-22e-25e-21e-12e-15e-1how far a mark is misread, in pixelsthe recovered profile's rms error, in metresslope 1.00six marking errors, one lamp and stickexponent 1.001
Fig. 3 The recovered profile’s rms error, swept over how far a mark is misread in the picture, from 0.02 to 0.8 pixels. A fitted power law gives an exponent of 1.001 — doubling the marking error doubles the depth error, because the recovery is a linear intersection of a ray with a plane, and a linear operation scales its output error in direct proportion to its input error.

An exponent of exactly one, rather than something greater or less, is the signature of a specific mechanism and is worth being precise about which one. The recovery at each mark is a single linear step — intersect a ray, computed from a pixel coordinate, with a plane fixed independently of that pixel — and a linear map takes a small perturbation in its input to a proportional perturbation in its output, to first order, always. An exponent above one would suggest the error compounds through some nonlinear step; an exponent below one would suggest the method is somehow more forgiving of larger mistakes than of small ones, which nothing in a ray–plane intersection would produce. The clean 1.001 is confirmation that marking error is the whole story here, entering once and propagating through unmodified by anything else in the pipeline.

The clean exponent is also a point of contrast with a stereo pair’s own depth, worth naming directly. Depth is a reciprocal found that a stereo pair’s depth is not linear in its own marking error at all — depth there is a constant divided by a measured disparity, so a fixed pixel of error maps to an asymmetric interval, nearer by less than it is further by. This essay’s depth is a plain ray–plane intersection rather than a reciprocal of anything, which is exactly why its own error is symmetric and proportional rather than lopsided, and the fitted exponent of one is the signature of that structural difference rather than a coincidence of this particular geometry.

This is also the sweep that would expose a mistake the exact-marks control cannot. A recovery routine that silently clamped its output, or that rounded intermediate values to some fixed precision, would show up here as a departure from linearity at either end of this range — flattening out at small marking errors where the clamp or the rounding dominates the genuine signal, or bending away from the fitted line at large ones where some other approximation starts to matter. Six points spanning a factor of forty in marking error, all sitting on one straight line in a log–log plot, is a much harder thing for a broken implementation to produce by accident than a single residual reading of zero is.

What actually sets the amplification: the angle to the light plane

A single rms number, or even a fitted exponent, still leaves out the fact that not every mark in the sweep is amplified by the same factor — and this is where the essay’s actual claim sits.

The amplification is lowest at 6° and rises toward both ends of the sweep, sharply toward -36.1°How much a pixel of marking error is amplified into a depth error, against the sweep angle — the reciprocal of the sine of the angle between the camera's ray and the light plane, the same triangulation angle a stereo baseline buys. It is least, 17.0×, near 6° and rises on both sides of it — gently toward 22°, where it reaches 21.0×, and steeply toward -36.1°, where it reaches 215.6× at -34° alone and has no ceiling as the sweep is carried the rest of the way: at -36.1° itself the plane turns onto the camera's own eye and the recovery refuses every mark rather than returning one.0100200-20020the sweep angle, in degreesamplification of a pixel of marking error-36.1° — the eye is in the planethe useful sweep is roughly ±26°-36.1° refuses every mark
Fig. 4 How much a pixel of marking error is amplified into a depth error, against the sweep angle — the reciprocal of the sine of the angle between the camera’s own ray and the light plane, the same triangulation angle a stereo baseline buys. It is least, 17.0×, near 6° and rises on both sides: gently toward 22°, where it reaches 21.0×, and sharply toward -36.1°, where it reaches 215.6× at -34° alone.

This is the number the whole method actually rests on, and the two exact-marks figures earlier exist only to be background for it. A ray–plane intersection is, geometrically, exactly the same kind of triangulation two cameras use to fix a point from a stereo pair: in both cases, a small error along the image is divided by the sine of the angle at which two lines of sight — here, a physical ray and a geometric plane — cross each other, and a shallow crossing angle divides by a small number and amplifies the error. Broadside, near 6° in this sweep, the plane and the camera’s ray meet close to a right angle and the amplification is at its least; toward either end of the sweep the plane turns to lie closer to the camera’s own line of sight, the effective crossing angle shrinks, and the same pixel of marking error is thrown into a much larger depth error. Nothing about the marks themselves changes across this sweep — the 0.2 px of marking error used throughout is fixed — only the geometry relating that pixel to a depth changes, which is exactly why the earlier noise figure’s clean exponent of one is compatible with a tenfold difference in amplification depending on where in the sweep a mark happens to fall.

The lamp is the second eye measured the identical shape of law for a single point rather than a swept sweep of them — millimetres of depth per pixel rising as the angle between a camera’s ray and a lamp’s own ray closes — and finding the same 1/sin behaviour again here, with a plane standing in for the second ray, is evidence that the conditioning belongs to the triangulation rather than to whichever two geometric objects happen to be doing it. A designer choosing where to stand a camera relative to a lamp-and-stick rig is solving exactly the problem a designer of a stereo pair solves choosing a baseline: too narrow an angle anywhere the object needs to be measured, and the rig amplifies noise there regardless of how good the camera or the edge-finder is.

The refusal at the one angle where the eye sits in the plane

Carried far enough, the amplification does not merely grow large; it becomes unbounded, at one specific angle that has an exact geometric description.

The amplification grows to 4.4e+5× a thousandth of a degree short of -36.056°, and there it refuses every markThe same amplification as the sweep beside this one, read on a log scale of how close the plane sits to the one sweep angle at which it contains the camera's own eye. It has no ceiling: a thousandth of a degree short of -36.056° it already reads 4.41e+5, and at the angle itself the method stops answering altogether — 0 of 41 marks kept, refused rather than returned as a number with no way to say how wrong it is.5e+21e+32e+35e+31e+42e+45e+41e+52e+55e+51e-32e-35e-31e-22e-25e-21e-12e-15e-11degrees short of the sweep where the eye is in the planeamplification of a pixel of marking error-36.056° is where the eye is in the planeat it: 0 of 41 kept
Fig. 5 The same amplification, read on a log scale of how close the sweep sits to the one angle at which the light plane contains the camera’s own eye, -36.056°. A thousandth of a degree short of it the amplification already reads 4.41e+5, and at the angle itself the method stops answering altogether — 0 of 41 marks kept, refused rather than returned as a number with no way to say how wrong it is.

A camera whose own eye lies in the light plane is a degenerate configuration in the precise sense this site uses the word: at that exact angle, every point of the plane projects to a single line in the picture rather than to a two-dimensional spread of positions, so a mark’s own pixel position carries no information at all about where along the plane it actually falls. That is not a large error to be quoted with a large number; it is the complete absence of the geometric leverage the whole method depends on, and the honest response is to refuse every mark rather than to compute a number with an unstated, unbounded uncertainty attached to it. The earlier figure’s own numbers — the amplification passing 215× as early as five or six degrees short of the critical angle — are the warning that this is coming; the refusal figure is the confirmation that the machinery actually stops rather than quietly returning something plausible-looking once the degeneracy is reached exactly.

That the degenerate sweep angle sits at -36.056° rather than at some rounder or more convenient number is itself worth a sentence: it is not a parameter chosen for the demonstration, it is computed from the specific lamp, stick and camera positions this scene uses, and it would move to a different value entirely under a different rig. The useful part of the sweep — roughly the sixty-two degrees from -34° to +22° covered by the conditioning figure above — is bounded on its worse side by this same computed angle rather than by any round number a designer might have guessed at in advance.

The general shape of this trap is familiar from elsewhere on this site wherever several lines of sight are combined into one estimate. Two lamps and one map intersects several rays by least squares rather than by an exact meet, and the underlying system becomes singular in the identical way — not merely inaccurate, but structurally unable to separate certain directions — whenever the rays involved come too close to lying in one plane. This essay’s refusal is the same singularity arrived at by an unusually direct route: rather than several nearly-coplanar rays gradually degrading a least-squares fit, a single ray is asked to intersect a plane that has been rotated until the ray already lies inside it, which is the exact and total version of the same underlying failure rather than merely its worst case.

The same triangulation angle, without a plane at all

The claim that this method’s conditioning is “the same triangulation angle a stereo baseline buys” is worth checking directly against a case built from two genuine rays rather than one ray and a plane.

Two rays, 2.77 mm apart, in the plane that contains bothThe ray from the left eye through its mark and the ray from the right eye through its. With the marks placed exactly they meet, to 2.2e-16 m. With the same marks read to 1 px they miss by 2.77 mm at a range of 7.22 m. Triangulation is not an intersection; the reported point is a choice about what to minimise, and the gap is the part a residual alone will not tell you.midpoint — 2.77 mm gapfrom the left eyefrom the right eyegap 2.77 mm at 7.22 mexact marks: 2.2e-16 m
Fig. 6 Borrowed from two rays that do not meet: two cameras’ rays to the identical scene point, exact and then read to one pixel each. Placed exactly the two rays meet to 2.2e-16 m; read to one pixel each they miss by 2.77 mm at a range of 7.22 m, because triangulation is not an intersection in general — it is a choice about what to minimise once two lines of sight fail to cross exactly.

The contrast this borrowed figure draws out is precise and worth stating plainly. Two independently-measured rays generically miss each other once either is perturbed at all, because two lines in three-dimensional space meet only by coincidence; recovering a point from them is already an approximation — a choice of the closest point between two skew lines — before any marking error is even considered. This essay’s own method never faces that particular complication, because one of its two “lines of sight” is a plane rather than a ray, and a ray generically does meet a plane at an exact point, with no skewness to approximate away. What the two methods share is not the mechanics of intersection but the underlying sensitivity: both divide a pixel of image error by the sine of an angle between two geometric objects meeting obliquely, and both amplify without bound as that angle closes to zero. A structured-light plane trades away the skew-line complication a genuine second camera has to solve for, at the cost of needing the plane itself to be known in advance rather than recovered from the scene.

The honest limit

Everything measured here concerns one sweep of one straight edge’s shadow across one stepped object, with a lamp and stick whose own position is assumed to be known exactly. Nothing above measures what happens if the lamp and stick’s own geometry is itself uncertain — a lamp calibrated to some finite precision would blur the swept plane by an amount that does not show up anywhere in a marking-error sweep conducted, as this one is, with the plane’s own geometry held fixed and exact. The lamp and the floor cannot both be recovered is where an analogous uncertainty in a lamp’s own position turns out to leave a whole family of scene interpretations rather than one; a version of that same caution almost certainly applies to a swept light plane whose own calibration is imperfect, and this essay’s clean numbers throughout should be read as a best case in that respect, not a general guarantee.

Nor does the conditioning figure’s amplification factor say anything about where in the picture a designer setting up such a rig should point the camera. It says which sweep angles are safe and which are not for a fixed camera position; moving the camera to a different vantage point relative to the lamp and stick would recompute the whole conditioning curve, including the location of its own worst angle, from scratch. The number -36.056° is a fact about this one arrangement, not a universal danger zone for this class of method.

And the object being scanned here is convenient in a way a real object need not be: a stepped surface with no part of itself standing between the lamp and any other part of itself at any of the sweep angles used. A dent breaks the terminator measured exactly the failure mode this essay’s stepped object avoids — a surface occluding part of itself from the light — and a more elaborate scanned object could easily have a step deep enough to shadow the floor of a neighbouring one, which would remove marks from the sweep in a way this essay’s own accounting, built around a fixed 1179-mark sweep, does not model.

What this is an instance of

The conditioning figure’s own description — “the same triangulation angle a stereo baseline buys” — is the thread connecting this essay to the wider habit this site keeps returning to: any method that fixes a point or a depth from two pieces of geometric evidence meeting at an angle inherits that angle as its whole error budget, whatever the two pieces of evidence happen to be. Two rays that do not meet makes the case with two cameras; this essay makes it with one camera and a swept plane; and the lamp is the second eye is the single-point version of the identical idea, using one shadow-edge crossing rather than a whole sweep of them.

What distinguishes this essay from all three is the refusal rather than the amplification alone — a genuine two-camera rig degrades toward a shallow, ill-conditioned baseline without ever quite reaching a configuration where triangulation becomes strictly impossible, whereas a swept plane has one exact angle, computable in advance from the rig’s own geometry, at which the method does not merely get worse but stops. That the essay’s own machinery finds and refuses that angle exactly, rather than returning an unbounded but finite-looking number close to it, is the same habit this site’s other recoveries keep to: an assertion that has never been asked an input designed to break it has not been tested, and -36.056° is the input built to break this one.

A light far enough away is a different family entirely arriving at a related shape of caution: there, the evidence that a light is finite rather than infinitely distant fades smoothly as the light recedes, at a rate that falls off as one over the distance, and there is no single sharp angle at which the recovery refuses — only a long, gradual weakening of the evidence available. Placed beside this essay’s own hard refusal at one exact angle, the contrast is the whole difference between a conditioning number that degrades without limit and one that fades toward a genuine, finite floor: both are honest about their own limits, and the limits themselves are shaped completely differently.

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.

BaselineConditioningDegenerate configurationLight planePoint lightPower lawResidualTriangulation