What survives

The triangle a camera cannot move

Three mutually perpendicular directions give three vanishing points, and that triangle is self-polar with respect to the image of the absolute conic — to 3.1e-13 px, with no length and no angle anywhere in the statement. Turn one direction two degrees out of square and the polars miss their sides by 65.8 px. The statistic this collection has been printing as evidence for the same claim, meanwhile, is an identity that cannot fail.

Worth reading first: The polar with a straightedge · One conic calibrates the camera · Recovering the camera from the picture it drew.

Three mutually perpendicular directions give three vanishing points, and their orthocentre is the principal point. That is the collection’s oldest recovery and it is stated in metric language throughout: an orthocentre, a dot product, a square root, a focal length in pixels.

There is a version of the same fact with no metric quantity in it at all. The three vanishing points form a triangle, and that triangle is self-polar with respect to the image of the absolute conic — the polar of each vertex is the opposite side, exactly. No length appears, no angle appears, and no square root appears. It is a statement about a conic and three points, which is to say a statement a projective plane can make.

The triangle is also, in a sense worth being literal about, immovable. Rotate the camera and the three vanishing points all move; the self-polarity does not stop holding. Change the lens and they move again; it still holds. What fixes the triangle is not where anything is but that the three world directions are mutually perpendicular, and that is a fact about the scene which no operation on the camera can alter.

All three vanishing points are off the paper, at up to 1213 px from its centreThe photograph at its own size: a box whose three sets of edges run along three mutually perpendicular directions, with each set continued towards where it converges. All three vanishing points are outside the picture, the furthest 1213 pixels from the centre of a 690 pixel frame. That is the ordinary case rather than an awkward one — a box photographed corner-on puts every vanishing point about one and a half focal lengths out — and it is why the triangle this essay is about is a construction on the drawing board rather than a thing anybody sees in a picture.correct from 20 cm, at 160 mm wide3 of three vanishing points off the paper
Fig. 1 The photograph at its own size: a box whose three sets of edges run along three mutually perpendicular directions, each set continued towards where it converges. All three vanishing points are outside the picture, the furthest 1213 pixels from the centre of a 690 pixel frame. That is the ordinary case rather than an awkward one — a box photographed corner-on puts every vanishing point about one and a half focal lengths out — and it is why the triangle this essay is about is a construction on the drawing board rather than anything a viewer sees.

The constraint, drawn where it fits

The first thing to say about the triangle is that it is almost never in the picture, which is why it has to be drawn at a reduction to be seen at all.

The triangle is self-polar to 3.1e-13 px and its orthocentre is the principal point to 1.4e-13The same photograph reduced 3.4 times, so all three vanishing points fit on the page; the small rectangle is the picture itself. The three points form a triangle, and that triangle is self-polar with respect to the image of the absolute conic — the polar of each vertex is the opposite side, to 3.1e-13 pixels. Its orthocentre, marked, is 1.4e-13 pixels from the camera's own principal point. No length and no angle appears anywhere in the statement, which is what makes it the calibration constraint written projectively.the photographv1v2v3orthocentre = principal pointcorrect from 4 cm, at 30 mm wideself-polar to 3.1e-13 px · orthocentre 1.4e-13 px
Fig. 2 The same photograph reduced 3.4 times so that all three vanishing points fit on the page; the small rectangle is the picture itself. The three points form a triangle, that triangle is self-polar with respect to the image of the absolute conic to 3.1e-13 px, and its orthocentre — marked — is 1.4e-13 px from the camera’s own principal point. No length and no angle appears anywhere in the statement.

A note about the small figures on the strip under that drawing, because they are meant to look odd and are not a mistake. Every figure here prints the distance a reader must stand at for the picture to be geometrically correct, computed from its focal length and the width it is displayed at. A diagram that draws the camera’s frame 3.4 times smaller than the canvas has made the picture 30 millimetres wide rather than 160, so the distance it is correct from is 4 centimetres rather than 20. Printing the unreduced figure would overstate the viewing distance by the whole reduction, which is precisely the class of quiet wrongness this collection tries not to ship.

The reduction is also the honest answer to a question the drawing raises on its own. A construction whose object sits four times the frame’s width outside the frame is not something a draughtsman does on the print; it is something done on a much larger sheet with the print pasted in one corner. Three-point perspective laid out with a straightedge runs into the same fact from the drawing side, and a drawing has three horizons is the same triangle read as three lines rather than three points.

What a conic with no real points does to three points

The image of the absolute conic cannot be drawn. It has no real points — it is the image of a conic on the plane at infinity whose equation has no real solutions, which is why the two points a photographed plane hides are a complex conjugate pair rather than two marks. What can be drawn is what it does to points that are real.

Each vertex's polar is the opposite side, to 3.1e-13 pxThe image of the absolute conic has no real points, so it cannot be drawn; what can be drawn is what it does to the three vanishing points. Each vertex's polar with respect to it is the heavy line through the diagram, and each is laid over the triangle's opposite side. They agree to 3.1e-13 pixels. The same conic with a focal length fifteen per cent wrong puts them 195 pixels out, so the agreement is a measurement of the camera and not a property of any triangle and any conic.the photographv1v2v3principal pointcorrect from 4 cm, at 30 mm widepolars 3.1e-13 px from their sides
Fig. 3 What the invisible conic does to the three visible points. Each vertex’s polar with respect to it is the heavy line through the diagram, and each is laid over the triangle’s opposite side; they agree to 3.1e-13 px. The same conic built at a focal length fifteen per cent wrong puts them 195 pixels out, so the agreement is a measurement of this camera rather than a property of any triangle and any conic.

A polar is a line a conic assigns to a point, and the collection builds one with two secants and a straightedge when the conic is real and drawn. When it is not drawn the polar is still perfectly well defined: it is ωv\omega\,\mathbf{v}, one matrix product, where ω\omega is the conic’s matrix. The construction is unavailable and the object is not.

Self-polar means all three at once. The polar of v1v_1 is the line v2v3v_2v_3, the polar of v2v_2 is v3v1v_3v_1, and the polar of v3v_3 is v1v2v_1v_2 — which is the same as saying every pair of vertices is conjugate, viTωvj=0v_i^{\mathsf T}\omega\,v_j = 0. That is three scalar equations, and it is the whole of what “these three directions are mutually perpendicular” says once the metric has been packed into ω\omega.

The control in that caption is the one that makes the reading a measurement. Build the same conic at a focal length fifteen per cent away from the true one and the polars come away from their sides by 195 pixels. The triangle has not moved; only the conic has, and the self-polarity is a relation between the two.

Why it is the absolute conic and not some other one

The conic is not chosen to make the statement work. It is the one conic every camera already has, and the collection has met it before from the other direction.

One conic, and the focal length falls out of itThe image of the absolute conic for a camera with square pixels is a circle of radius f about the principal point. Two vanishing points of perpendicular directions must be conjugate with respect to it, and solving that for f gives 812.769 px — the same number the orthocentre construction gives, and 1.1e-13% from the focal length the camera was built with.horizonprincipal pointv_zorthocentre: 812.7691 px · vᵀωu = 0: 812.7691 pxconjugacy residual 5.9e-10 in focal-length unitscorrect from 19 cm, at 160 mm wide46° across
Fig. 4 The same object approached from the focal length, from the essay that identified it. For a camera with square pixels the image of the absolute conic is a circle of radius ff about the principal point, and two vanishing points of perpendicular directions must be conjugate with respect to it. Solving that for ff gives 812.7691 px, and the orthocentre construction gives 812.7691 px, with a conjugacy residual of 5.9e-10 in focal-length units.

Two vanishing points and the conjugacy condition give the focal length; three give the principal point as well. So the orthocentre construction and the self-polar triangle are not two facts about the same arrangement — they are one fact stated twice, once with a square root in it and once without.

Which of the two statements to reach for depends on what is wanted. The metric one returns a number a photographer would recognise. The projective one returns a relation, and relations compose: a self-polar triangle survives any projective transformation of the picture applied to the conic as well, so cropping, an affine warp of the sensor, or a change of image coordinates leaves the statement intact while changing every quantity in the metric version. That is the same reason the principal point moves when a picture is cropped and the focal length does not.

The control: two degrees out of square

An essay about a condition owes the case where the condition fails, and here the failure has a dial on it.

Turned 2.0° out of square, each polar misses its side by 65.8 pxThe image of the absolute conic has no real points, so it cannot be drawn; what can be drawn is what it does to the three vanishing points. Each vertex's polar with respect to it is the heavy line through the diagram, and each is laid over the triangle's opposite side. With the third direction 2.0 degrees out of square the polars have come away from the sides, by 65.8 pixels at worst, and the orthocentre has left the principal point by 43.8.the photographv1v2v3principal pointcorrect from 4 cm, at 30 mm widepolars 65.8 px from their sides
Fig. 5 The third direction turned 2.0 degrees out of square, everything else unchanged. The polars have come away from the sides they were lying on — by 65.8 px at worst — and the orthocentre has left the principal point by 43.8. Two degrees is a small enough departure that no reader would see it in the box itself, and the diagram separates visibly.

The reading is worth putting in the units a reader would care about. Sixty-five pixels on a 690 pixel frame is a tenth of the picture’s width, produced by a departure from square that nothing in the box gives away — the drawn edges of a two-degree-out box look like the drawn edges of a box. So the construction is not merely detecting the failure, it is amplifying it by a large factor, and the amplification is what makes a straightedge test on a drawing worth running at all.

Two degrees is chosen because it is about the accuracy with which a real object is square. A cabinet, a room, a shipping container and a brick wall are all a fraction of a degree out at best, and a hand-drawn box is worse. So the interesting question is not whether the constraint detects a badly non-orthogonal triad — it obviously does — but what it reads on things that are nearly square, and the answer is that a departure invisible in the drawing is 65.8 pixels in the construction.

That is a lever rather than a threshold, and the lever’s length is worth knowing because it is where the sensitivity comes from. The vanishing points sit about one and a half focal lengths from the principal point, so turning a direction by a small angle moves its vanishing point by roughly the focal length times that angle in radians — about fifteen pixels a degree at this camera. The polars move further than the points do, because a polar is a line through a construction that amplifies the displacement of the point it belongs to.

A ramp, not a switch

Two settings are two points. The relation between the reading and the thing it reads is what makes the reading a measurement.

Half a degree out of square is 11 px of self-polarity and 7 px of principal pointBoth readings against the departure from square, and both are straight lines through the origin — so the constraint is not a yes-or-no test but a measurement, and a reader can put a number on how far three drawn directions are from being perpendicular. At zero the readings are 3.1e-13 and 1.4e-13 pixels, which is the arithmetic floor. What is deliberately not plotted is the spread of the three focal lengths the three pairs of vanishing points give, because it is identically zero for every triangle whatever: the orthocentre makes the three dot products equal by construction, so their agreement is an identity and not evidence of anything.010020030002468how far the third direction is turned out of square, in degreeshow far each reading is out, in pixelsthe polars leave their sidesthe orthocentre leaves the principal pointboth readings are linear in the departure from square3.1e-13 px at zero
Fig. 6 Both readings against the departure from square, and both are straight lines through the origin — half a degree out of square is 11 px of self-polarity and 7 px of principal point. At zero the readings are 3.1e-13 px and 1.4e-13, which is the arithmetic floor. So the constraint is not a yes-or-no test: a reader can put a number on how far three drawn directions are from being mutually perpendicular.

Linear through the origin is the best shape a control can have. It means there is no threshold below which the departure is invisible and none above which the reading saturates over the range that matters, and it means the two readings — the self-polarity in pixels and the orthocentre’s distance from the true principal point in pixels — carry the same information in a fixed ratio. Either can be used and the other is a check on it.

What that plot deliberately does not carry is the statistic this collection has been quoting for the same purpose since its foundations were laid, and the reason it does not is the finding this essay was written for.

The statistic that cannot fail

The recovery returns three focal lengths, one from each pair of vanishing points, and reports their spread. Its documentation offered the spread as evidence: a construction that is not a projection of a rectangular box gives three different answers, and the spread is how far from being a box it is.

That is false, and it is false by algebra rather than by an error in the code.

The principal point PP is computed as the orthocentre of the triangle. For the orthocentre, the segment BPBP is the altitude from BB and is therefore perpendicular to ACAC, so

(AP)(BP)    (BP)(CP)  =  (BP)(AC)  =  0.(A-P)\cdot(B-P) \;-\; (B-P)\cdot(C-P) \;=\; (B-P)\cdot(A-C) \;=\; 0.

The same argument at the other two vertices makes all three dot products equal. The three focal lengths are the square roots of the same number, so the spread is zero — for every triangle, whatever it is a picture of, and whether or not there is a camera anywhere near it.

Measured rather than argued, over four thousand random triangles with no scene behind them, the worst relative spread is 4.9 × 10⁻¹³, which is the arithmetic floor. And with a genuine camera and a triad turned six degrees out of square, the spread reads 1.3 × 10⁻¹⁶ beside a recovered focal length 4.36 per cent wrong. The statistic sits at the floor while the quantity it is supposed to be vouching for goes several per cent astray, and at ten degrees out of square the focal length is nearly nineteen per cent wrong with the spread still at the floor.

This is the fifth time this collection has shipped a necessary condition evaluated at the one input where it cannot fail, and the first time the condition was arithmetic rather than a badly chosen sample point. Saying so is not a confession; it is the habit the collection runs on, and the reason the two readings plotted above are plotted instead.

What can falsify the box, and what cannot

The repair is not to compute the spread better. It is to notice what three vanishing points can and cannot decide.

Three points in general position always determine a camera. Given any triangle whose orthocentre falls inside it, there is a focal length and a principal point for which those three points are the vanishing points of three mutually perpendicular directions — so three vanishing points can never falsify the box hypothesis. The hypothesis has exactly as many degrees of freedom as the data, and a model with as many parameters as observations fits everything.

The spread becomes evidence the moment the principal point is fixed by something other than these same three points. A real photograph supplies that: the principal point of an ordinary camera is very nearly the centre of the frame, and taking it there rather than at the orthocentre makes the three conjugacy equations genuinely three rather than one written out three times. Measured that way on one camera, turning the third direction out of square gives a spread of 0.038 at two degrees, 0.078 at four, 0.12 at six and 0.20 at ten — monotone in the departure, and exactly zero at square, because at square the orthocentre is the image centre. The honest version takes the principal point as an argument for that reason, and the machinery here now carries it.

The general shape is worth extracting, because it is not about cameras. A residual computed at the parameters that minimise it is not a test of the model; it is a test of the solver. To test the model, the parameters have to come from somewhere else — a second view, a manufacturer’s specification, a fourth direction, a calibration done earlier. That is the same reason the round trip is worth quoting only because the recovery cannot see the camera, and the reason a projection that only ever runs forwards proves nothing about itself.

The refusal that does work

None of which makes the recovery vacuous, and the part of it that does reject is worth naming precisely because it is a straightedge statement.

For the three dot products to be negative — for a real focal length to exist at all — the orthocentre has to fall inside the triangle. A triangle with an obtuse angle has its orthocentre outside, one dot product comes out positive, and the recovery refuses rather than returning the square root of a negative number. That refusal has teeth: three directions sixty degrees out of square are rejected outright, and so is the two-point cube construction when its third direction is placed badly.

Read projectively, that condition is the self-polar triangle. A triangle is self-polar with respect to some real conic exactly when it is acute, and the conic is then the one whose polars are the opposite sides — which is why an acute triangle is the necessary and sufficient condition for three drawn directions to be a photograph of three perpendicular ones. The whole calibration constraint, stated with nothing but a straightedge: are the three vanishing points an acute triangle, and does the invisible conic that makes them self-polar have the focal length claimed?

The first half is a yes-or-no question a reader can answer on the drawing board with three lines. The second needs a number from outside.

What the constraint does not settle

Four limits, and the second is the one that decides whether any of this is usable on a photograph that came out of a camera rather than out of a projection written down.

It says nothing about the scene. The three directions are directions; a matchbox and a shipping container photographed with the same lens at the same attitude give the same three vanishing points and the same triangle. No size, no position and no distance is anywhere in the statement, which is the ordinary condition of everything a single view supplies.

It assumes the image of the absolute conic is a circle, and that is an assumption about the sensor rather than about the scene. A general ω\omega is a symmetric three-by-three matrix up to scale, so it has five degrees of freedom: focal length, principal point, an aspect ratio and a skew. Three conjugacy equations from three perpendicular directions are three constraints, which is two short. The reduction to a circle spends those two by asserting square pixels and no skew — true of essentially every modern sensor and false of anything anamorphic, of a scanned frame stretched in one axis, and of a drawing whose maker was not thinking about pixels at all. Where it is false, three vanishing points do not determine the camera and the self-polarity holds against a conic nobody can write down.

It assumes straight world lines are drawn straight, which a real lens does not do. A lens bends them and the bend is largest at the frame’s edge, exactly where the long edge bundles that locate a distant vanishing point are. The cross-ratio does not survive it either, so the correction has to come first and is a separate problem.

And it needs three finite vanishing points. A camera held level photographing a box with vertical edges sends the vertical direction to infinity, the triangle degenerates, and the one-, two-, three-point vocabulary is counting exactly how many of the three are available. A two-point picture supplies one conjugacy equation and therefore a focal length only if the principal point is assumed.

Where the triangle actually sits

The last observation is about the object rather than the constraint, and it is the reason the first figure in this essay is the photograph rather than the diagram.

Three perpendicular directions leave a triangle whose circumradius is smallest when the triad’s body diagonal runs along the optical axis, and even then the vertices sit about 2\sqrt{2} focal lengths out — 1213 pixels from the centre of a 690 pixel frame here, which a search over the triad’s attitude confirms is the best this camera can do. Every other attitude throws one vanishing point further out, and a nearly-frontal box throws one to infinity.

So the object the constraint is about is essentially never inside the picture it is a constraint on. A reader looking for the self-polar triangle in a photograph will not find it; it lives on the surrounding sheet, at a scale where the photograph is a postage stamp. That is not a defect of this arrangement — it is why the pole of the horizon and the pairing that makes two directions perpendicular are also constructions rather than sights, and why a self-polar triangle turns up in six points of a conic as the diagonal triangle of a quadrangle, in a configuration with no camera in it at all.

One relation, three settings, and in the case a camera provides, an object drawn four times outside its own frame.

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 calibrationConicdegrees of freedomFocal recoveryinstrument limitnecessary, not sufficientOrthocentrepole and polarPrincipal pointSelf-polar triangleVanishing point