Measuring from one picture

The wall under the paint

An anamorph's design is a set of rays from a known eye, fixed before any paint is applied — so the marks are a calibration target whose rays are known exactly and whose shape is not. One ordinary photograph supplies the second ray for each mark and the wall comes back at the arithmetic floor, on a dished floor, a ridged one, and a floor with a step in it. What it says between the marks is nothing, by the sagitta.

Worth reading first: A floor anamorph is three numbers · Undoing a picture made on a curve · Flattening a façade out of the photograph.

The viewing field has spent six essays on anamorphosis and every one of them takes the surface as given. A floor anamorph is three numbers because the floor is a plane; undoing a picture made on a curve needs the curve; how well the floor has to be known prices being wrong about it.

Turn that round. Suppose the surface is not known — a rubble floor, a wall that is not flat, a vault whose section nobody has. What does the painted design say about it?

The wall under the paint, on a dished floorA section through the room. The design is a set of rays from the eye, fixed before any paint is applied; the paint lands wherever those rays meet the floor, which is what makes the marks an anamorph. A second camera photographs the marks and supplies a second ray for each, and where the two meet is the floor. Over 49 marks the recovered points are 2.5e-14 m from the truth on a dished floor, with the worst triangulation angle 21.6°. The design is a calibration target whose rays are known exactly and whose shape is not, which is an unusual object and is why one extra photograph is enough.the eye the design is forthe cameracorrect from 14 cm, at 160 mm widerecovered to 2.5e-14 m
Fig. 1 A section through the room. The design is a set of rays from the eye, fixed before any paint is applied; the paint lands wherever those rays meet the floor; a second camera photographs the marks and supplies a second ray for each.

An anamorph is an unusual calibration target

A calibration target is an object of known shape photographed from an unknown place. A painted anamorph is the reverse and better: an object of unknown shape whose rays are known exactly.

The design is chosen before the paint goes on. Each mark is defined as the intersection of a stated ray from the eye with whatever surface is there, so the ray is known — not measured, known — and the only unknown is how far along it the paint landed.

One further photograph supplies the second ray, from a different place, and two rays meet in a point. So the wall comes back mark by mark, with nothing fitted and no model of the surface anywhere in the calculation.

The wall under the paint, on a ridged floorA section through the room. The design is a set of rays from the eye, fixed before any paint is applied; the paint lands wherever those rays meet the floor, which is what makes the marks an anamorph. A second camera photographs the marks and supplies a second ray for each, and where the two meet is the floor. Over 49 marks the recovered points are 2.8e-14 m from the truth on a ridged floor, with the worst triangulation angle 18.6°. The design is a calibration target whose rays are known exactly and whose shape is not, which is an unusual object and is why one extra photograph is enough.the eye the design is forthe cameracorrect from 14 cm, at 160 mm widerecovered to 2.8e-14 m
Fig. 2 The same design on a ridged floor, which curves one way and is flat the other. Nothing in the recovery is told the shape, so a developable floor and a dished one are the same problem.

It works on a floor with a step in it

The recovery is at the arithmetic floor on all four of the site’s named receivers — a plane, a dish, a ridge and a step, which is two planes with a discontinuity between them.

The step is the case worth naming. Every fitting approach to this problem — assume a smooth surface, fit a curvature, fit a polynomial — either fails on it or returns a number that means nothing. Triangulation does not care: each mark is a separate pair of rays, and a discontinuity between two marks is not something the arithmetic has to represent.

The wall under the paint, on a floor with a stepA section through the room. The design is a set of rays from the eye, fixed before any paint is applied; the paint lands wherever those rays meet the floor, which is what makes the marks an anamorph. A second camera photographs the marks and supplies a second ray for each, and where the two meet is the floor. Over 49 marks the recovered points are 2.3e-14 m from the truth on a floor with a step, with the worst triangulation angle 20.8°. The design is a calibration target whose rays are known exactly and whose shape is not, which is an unusual object and is why one extra photograph is enough.the eye the design is forthe cameracorrect from 14 cm, at 160 mm widerecovered to 2.3e-14 m
Fig. 3 The floor with a step. The recovered points sit on both planes without anything in the calculation knowing there are two, because each mark is triangulated on its own.

That is the difference between a measurement and a fit, and this row of the field is about it twice over: the shadow’s curvature is a fit and returns a confident number for a floor whose curvature is zero, while this is a measurement and returns the step.

What it says between the marks: nothing, by the sagitta

The recovery is exact at every mark, so the residual is zero and quoting it would say nothing. The honest number is a different one: how far can the surface wander between two marks without any mark noticing?

For a floor of the form k(x2+z2)k(x^2+z^2) over a mark spacing ss, that is the sagitta — the deviation of the parabola from the chord across it:

unresolved  =  ks24\text{unresolved} \;=\; \frac{k s^2}{4}

which falls as the square of the mark count. A seven-by-seven design over a three-metre patch leaves a little over four millimetres unresolved; a thirteen-by-thirteen leaves a quarter of that.

The recovery is exact at the marks and silent between themWhat a painted design does not say. Every mark is recovered at the arithmetic floor, so the useful number is not a residual — there is none — but how far the surface can move in the gap between two marks without any mark noticing. On a floor of curvature 0.060 that is k s²/4, the sagitta over one spacing: 4.3 mm at 7 marks across, falling to 0.6 mm at 17. The resolution of the measurement is the density of the design, which is a fact about the painting rather than about the photograph, and it is the number an error bar would have hidden.01020304051015marks across the designunresolved between two marks (mm)4.3 mmcurvature 0.06049 marks
Fig. 4 What the design does not say, against how many marks it has. The resolution of the measurement is the density of the painting, which is a fact about the artwork rather than about the photograph.

That is a resolution rather than an error bar and the distinction matters. An error bar says the answer might be somewhere else; this says the answer is exact there and unconstrained here, which is a different shape of ignorance and is repaired by a different action — more marks, not a better camera.

It also inverts what a reader would expect of the two inputs. The photograph’s quality does not set the resolution; the design’s density does. A blurry photograph gives the same marks in the same places, more noisily; a sparse design gives crisp marks and a coarse surface.

Three numbers, and the whole mapThe rabatted design maps to the floor marks by a homology: the ground line is fixed pointwise, one point off it is fixed, and one ratio does the rest. Rebuilding every mark from those three misses by 3.0e-15 m.axis — the ground line, fixed pointwisecentreaxisthe ground linefixed pointwisecentre(0.150, 4.320)height + distanceratio-1.666667−distance / heightevery mark rebuilt to 3.0e-15 meye 1.62 m up, 2.70 m backthree numbers back to the eye: 5.0e-16 m
Fig. 5 The design’s own three numbers on a flat floor, from the viewing field. On an unknown floor those three become a set of rays, and the rays are what the recovery consumes.

Why the step is the case that separates the methods

It is worth staying with the step for a paragraph, because it is the cheapest way to see what kind of instrument this is.

Imagine three ways of answering the question. Assume a plane and fit it: the step returns a plane through the middle of both halves, with a residual that is large and does not say where the discontinuity is. Assume a smooth surface and fit a curvature: the step returns a number, with a small residual, for a surface whose curvature is zero at every point of it — which is the fit two rungs along and is the most dangerous of the three because it looks like success. Triangulate: the step returns the step.

The difference is where the model lives. The first two put a model of the surface inside the estimator, so the estimator can only report surfaces the model can express. Triangulation has no model at all — each mark is an intersection of two known lines — so the answer is whatever shape the marks are on.

That is a general point about recoveries and it is worth stating so it can be carried elsewhere: an estimator with a surface model cannot report a surface outside the model, and it will not say so. It reports the nearest member and a residual, and a small residual on a nearby member is indistinguishable from a correct answer.

What the receiving surface costs a four-point fitThe same lamp and the same occluder, cast onto four surfaces. Four marks of the shadow are matched to four known points of the occluder, the map they determine exactly is built, and the other sixty-eight points are predicted by it. On the plane the prediction is right to 3e-13 mm; on the others it is not, and the fit is still exact at the four everywhere — 2e-13 mm — which is what makes the rest a prediction rather than a residual.a flat floor3e-13 mma homology — four points determine ita dished floor5.67 mmnot a homologya ridged floor9.07 mmnot a homologya floor with a step74.95 mmnot a homologyworst error of the predicted pointsexact at the four fitted, on every surface
Fig. 6 The four floors this row is measured on, from the light field. Three of them are smooth and one is two planes, and the fourth is there precisely because it breaks every method that assumes smoothness.

The conditioning is one angle

Two rays meet well when they cross at a decent angle and badly when they are nearly parallel. That angle — between the design ray and the camera ray, at the mark — is the whole of the conditioning here, and it is reported rather than assumed.

Over the design used in these figures the worst crossing is around twenty degrees, which is comfortable. It falls as the camera moves toward the eye and rises as it moves away, and it is not uniform across the design: marks near the middle, where both rays run nearly along the room, are the worst-conditioned.

Two rays, 5.07 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 1.9e-15 m. With the same marks read to 1 px they miss by 5.07 mm at a range of 7.19 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 — 5.07 mm gapfrom the left eyefrom the right eyegap 5.07 mm at 7.19 mexact marks: 1.9e-15 m
Fig. 7 The general instrument: two rays from two places, and how close they come. Everything in this essay is that measurement performed once per mark.

Where the worst conditioning is, and it is not where a reader expects

The angle between the two rays is the conditioning, and it varies over the design in a way worth reading off the figure rather than guessing.

A reader’s guess is that the marks furthest from the camera are the worst, because they are furthest away. They are not. The angle between two rays to a point depends on the baseline between the two viewpoints and on the distance to the point, and over a design a few metres across with a camera a couple of metres to one side, the distance barely changes — what changes is the direction.

The badly-conditioned marks are the ones whose design ray happens to run nearly parallel to the camera’s own line of sight, and where those fall depends entirely on where the camera was put. Move it and they move.

So the practical rule is not “get closer” or “use a wider design”; it is put the camera where its rays cross the design’s rays squarely, which for a floor design means off to one side and at a different height. That is the ordinary advice for any triangulation and it arrives here with the design’s own geometry deciding what “squarely” means.

And the camera that recovers nothing

There is a place the second camera must not stand, and it is exactly the place a photographer would choose.

Put the camera on one of the design’s own rays — behind the eye, looking along the same line — and that mark is seen along the same direction from both places. Two coincident rays do not meet in a point; they meet in a line, and where along it the paint sits is unknown.

The solver refuses rather than returning something plausible. closestPointToRays asserts that the bundle spans enough directions to pin a point, and a pair of parallel rays fails it.

The wall under the paint, on a flat floorA section through the room. The design is a set of rays from the eye, fixed before any paint is applied; the paint lands wherever those rays meet the floor, which is what makes the marks an anamorph. A second camera photographs the marks and supplies a second ray for each, and where the two meet is the floor. Over 49 marks the recovered points are 4.7e-14 m from the truth on a flat floor, with the worst triangulation angle 17.5°. The design is a calibration target whose rays are known exactly and whose shape is not, which is an unusual object and is why one extra photograph is enough.the eye the design is forthe cameracorrect from 14 cm, at 160 mm widerecovered to 4.7e-14 m
Fig. 8 The flat floor, which is the case every earlier anamorph essay assumes. The recovery returns it exactly, and the point is that it was not told to expect a plane.

That refusal is the same one epipolar geometry makes about a point on the baseline, and it has the same practical form: the design should be photographed from off to one side, and a camera standing behind the intended eye is the one arrangement that is useless.

A point on the left is a line on the rightFive points in the left picture. Each one fixes a line in the right picture — the image of the ray it came along — and its match lies on that line to 2.8e-13 px. The five lines meet at the epipole, 2.9e-10 px from concurrent. Knowing where a point is in one picture does not say where it is in the other; it removes one of the two degrees of freedom.1234512345a point is chosen hereand must be on this linematch to its own epipolar line: 2.8e-13 px5 of 44 correspondences drawn
Fig. 9 The epipolar constraint, from the twoviews field: a point in one picture is a line in the other, and the line degenerates for anything on the line joining the two eyes.

What is known and what is assumed

It is worth being exact about what this arrangement needs, because the answer is less than a reader might expect and more than nothing.

It needs the eye’s position — the point the anamorph is designed for. That is not a measurement; it is a decision made before the design existed, and it is written down.

It needs the camera’s pose relative to the eye. That is a genuine input, and getting it is an ordinary photogrammetric problem: photograph something of known geometry in the same frame, or use the site’s own machinery to recover the camera from the picture it drew.

It needs no model of the surface at all, which is the whole point.

And it inherits the ordinary two-view scale ambiguity: with the eye-to-camera distance known in metres the answer is in metres, and without it the answer is a shape and not a size. That is the site’s own recurring limit arriving in a new place, and it arrives without anything special being done to it.

One reconstruction, drawn at its own scale and at 3.4×The courtyard recovered from two pictures, seen from above. Every pairwise distance ratio matches the world's to 8.7e-14, so the shape is exact. The size is not determined at all: the right-hand plan is the same reconstruction 3.4 times larger and fits the same two pictures equally well. One measured length in the scene — here 0.800 m — fixes it, and nothing in the pictures can.as recovered0.261 across× 3.4 — same two pictures0.887 acrossworst ratio deviation 8.7e-14size fixed only by a supplied 0.80 m
Fig. 10 The limit as the twoviews field states it: two pictures give shape and no size, and the missing number is a length somebody has to supply.

Why the design’s rays are free

The thing that makes this work is worth isolating, because it is not obvious that anything unusual is happening.

An ordinary two-view reconstruction has to match points: find the same feature in both pictures, which is the hardest part of the problem and the source of most of its failures. A wrong match is not a small error; it is a point somewhere else entirely.

Here there is nothing to match. The design says which ray each mark is on, by construction, so the correspondence is given rather than found. What remains is arithmetic that cannot go wrong.

That is a genuinely unusual position to be in and it comes from the anamorph’s own definition. A picture painted to be right from one place is a labelled set of rays; the labels are the design, and the design is a document.

One correspondence moved 30 px, and where the damage wentThe clean fit is exact to 4.3e-13 px. Moving correspondence 9 by 30 px leaves every other point wrong too — the typical one by 0.49 px and the worst by 1.6 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.49 pxthe moved oneevery point wrong: median 0.49 px, worst 1.6 pxclean fit 4.3e-13 px
Fig. 11 What is avoided. A wrong correspondence in an ordinary reconstruction puts a point somewhere else entirely, and no amount of care in the arithmetic recovers from it.

A design is a document, and that is the unusual part

The claim that makes this work bears restating in a different register, because it is a claim about what kind of thing an anamorph is rather than about geometry.

Most objects that get photographed carry no record of how they were made. A wall is a wall; a statue is a statue; recovering anything about them from pictures means recovering it from the pictures alone, with all the ambiguity that entails.

An anamorph is different because its making was a computation. Somebody chose an eye, chose a picture the eye should see, and let the rays fall where they fell. The design — the list of rays — is a written record of half the geometry, and it existed before the object did.

So a painted anamorph is a photograph’s worth of information plus a document’s worth, and the document half is exact. That is why one extra view is enough where an ordinary object would need two and a matching problem, and it is the reason this essay is short on caveats and long on arithmetic.

The same observation runs the other way and is the more useful direction. A photograph of an anamorph on a surface nobody measured contains, in principle, both the design and the surface — and the design is recoverable because the thing the anamorph is a picture of is usually obvious. A skull on a floor is a skull; knowing that fixes the rays, and fixing the rays fixes the wall.

A word drawn to be read from 68° off to the sideStraight strokes stay straight and the cross-ratio along each is preserved, which is what makes this a projection rather than a distortion.eye, 68° offgrey: the word before the projectionblack: the same word, projected
Fig. 12 The object in question: a design computed so that it reads from one place, on a surface. What makes the recovery possible is that the computation was done and can be done again.

The round trip, and what it is for

This site’s habit is the round trip: recover the camera from the drawing it made and check it against the camera that made it. Every earlier instance recovers a camera — a focal length, a principal point, a pose — from a scene made of planes and points.

This recovers a shape, and the check is the same: build a floor, paint an anamorph on it, photograph it, recover the floor, and compare. Four floors, four recoveries, all at the arithmetic floor.

A box drawn from a known camera, and the camera recovered from the drawingThree vanishing points found from the twelve drawn edges alone give back the focal length to 2e-15 relative.recovered principal pointused to drawrecoveredgapfocal length707.35707.352e-15principal x345.0345.02e-12angle52.0°52.0°correct from 16 cm, at 160 mm wide52° across
Fig. 13 The site’s original round trip: a camera got back out of the picture it drew, checked against itself. This essay is the same discipline with the unknown moved from the eye to the wall.

What it is for is a real question and the honest answer is narrow. Nobody needs to survey a floor by painting an anamorph on it — there are easier instruments. What the result establishes is that the design carries information about the surface, which matters for the reverse problem: a photograph of an existing anamorph, on a surface nobody measured, whose design can be inferred from what it is a picture of.

How much pavement the design needsRays from an eye 1.65 m up through a design whose top reaches 30% of that height. The mark lands 1.1 m away, and the last ray drawn — at 95% of eye height — lands 103 m beyond the edge of this section.eye level — the ray never comes downeye · 1.65 m up1.1 m of floor at 30% of eye heightand the top of the design has no mark at all
Fig. 14 The case this bears on: an anamorph crossing a corner, where the surface is two planes and the design has to know it. Recovering the surface is what would let the design be checked against a wall somebody else built.

What this does not settle

It does not recover the surface where there is no paint. The design’s marks are the measurement, and the space between them is unconstrained by anything but the sagitta above.

It does not recover the eye. That is a different problem the field has already answered, and the answer there is that the marks name the place and not the height — so eye and surface cannot both be unknown.

And it does not deal with a surface the design’s rays miss. A ray that leaves the room recovers nothing, and paintedMarks refuses a design whose rays do not all land.

A recovery is exact where it has data and silent where it does not, and the useful number is not the residual — which is zero — but how far the answer could move in the gaps. Reporting a residual for a measurement that interpolates is reporting the wrong quantity.

One photograph of one floor, undone three waysThe design is 1800 mm across. Knowing the surface returns it exactly — nothing is fitted, so there is no residual to report beyond arithmetic. Assuming the floor is flat is exact at the four marks the homography was given and 111 mm out elsewhere. And knowing the shape but getting its curvature 10% wrong costs 11.0 mm, which is the price of the parameter rather than of the shape.what the recovery was toldworst error in the recovered designthe surface, known1.1e-12 mmassumed flat, four marks110.97 mm6e-13 mm at the fourthe surface, curvature 10% out11.00 mma a ridged floor, k = 0.06, design 1800 mm wide1e-12 mm · 111 mm · 11.0 mm
Fig. 15 The forward problem, from the curved field: undoing a picture made on a curve, which needs the curve. This essay is the same arrangement with the curve moved from the inputs to the outputs.
The room the eye may stand inA section through the design eye, containing the line of sight and the vertical, at a tolerance of 10 mm on a design 1.8 m wide. 40 mm along the sight line, 14 mm across it, and 36 cm³ altogether.toward the designup10 mm14 mm across40 mm along the sight line
Fig. 16 And what the design is for in the first place: a room the eye may stand in, computed so that the marks resolve. The rays that recover the wall are the same rays that put the paint down.
The wall under the paint, on a dished floorA section through the room. The design is a set of rays from the eye, fixed before any paint is applied; the paint lands wherever those rays meet the floor, which is what makes the marks an anamorph. A second camera photographs the marks and supplies a second ray for each, and where the two meet is the floor. Over 121 marks the recovered points are 3.6e-14 m from the truth on a dished floor, with the worst triangulation angle 21.6°. The design is a calibration target whose rays are known exactly and whose shape is not, which is an unusual object and is why one extra photograph is enough.the eye the design is forthe cameracorrect from 14 cm, at 160 mm widerecovered to 3.6e-14 m
Fig. 17 A denser design on the same floor. Every mark is still exact and the space between them has shrunk, which is the only lever this measurement has.

What links here

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

Reads more easily once this is understood

Essays that name this one as worth reading first.

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.

AnamorphosisConditioningDemonstrationDevelopable surfaceEpipolar geometryleast-squares intersectionReceiving surfaceReconstructionResolutionscale ambiguityTriangulation