What survives

What one picture of a plane determines

A photograph of a tiled floor fixes that floor's geometry up to a projectivity, and no further. Supplying the horizon buys back the midpoint — exactly, and nothing else. Supplying the image of one circle buys the right angle and the ratio of two lengths at right angles. Three stages, three prices, and a quantity a stage does not determine has no value rather than a wrong one.

Worth reading first: What a projection destroys · Flattening a façade out of the photograph.

Photograph a tiled floor at an angle. What can be got back out of the photograph, and what has to be supplied from elsewhere?

The question sounds like it should have a vague answer — most of it, roughly — and it has an exact one in three parts. The photograph determines the floor up to a projective transformation. Adding one line determines it up to an affine one. Adding one circle determines it up to a similarity, which is to say completely, up to overall scale.

Projective, affine, metric — what each stage buysThe photograph fixes the plane only up to a projectivity: the midpoint of a receding side lands 0.3970 of the way along. Supplying the plane's vanishing line buys the midpoint back exactly and nothing else. Supplying the image of one circle buys the last three numbers, at which point the right angle is 90.000° and two equal sides measure 1.000000. The cross-ratio is 1.333333 in all three, because it was never lost.projectiveaffinemetricmidpointtwo equal sidesa right anglecross-ratioprojective1.333333333affine0.5000001.333333333metric0.5000001.00000090.000°1.333333333— means the stage does not determine it at allcross-ratio 1.333333 throughout
Fig. 1 The three stages on one photograph, with four quantities measured at each. Two columns hold throughout and two do not exist until the last stage — a dash rather than a number, because a quantity the stage does not determine has no value rather than a wrong one.

Stage one: what the photograph gives

A homography has eight degrees of freedom, and a photograph of a plane leaves all eight of them free. That is not a small residual uncertainty; it is total. Any two quadrilaterals are related by a homography, so the photograph is consistent with the floor being any quadrilateral whatsoever.

What survives is the cross-ratio, and the only thing that survives is the cross-ratio and things built from it. Four points along a receding line of tiles carry a number, and that number is the same in the photograph as on the floor, to twelve decimal places. Four points on the floor and their four images are two quite different-looking configurations that agree about exactly one quantity.

The midpoint is not among the survivors. A tile’s centre line, photographed, lands 0.397 of the way along rather than half — for that camera, and at some other value for any other camera.

Four points on a line, before and after a projectionLength and the ratio of lengths do not survive the projection; the cross-ratio does, agreeing to 2e-16 relative.horizonABCDon the groundin the picturelength AB1.17661.6286ratio AB:CD0.71430.8665cross-ratio1.32411.3241correct from 26 cm, at 160 mm wide34° across
Fig. 2 The one survivor and three of the casualties, measured together on four points. Length is destroyed, the ratio of two lengths is destroyed, and the cross-ratio comes through to the last digit — which is why the whole of stage one’s content is what can be built out of it.
A family of parallel ground lines at 26°, and where they meetAll five lines pass through one point on the horizon, off the edge of the frame at x = 1162. The point fitted from the drawn lines agrees with the one computed from the direction to 3e-12 px, and the fit's own residual is 3e-13 px.horizon — the image of the line at infinityvanishing point at x = 1162 — off the framecorrect from 22 cm, at 160 mm wide40° across
Fig. 3 Where the vanishing line comes from. Two sets of lines parallel on the floor give two vanishing points, and the line through them is the plane’s image of infinity — the two numbers stage two costs.

Stage two: buying the midpoint with a line

Supply one thing: the plane’s vanishing line — the horizon, for a ground plane. That is two numbers, and it is the line the plane’s points at infinity image onto.

Applying the homography that sends that line back to infinity turns the projectivity into an affinity, and what an affinity preserves comes back exactly. Parallel lines are parallel again. Ratios of lengths along a line are right, so the midpoint of the receding side lands at 0.500000. Ratios of areas are right.

What does not come back is anything comparing directions. Two sides of a square still measure differently and the corner is still not a right angle. The affine stage buys the midpoint and buys nothing else, and it is worth being precise about how nothing: the angle at the corner comes out at 177.58° in this particular rectification, and that number is not a measurement of anything.

A quantity an affinity is free to change has no determined value. Any further affinity can be applied to the rectified picture and it is still a valid affine rectification, and the angle will be something else. So printing 177.58° in that cell would invite it to be read as the angle, as recovered at this stage, and there is no such thing. The figure prints a dash.

That distinction — between a number that is wrong and a number that does not exist — is the whole reason to state the chain in stages rather than as a single procedure. It is the same distinction the gauge freedom in a bundle adjustment turns on, and the same one behind the seven numbers no picture can name.

Halving a receding rectangle two waysThe diagonals cross at the image of the rectangle's centre, 1e-13 px from it — the construction is exact at every camera because it uses only which lines meet where, and that is what a projection keeps. Halving the drawn side with a ruler instead lands 20.4 px from the image of the side's midpoint.the diagonals against a ruler, at 3.4 mthe diagonals — exactthe ruler — 20.4 px outcorrect from 23 cm, at 160 mm wideharmonic set -1.000000000 · construction 1e-13 px
Fig. 4 What the affine stage buys, in its constructive form. Equal divisions and midpoints are available from the vanishing line alone — which is why the diagonal construction needs no station point and no units.

Stage three: buying the angle with a circle

Supply one more thing: the image of a circle lying in the plane. A drain cover, a round table, a manhole, a wheel.

After the affine step, that circle’s image is an ellipse — the affinity has not made it a circle, because an affinity can shear a circle into any ellipse of the same area ratio. The transformation that turns that ellipse back into a circle is the remaining upgrade, and it is determined by the ellipse up to a rotation and a scale, which is exactly a similarity.

Apply it and the plane is a scale drawing of itself. The right angle comes back at 90.000000°. Two equal lengths at right angles measure 1.000000. Every angle in the plane is now correct, not just the ones used.

The ground, turned into a planFour corners of a rectangle of known proportions fix the homography. Three lengths it was never given come back to 2e-15 relative — so every measurement on that plane is available, in units of the rectangle's own width.the picturethe same plane, rectifiedacross — 0.6000 widths (true 0.6000)along — 0.7667 widths (true 0.7667)diagonal — 1.2023 widths (true 1.2023)worst error 2e-15 relativethe probes were not used to build the map
Fig. 5 The end state, and what it is for: a rectified plan of the plane, in which distances can be measured with a ruler. Getting here needs the vanishing line and one more constraint, and this figure’s version takes them from four known corners — which supplies both at once and hides the distinction this essay is about.
A circle on the ground, and the two points that get called its centreThe image of the centre and the centre of the image ellipse are 18.6px apart — 4.7% of the ellipse's own width. The third mark is constructed from the drawn ellipse and the horizon alone, with no access to the circle: it lands 6e-14 px from the image of the centre and 18.55 px from the ellipse's own.centre of the ellipseimage of the centrepole of the horizon — 6e-14 px awaycorrect from 22 cm, at 160 mm widepole 6e-14 px from the truth
Fig. 6 What the circle supplies, and what it also gives away. The image of one circle fixes the last two shape parameters — and the pole of the vanishing line with respect to it marks the circle’s own centre, exactly.

Why the cross-ratio column is the control

Four columns, and the fourth is a control rather than a result.

The cross-ratio is 1.333333333 at the projective stage, at the affine stage and at the metric stage. It has to be: every stage applies a projective transformation, and the cross-ratio is invariant under all of them. A stage that changed it would mean the arithmetic was wrong somewhere.

So the table reads: one quantity that was never lost, one bought with a line, two bought with a circle. And the ordering is not a convenience — the angle cannot be bought without first buying the midpoint, because the vanishing line is contained in what the circle supplies and the upgrades compose in that order.

What each purchase actually costs

It is worth being concrete about where the supplied information comes from, because “supply the vanishing line” sounds like cheating and is not.

The vanishing line is measurable in the picture. Two sets of lines that are parallel on the floor — the two directions of a tile grid, the two edges of a road, a pair of parallel wall bases — give two vanishing points, and the line through them is the vanishing line. So stage two costs a picture containing two known-parallel directions, which most pictures of built environments contain by default.

The circle is also measurable, when there is one. Any round object lying flat does it. If there is none, two known right angles will do instead, or a known length ratio in two directions, or a known angle — the circle is one of several equivalent ways to spend the last three degrees of freedom.

And scale is never recoverable. The chain ends at a similarity, not at a congruence, because nothing in a single picture carries a length. That is the one-view scale ambiguity, and the whole metrology field is what to do about it, which is: supply one known length, anywhere.

Two scenes 137× apart, and the one picture they both makeEverything in the second plan — the room, the eye's distance, the eye's own height — is 137 times the first. Every projected vertex agrees to 1e-13 px. A single photograph has no scale, and this is what that means.a room 2.8 m across, eye 1.6 m up1 mthe same plan, 137× bigger137 midenticalpicturesthe picture — both scenes, drawn twice, one on top of the otherlargest disagreement 1e-13 px over 8 verticesone length has to come from outside the picture
Fig. 7 The floor of the chain. Every stage above ends at a similarity, and the last factor — the overall size — is not in the picture at all. Doubling the scene and doubling the distance gives the identical photograph.
Four figures of the same height, camera level at 1.60 mThe horizon cuts every one of them at 89.9% of its height — the eye height over the figure height — however far away it is.horizon = eye level, 1.60 m89.89%correct from 26 cm, at 160 mm widespread 0
Fig. 8 The vanishing line of the ground plane, in its familiar form. It is at eye level when the picture plane is vertical, and it is the plane’s image of infinity whether it is or not — the second statement is the one the upgrade uses.

Reading it as a budget

The count is tidy enough to be worth stating as arithmetic. A homography has 8 parameters. An affinity has 6. A similarity has 4. So:

Stage one to stage two costs 2, and the vanishing line is 2 numbers. Stage two to stage three costs 2, and the circle’s image supplies them — an ellipse has 5 parameters, of which 3 go on position and size, leaving 2 for shape, which is exactly the deficit.

The budget balancing is not a coincidence and it is a useful check when adapting the chain: any fact worth 2 parameters can play the vanishing line’s role, and any fact worth 2 more can play the circle’s. A pair of known right angles supplies 2; a known length ratio in two directions supplies 1 and leaves the chain one short.

Projective, affine, metric — what each stage buysThe photograph fixes the plane only up to a projectivity: the midpoint of a receding side lands 0.3970 of the way along. Supplying the plane's vanishing line buys the midpoint back exactly and nothing else. Supplying the image of one circle buys the last three numbers, at which point the right angle is 90.000° and two equal sides measure 1.000000. The cross-ratio is 1.333333 in all three, because it was never lost.projectiveaffinemetricmidpointtwo equal sidesa right anglecross-ratioprojective1.333333333affine0.5000001.333333333metric0.5000001.00000090.000°1.333333333— means the stage does not determine it at allcross-ratio 1.333333 throughout
Fig. 9 The same chain from a wider camera. The projective stage’s numbers change, because they are properties of that photograph; the affine and metric stages’ numbers do not, because they are properties of the floor. Which is the whole content of the exercise, visible by moving the camera.
A 3.4 m object measured from one picture, 13 m awayThe base, the horizon crossing, the top and the vertical vanishing point have a cross-ratio of 1.9101. With the eye at 1.62 m that gives 3.400 m, against a true 3.4 m. The camera is not consulted.horizon — the eye's own heightbase — 0 mhorizon crossing — 1.62 mtop — 3.40 m recoveredthe vertical vanishing point is 8586 px above this framerecovered 3.400 m · true 3.400 m2.2 cm per pixel of click error
Fig. 10 The practical end of the chain. Once the plane is metric, one known length anywhere fixes the scale and every other length in the plane follows — which is the fourth purchase, and the only one a single picture can never make for itself.

The chain as it is actually used

Almost every practical rectification collapses the three stages into one, and it is worth saying how, because the collapse is what makes the stages invisible.

Four known corners of a rectangle determine the homography from the picture to that rectangle’s own plane directly — eight numbers from eight equations, and the answer is metric in one step. No vanishing line is computed and no circle is needed, because the four corners contain both.

That is the operation the metrology field uses and it is the right operation when four corners are available. What it hides is which ingredient is doing which job, and the hiding matters exactly when the four corners are not available: a reader with three corners, or with a rectangle whose proportions are unknown, needs to know which stage they can still reach.

The chain answers that. Three corners and the horizon reach the affine stage. A rectangle of unknown aspect reaches the affine stage and stops, because its shape is the thing that would have supplied the metric constraint. Two parallel directions and a manhole cover reach the metric stage without any rectangle at all.

What the chain says about a claim

The most useful thing the three stages provide is not a procedure but a way of grading a sentence, and the grading is quick.

These two lines are parallel on the floor — affine. It needs the vanishing line, and a reader who asserts it from a photograph without one has asserted nothing.

This paving is evenly spaced — projective, and available from the photograph alone, because even spacing is a cross-ratio.

This corner is a right angle — metric. It needs the vanishing line and one more constraint, and the constraint has to be identified.

This tile is 30 cm across — beyond metric. It needs everything above plus a known length from outside the picture.

Applying that grading to a claim before checking it saves the checking, because most wrong claims about photographs are wrong in the same way: a metric assertion supported by projective evidence. A photograph shows a quadrilateral; the quadrilateral is asserted to be a square; nothing in the picture distinguishes it from any other quadrilateral, and the assertion has come from the writer’s knowledge of what the object was rather than from the picture.

That failure is not always an error — the writer may well know the object was square — but it is a different kind of statement, and the chain is what separates the picture says from the writer already knew. On a site whose whole habit is that every claim gets a test it could fail, the separation is the point.

What each stage is worth in practice

Projective sounds useless and is not. A cross-ratio along a line of tiles identifies the tiling — it says whether the divisions are equal, which is a yes-or-no answer available from a photograph with nothing supplied. That is enough to catch a constructed image whose paving was spaced by eye.

Affine is where most architectural photography lands and it is worth more than it sounds. Parallelism, midpoints, ratios along a line and ratios of areas are all back. A floor plan traced at the affine stage has the right topology and the right proportions along each direction, and is sheared.

Metric is a scale drawing, which is what everybody wanted. Its one remaining freedom is the overall size, and one known length anywhere fixes it.

The ordering is strict and the strictness is useful. A claim that skips a stage — a right angle asserted from a picture with no circle and no known perpendicular — has not been derived from the picture at all, and the chain says which piece of information is missing rather than merely that something is.

Why the stages are groups

There is a reason the three stages are the ones they are rather than an arbitrary sequence of refinements, and it is the reason the word “stratification” is used.

Each stage is a group of transformations: projective (eight parameters), affine (six), similarity (four). Each contains the next as a subgroup. And the quantities that are meaningful at each stage are exactly the quantities invariant under that group — the cross-ratio under all projectivities, the midpoint and area ratio under all affinities, the angle and length ratio under all similarities.

That is what makes the dashes in the table right rather than fastidious. A quantity that is not invariant under the stage’s group does not have a value at that stage, because the stage has not distinguished the picture from every other picture the group can reach. Printing the value the particular rectification happened to produce would be reporting an artefact of an arbitrary choice.

The same logic runs through this site wherever a recovery is up to something. A reconstruction up to a similarity has no size; a bundle adjustment’s solution is up to a gauge; a parallel drawing’s cube is up to a reflection. In each case the honest report names the group and lists what survives it.

What it is for

Two things, and the second is why it is a rung on this site rather than a note in a textbook.

It says what to look for in a picture that is going to be measured. Not is this photograph good enough but does it contain two parallel directions and one circle, which is a checkable question with a yes-or-no answer.

And it says what a claim about a picture is worth. A statement about a photographed plane belongs to one of the three stages, and knowing which says what supporting information it needed. These two lines are parallel is affine and needs the horizon. This corner is square is metric and needs the circle. These four points have this cross-ratio is projective and needs nothing.

The ground, turned into a planFour corners of a rectangle of known proportions fix the homography. Three lengths it was never given come back to 1e-15 relative — so every measurement on that plane is available, in units of the rectangle's own width.the picturethe same plane, rectifiedacross — 0.6000 widths (true 0.6000)along — 0.7667 widths (true 0.7667)diagonal — 1.2023 widths (true 1.2023)worst error 1e-15 relativethe probes were not used to build the map
Fig. 11 The practical form, from the metrology field. Four known corners collapse the whole chain into one step — which is why the stages are invisible in practice and worth separating anyway: four corners supply the vanishing line and the metric constraint at once, and a reader who has only three of them needs to know which stage they are stuck at.

The last one is the reason to keep the stages apart even though almost every practical rectification supplies everything at once. A procedure that always works is one nobody can reason about when it fails. The chain says exactly which piece of information is missing, and there are only three places to be stuck.

Four points on a line, before and after a projectionLength and the ratio of lengths do not survive the projection; the cross-ratio does, agreeing to 0e+0 relative. Joined to a vertex off their line, the four points become four lines whose own cross-ratio is the same number — and two further transversals cut those lines in four points that carry it again, which is why any picture of the four rays gives the same answer.horizonABCDany vertexon the groundin the picturelength AB1.00011.3930ratio AB:CD0.56670.6837cross-ratio1.31681.3168correct from 26 cm, at 160 mm wide34° across
Fig. 12 And the invariant that holds at every stage, in its dual form: four rays have the cross-ratio their four points have, so the number can be measured from the pencil when the points themselves have run off the edge of the picture.

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.

Affine mapCross ratiogauge freedomGround plane rectificationHomographyline at infinityMidpointProjective stratificationRectificationSimilarity