What survives

Perpendicular is a pairing

On a horizon, the vanishing point of a direction and the vanishing point of the direction at right angles to it are joined by a map that is its own inverse. Such a map has two degrees of freedom rather than three, so two pairs determine it — and its two imaginary fixed points are the focal length and the centre of the picture, handed back from two rectangles on one floor with nothing assumed.

Worth reading first: A line is a space of its own · The two points a picture hides · Recovering the camera from the picture it drew.

Two directions in the ground plane are at right angles. Each has a vanishing point on the horizon. So there is a rule taking a point of the horizon to another point of the horizon, and the rule is symmetric: apply it twice and the direction is back where it started.

A map that is its own inverse is called an involution, and it is not a curiosity. It is a two-parameter object where a general map of a line has three, and the missing parameter is worth a piece of machinery.

Perpendicularity pairs the horizon with itselfEach arc joins the vanishing point of a horizontal direction to the vanishing point of the direction at right angles to it. The pairing is its own inverse, which makes it an involution — a two-parameter object, so two pairs determine it and a third is predicted. The two black arcs are the input; the coloured one is predicted and lands 1.1e-13 px from where the camera puts it. The involution's fixed points are 318.00 ± 622.40i — imaginary, which is why nothing on a horizon is its own perpendicular — and those two numbers are the centre of the picture and the focal length.the horizonthe centre, 318focal 622.396 pxtrue 622.396 px
Fig. 1 The pairing, drawn as arcs across the horizon. Two of the arcs are given and the third is predicted, landing a tenth of a millionth of a millionth of a pixel from where the camera puts it.

Two pairs, not three

A line is a space of its own counts a projectivity’s freedom at three, so three pairs determine one. An involution is the subset with trace zero, which is one condition, leaving two.

So two pairs determine an involution, and a third pair is then a prediction rather than an input.

That is the whole of the operational content. A pair of perpendicular directions is a rectangle lying on the floor; two rectangles, at different angles, are two pairs; and two pairs are enough.

Two rectangles on one floor, and no assumption about the centreEvery route this site has had to a focal length needed three mutually perpendicular directions, or two and an assumed centre of the picture. Two rectangles lying flat on one floor at different angles give two pairs of perpendicular directions, an involution takes exactly two pairs, and its imaginary fixed points hand back both numbers at once: focal 622.3965 px against 622.3965, a gap of 1.1e-13, and the centre at 318.0000 against 318.0, a gap of 5.7e-14. The camera here is deliberately off-centre so that recovering the centre is a measurement rather than a coincidence.horizonthe centre, recoveredcorrect from 14 cm, at 160 mm widefocal 622.40 px · centre off by 5.7e-14 px
Fig. 2 Two rectangles on one floor, at twelve degrees and fifty-seven. Nothing else is given — no third direction, no vertical, and no assumption about where the centre of the picture is.

What the fixed points are

An involution’s fixed points come from a quadratic whose discriminant is negative — always, for this one, and the negativity is the geometry rather than an accident. A real fixed point would be a direction that is its own perpendicular, and there is none.

So the two fixed points are complex conjugates, at px±ifp_x \pm i f along the horizon.

The real part is where the centre of the picture falls on the horizon. The imaginary part is the focal length. Measured on a camera whose principal point was deliberately put off-centre so that recovering it would be a measurement: the focal length comes back to eleven decimal places and the centre to twelve.

Two rectangles on one floor, and no assumption about the centreEvery route this site has had to a focal length needed three mutually perpendicular directions, or two and an assumed centre of the picture. Two rectangles lying flat on one floor at different angles give two pairs of perpendicular directions, an involution takes exactly two pairs, and its imaginary fixed points hand back both numbers at once: focal 622.3965 px against 622.3965, a gap of 0.0e+0, and the centre at 318.0000 against 318.0, a gap of 0.0e+0. The camera here is deliberately off-centre so that recovering the centre is a measurement rather than a coincidence.horizonthe centre, recoveredcorrect from 14 cm, at 160 mm widefocal 622.40 px · centre off by 0.0e+0 px
Fig. 3 Two different rectangles on the same floor, giving the same two numbers. What is being fitted here is a two-parameter map, and the two parameters are the two numbers.

Those two points are not new to this site. They are the imaged circular points, which the two points a picture hides computes by intersecting the vanishing line with the image of the absolute conic, and which the whole metric upgrade of a plane consists of.

Arriving at them from a map of one line rather than from a conic in the plane is not a new theorem. It is a cheaper route, and cheap enough to change what is possible.

The refusal, and where the best two pairs are

Two things about the fit are worth having as numbers, because both are decisions a reader makes before computing anything.

The fixed points must come out complex. An involution of a line is a projectivity with trace zero, so its fixed points are the roots of a quadratic and they are either a real pair or a conjugate pair. Perpendicularity always gives the conjugate case — the fixed points are px±ifp_x \pm if and ff is real — so a fit returning real fixed points is a refusal: the pairs handed to it are not the images of perpendicular directions under any camera. That is the same statement as the dot product having to be negative, and it is the same statement as the arc of possible eyes existing; three ways of saying that a square root has to be of a positive number.

And the two pairs must be well separated as pairs. An involution has two degrees of freedom and two pairs supply two conditions, so the fit is exactly determined — and it degenerates when the two pairs coincide. A rectangle at azimuth θ\theta contributes the pair {v(θ), v(θ+90°)}\{v(\theta),\, v(\theta+90°)\}, and a second rectangle at θ+90°\theta + 90° contributes the same pair with its members swapped, which is no new information at all.

So the useful range of relative orientation is 0° to 90°, closed at both ends, and the best separation is the middle:

Two rectangles 45° apart on the floor determine the involution best, and two at 0° or 90° determine nothing.

That is a sharper version of the advice the proportion is the assumption reaches from the other side, where two rectangles at different angles were shown to fix the principal point and the focal length between them. The involution reading says which two: not merely different, but as near to 45° apart as the scene offers — and it explains why two rectangles that look reassuringly different, a rug and a table both aligned with the room, supply one pair between them.

The practical consequence for reading a photograph of an interior is worth spelling out, because rooms are built to a grid. Most rectangular features in a room share two directions — the walls’ — so a picture full of rectangles may contain exactly one pair, however many rectangles are in it, and the calibration is unavailable. What breaks the tie is something off-grid: a rug laid at an angle, an open door, a chair pushed round, a paving pattern set diagonally. A tidy room is a badly calibrated photograph, and the untidy feature is the one carrying the second pair.

A third pair, and what it is worth

With three pairs the system is over-determined by one, and the residual has the usual property of being worth more than the improvement: it tests whether the three rectangles really are rectangles and really are coplanar, which no amount of care in marking two of them can establish.

Its expected size under honest marking follows from the same separation argument — a third pair close to one of the first two contributes a small residual whatever is wrong, and one at 45° to both contributes a large one. So the third rectangle should be chosen for its angle exactly as the second was, and a reader with four rectangles at 0°, 2°, 45° and 47° has, for this purpose, two.

Written out

The relation itself is one line and it is worth seeing, because everything above is a reading of it.

Two directions are perpendicular exactly when their vanishing points v\mathbf{v} and u\mathbf{u} satisfy

(v−p)⋅(u−p)+f2=0(\mathbf{v} - \mathbf{p})\cdot(\mathbf{u} - \mathbf{p}) + f^{2} = 0

with p\mathbf{p} the principal point. For a level camera both points lie on a horizontal horizon that carries p\mathbf{p}, so the vertical components vanish and it collapses to

(x−px)(x′−px)=−f2(x - p_x)(x' - p_x) = -f^{2}

which is a Möbius map of the horizon’s own coordinate with x′x' a reciprocal of xx. Its matrix has trace zero by inspection, which is the involution; its fixed points solve (x−px)2=−f2(x-p_x)^2 = -f^2, which is the pair; and the minus sign is the reason the pair is imaginary.

The minus sign is not a convention. One conic calibrates the camera makes the same point about the same sign from the conic’s side: it is a refusal, and a positive right-hand side means no camera produces this picture from a rectangular object at all.

How loose the test has to be before perspective preserves measureThe count of systems the table calls measure-preserving, against the tolerance. It sits at 7 across nine decades and then steps to 9 when the tolerance passes 15.6% — the drift a real pinhole picture actually produces. The exclusion in the table above is a statement about that boundary, and this is where the boundary is.02.5057.50-8-6-4-20log₁₀ of the tolerance on midpoint driftsystems counted as preserving measureperspective admitted at 15.6%the exclusion, sweptthe boundary is measured, not chosen
Fig. 4 What that refusal looks like when it fires. The relation either has a solution or it does not, and the case with none is a statement about the drawing rather than about the arithmetic.

The third pair is a check, not an input

Two pairs settle the map, so a third rectangle on the same floor is spare — and spare is exactly what a measurement wants.

Fitted from two and predicted onto a third, the pairing lands a tenth of a millionth of a millionth of a pixel from where the camera puts it. That is the arithmetic floor, and it is a genuine round trip: the third rectangle’s orientation never entered the fit.

Perpendicularity pairs the horizon with itselfEach arc joins the vanishing point of a horizontal direction to the vanishing point of the direction at right angles to it. The pairing is its own inverse, which makes it an involution — a two-parameter object, so two pairs determine it and a third is predicted. The two black arcs are the input; the coloured one is predicted and lands 1.1e-13 px from where the camera puts it. The involution's fixed points are 318.00 ± 622.40i — imaginary, which is why nothing on a horizon is its own perpendicular — and those two numbers are the centre of the picture and the focal length.the horizonthe centre, 318focal 622.396 pxtrue 622.396 px
Fig. 5 The prediction made at a different third angle. The two input arcs are unchanged and the predicted one moves with the question, which is what distinguishes a prediction from a fit with a spare parameter.
Perpendicularity pairs the horizon with itselfEach arc joins the vanishing point of a horizontal direction to the vanishing point of the direction at right angles to it. The pairing is its own inverse, which makes it an involution — a two-parameter object, so two pairs determine it and a third is predicted. The two black arcs are the input; the coloured one is predicted and lands 1.1e-13 px from where the camera puts it. The involution's fixed points are 318.00 ± 622.40i — imaginary, which is why nothing on a horizon is its own perpendicular — and those two numbers are the centre of the picture and the focal length.the horizonthe centre, 318focal 622.396 pxtrue 622.396 px
Fig. 6 And with the two inputs changed instead. Any two pairs give the same involution, so which two rectangles were used is not a choice that affects the answer — only its conditioning.

On a real picture that spare rectangle is the whole of the quality control. A third pair that lands where the first two put it says the two rectangles really were rectangles and really were coplanar; a third pair that lands somewhere else says one of those was false, and says it without needing to know which.

What the cheap route buys

Every route this site has had to a focal length has needed one of two things.

Three mutually perpendicular directions — the orthocentre construction of recovering the camera, which is exact and needs a box.

Or two directions and an assumed principal point — the two-vanishing-point relation, which needs only a rectangle and needs to be told where the centre of the picture is.

The involution is the third route and it needs neither. Two rectangles lying flat on one floor, at different angles, give both numbers together — no vertical anywhere in the scene, and nothing assumed about the frame.

That matters because assuming the centre is the standing weakness of the second route. The principal point is not the centre measures what a shifted or cropped frame costs, and it is per cents rather than parts per million.

The condition, and it is a real one

The two numbers can be read straight off the horizon only when the camera is level — when the principal point lies on the horizon at all.

That is not a technicality and it is the honest limit of the cheap route. Tilt the camera by a degree and the recovered focal length is a tenth of a pixel out; by nine degrees and it is eight pixels out.

The level camera is a condition, and this is what it costsReading the focal length off the horizon's involution assumes the principal point lies on the horizon, which is true when the camera is level and false as soon as it is not. Tilted by one degree the recovered focal length is out by 0.1 px; by 9.0° it is out by 7.8 px. The general statement — the imaged circular points of a plane are two constraints on the image of the absolute conic, whichever plane it is — survives; what does not survive is reading the two numbers straight off the line.0246802468tilt of the camera (degrees)error in the recovered focal length (px)exact when level8 px out at 9.0°
Fig. 7 The cost of the condition, swept. Exact at zero and growing smoothly with the tilt, which is what says the error is the tilt rather than the arithmetic.

What survives the tilt is the general statement rather than the shortcut. The involution still exists on any plane’s vanishing line, and its fixed points are still that plane’s imaged circular points. What stops being true is that the two parameters of the involution are the focal length and the horizontal position of the centre; on a tilted camera they are two combinations of three unknowns, and one plane no longer separates them.

Why an involution and not just a map

There is a temptation to skip the word. Perpendicularity gives a correspondence between points of the horizon; fit a general projectivity to it from three pairs and read off whatever comes out.

That would work and it would waste a rectangle. Worse, it would hide the structure: the fitted map would come back with trace zero every time and nothing would say why, and a fit with a parameter that is always the same value is a fit that has been asked the wrong question.

The word also imports a fact that would otherwise have to be rediscovered: an involution of a line is determined by two pairs, and its two fixed points are harmonically separated by every pair. So each rectangle’s two vanishing points are harmonic with the imaged circular points, which is a straightedge statement about a drawing and a construction a draughtsman could actually perform.

A wall works too, and says something else

Nothing above needed the plane to be the floor. Any plane has a vanishing line, any two perpendicular directions in it have vanishing points on that line, and the pairing is an involution.

A rectangle on a wall therefore gives a pair on the wall’s own vanishing line, and two rectangles on one wall give that wall’s imaged circular points.

What is new is what happens when the two planes are different. Each plane contributes two constraints on the image of the absolute conic, and the conic has three unknowns for a square-pixel camera, so one plane is short by one and two planes are over-determined by one. Two rectangles on the floor and one on a wall is therefore a complete calibration with a check left over, and it needs no vertical edge anywhere — which is worth knowing because the vertical is the direction a photograph most often has nothing straight along.

What this does not say

It says nothing about accuracy on a real picture. Every vanishing point here is exact because the drawing was made from a camera; on a photograph a vanishing point is fitted from edges that are nearly parallel, and the fit’s conditioning is the whole difficulty. Two rectangles at nearly the same angle give two nearly identical pairs and an involution that is nearly undetermined, exactly as two nearly parallel lines give a badly conditioned intersection.

It says nothing about non-square pixels. The identification of the imaginary part with the focal length assumes one focal length rather than two, and the pixel that is not square is what happens when that assumption is wrong.

And it does not replace the box. Three orthogonal directions give three constraints and settle all three camera unknowns; two rectangles on one plane give two, and the third — the height of the centre in the frame — comes from the levelness assumption rather than from the picture. Trading an assumption about the centre for an assumption about the camera being level is a trade rather than a saving, and which one is safer depends on the picture.

The three routes, side by side

It is worth putting the three next to each other, because what they need is more interesting than what they give.

The orthocentre route wants three mutually perpendicular bundles of edges. It gives the focal length and both coordinates of the principal point, over-determined, with a spread that measures how far the object is from being rectangular. It needs a box.

The conic route wants pairs of perpendicular directions, any number of them, in any planes, and solves a linear system for the image of the absolute conic. It is the general statement and the other two are cases of it.

The involution route wants two pairs in one plane and a level camera. It gives the focal length and the horizontal position of the centre, exactly, and says nothing about the vertical position because nothing in one plane’s vanishing line can.

All three return the same numbers on the same picture, which is the check that keeps them honest, and none of them is preferable in general. What decides is what the photograph happens to contain: a box, several planes, or one floor with two rugs on it.

One more pairing, on a different line

The involution here lives on a horizon and pairs directions at right angles. There is a second one in this collection’s machinery that lives on a pencil rather than on a range, and noticing that the two are the same kind of object is worth a paragraph.

Take a conic in a picture and a point. The lines through the point are a pencil — a projective line’s worth of them — and the conic pairs each line with another: the line and its conjugate, meeting the conic in a pair harmonic with the given point. That pairing is symmetric, so it is an involution of the pencil, and its two fixed lines are the tangents from the point.

The polar of a point, with a straightedge onlyTwo secants through the point cut the conic at four places. The other two diagonal points of the quadrangle they make are joined, and that line is the polar — agreeing with the matrix product to 2.0e-13. No length, no angle, no midpoint: only joins and crossings, which is why the whole construction survives the projection that made this picture.the pointone point, one conicconstructed and computed agree to 2e-13
Fig. 8 The construction that produces it. A point, a conic, and the polar line, built with a straightedge and no measurement, whose relation to the pencil through the point is exactly an involution.

When the point is inside the conic the tangents are imaginary, the involution has no real fixed line, and nothing in the pencil is its own conjugate — which is word for word the situation on the horizon, with a different conic and a different line.

So the two involutions this collection now uses are the same object twice: a symmetric pairing on a one-dimensional projective space, determined by two pairs, carrying its meaning in a pair of fixed elements that are imaginary exactly when the pairing has no self-conjugate member.

The transferable form

When a correspondence is symmetric, it has one fewer parameter than a general one — so it needs one fewer measurement, and its fixed set carries the meaning.

Symmetry is usually noticed and then not used. Here it is the difference between needing three rectangles and needing two, and between reading two numbers off a fitted map and reading them off a pair of conjugate roots that were already the objects the metric upgrade is made of.

The same move is available wherever a relation pairs things rather than ordering them: reflection in a mirror is an involution of the plane and this site’s own census finds it at a ratio of exactly minus one; conjugate diameters of a conic are an involution on the pencil of directions; and the pole–polar correspondence is an involution on the whole plane. Each of them costs one parameter fewer than the general map it sits inside, and each of them keeps its meaning in a fixed set rather than in a formula.

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.

Absolute conicCamera calibrationCircular pointsdegrees of freedomDemonstrationFixed pointFocal recoveryHorizonInvolutionPrincipal pointProjective lineProjectivityVanishing point