What survives

Five marks and the sixth

Five points determine a conic exactly — five coefficients up to scale, five equations, nothing left over — so a fit through five marks on a photograph is not a fit at all. The sixth mark, withheld, lands on the curve to 1.9e-13 px. And the moment a sixth mark is used, the arithmetic changes character completely: it becomes a least-squares problem, and the residual starts telling you something the five could never say.

Worth reading first: The conic a circle becomes · The circle whose centre moves.

A general conic has six coefficients and they matter only up to a common scale, so it has five degrees of freedom. Five points impose five linear conditions. The arithmetic closes exactly: five marks on a photograph determine one conic, with nothing left over and no choice made anywhere.

That is a familiar counting argument and it is worth doing something with rather than reciting. What follows is what the count actually buys, what it does not, where it fails, and what changes the instant a sixth mark joins the fit.

Five marks fix the conic, and the sixth is a predictionFive marks on a photographed circle determine one conic — five points and five coefficients, with no fitting left over. The sixth mark was withheld from the fit and the conic passes 1.9e-13 px from it. Nothing about the camera, the circle's size or the plane it lies in was used.horizon25withheldfive marks fitted, one withheldcorrect from 26 cm, at 160 mm widethe withheld mark is 2e-13 px off the fitted conic
Fig. 1 Five marks on a photographed circle, the conic they determine, and a sixth mark that was withheld from the calculation entirely. The curve passes 1.9e-13 px from it. Nothing about the camera, the circle’s size, or the plane it lies in was supplied.

The count, and what makes it exact

Write the conic as

Ax2+Bxy+Cy2+Dx+Ey+F=0.A x^2 + Bxy + Cy^2 + Dx + Ey + F = 0.

Multiplying every coefficient by the same number changes nothing, so the object is a point in a five-dimensional projective space. Each point (xi,yi)(x_i, y_i) that must lie on the conic gives one linear equation in the six coefficients. Five points give five equations, and a five-by-six homogeneous system generically has a one-dimensional null space — one conic, up to the scale that was never meant to matter.

The word “generically” is doing real work there and it is the subject of a later section. Take it at face value for now.

What is worth noticing immediately is that this is not a fit. There is no residual to minimise, no compromise between marks, and no sense in which some marks matter more than others. The conic through five points is as determined as the line through two.

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.horizonABCDon the groundin the picturelength AB1.00011.3930ratio AB:CD0.56670.6837cross-ratio1.31681.3168correct from 26 cm, at 160 mm wide34° across
Fig. 2 The habit the whole site is built on, and the reason a conic through five points is worth anything. A projection destroys length and the ratio of lengths; it does not destroy the cross-ratio, and it does not destroy degree. The image of a curve of degree two is a curve of degree two, which is what makes “the conic through these five marks” a statement about the world rather than about the drawing.

The withheld mark

A count is not evidence. The test is whether the conic through five marks passes through a sixth that had no say in it.

Six points are taken on a circle in the world, all six are projected, and five of them are handed to the solver. The sixth is measured against the answer afterwards, along the curve’s own normal so the number is a distance in pixels rather than an algebraic residual whose units depend on how the conic was scaled.

It comes back at 1.9e-13 px.

That number is arithmetic, not geometry, and saying so is the point. The five marks did not approximately determine the sixth; they determined it, and what is left is the accumulated rounding of a few dozen floating-point operations.

Five marks fix the conic, and the sixth is a predictionFive marks on a photographed circle determine one conic — five points and five coefficients, with no fitting left over. The sixth mark was withheld from the fit and the conic passes 7.9e-14 px from it. Nothing about the camera, the circle's size or the plane it lies in was used.horizon5withheldfive marks fitted, one withheldcorrect from 20 cm, at 160 mm widethe withheld mark is 8e-14 px off the fitted conic
Fig. 3 The same test at a different circle and a wider lens. Nothing about the arrangement is special: the withheld mark lands on the curve whatever the radius, the field of view, or where on the circle the marks were taken.

What five marks leave open

The counting argument is exact and it is also modest, and the modesty is easy to lose.

Five marks determine the conic. They do not determine the circle. They do not say how big it was, how far away it was, or which way its plane was tilted; they do not say whether the thing photographed was a circle at all.

That last one deserves care, because the phrase “the conic through five marks on a photographed circle” quietly contains an assumption that the arithmetic never used. The solver was given five image points and returned the conic through them. It would have returned a conic through five marks on a photographed ellipse just as happily, and the two results are indistinguishable — which they must be, since an ellipse in the world and a circle in the world can produce the same picture.

Two circles, differently tilted, drawing one pictureBoth are 6.4 m across and both are in front of the camera; their planes are 23.61° apart. Each draws the conic to 1.1e-16 on normalised coefficients, while a plane one degree from either draws one 2.5e-4 away — so the agreement is a measurement and the ambiguity is real. And the distance is free on top of that: at 1.7× the range the same picture is drawn by a circle 1.7× as wide.horizonflat on the groundleaning 23.6°two circles, 6.4 m across, in planes 23.6° apartcorrect from 26 cm, at 160 mm widetwo poses, 23.6° apart, one picture
Fig. 4 What the five leave open, drawn. Two circles of the same size, in planes twenty-four degrees apart, both in front of the camera, drawing one and the same conic. The five marks fix the curve completely and say nothing about which of these was there.

So the honest statement of the result has two clauses. Five marks fix the picture of the circle exactly, and fix nothing about the circle. The second clause is not a caveat on the first; it is a different and equally sharp fact, and it has an essay of its own.

Where five marks are not enough

The generic case is not the only case, and a solver that reports the exceptional one as an answer is worse than one that fails.

Five points determine a conic unless four of them are collinear. If four are on a line \ell, then every conic of the form “\ell together with any line through the fifth point” passes through all five — a whole pencil of degenerate conics — and the system’s null space is two-dimensional rather than one.

The failure is not a large residual. The solver returns a conic; it just returns an arbitrary member of a family, chosen by whichever direction the numerics happened to favour. Nothing about the answer looks wrong.

The guard is on the eigenvalue gap: the ratio of the smallest singular value of the design matrix to the next smallest. In the good case that ratio is tiny — the null space is genuinely one-dimensional and its companion is not. As four points approach collinearity the two collapse together, and the ratio is the quantity that actually degrades.

That is the same shape of failure this site has recorded before, in a homography fitted to four nearly-collinear shadow marks: a confident answer with a small residual, from a system that had nothing to say. The tell is never the residual. It is always the conditioning.

Two triangles in perspective from a pointCorresponding vertices lie on three lines through one centre. Pair off the corresponding SIDES instead and the three points where they meet are collinear — 7e-13 px from the line through them, at every configuration the slider reaches. Nothing was measured to make that happen, and nothing can be adjusted to improve it.three side intersections, collinear to 7e-13 pxcentrethree sides paired, three pointscollinear to 7e-13 px
Fig. 5 The neighbouring theorem, and the reason degeneracy is worth taking seriously in this subject. Desargues’ configuration closes exactly, on incidence alone — and the cases where it fails to close are exactly the degenerate arrangements, not the imprecise ones.
One correspondence moved 9 px, and where the damage wentThe clean fit is exact to 2.0e-13 px. Moving correspondence 4 by 9 px leaves every other point wrong too — the typical one by 0.10 px and the worst by 0.7 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.2000.4000.600010203040correspondenceepipolar error at every OTHER point, after one match is movedmedian 0.10 pxthe moved oneevery point wrong: median 0.10 px, worst 0.7 pxclean fit 2.0e-13 px
Fig. 6 The same lesson from the other end of the site. A single bad correspondence in an otherwise perfect set does not produce a slightly worse answer; it produces a confidently wrong one, and the residual it leaves is small enough to look like success.

The sixth mark, used

Now change one thing. Instead of holding the sixth mark back, put it into the calculation.

The arithmetic changes character completely. Six equations in six unknowns, homogeneous, and generically the only solution is zero — which is to say there is no conic through six points, in general. The six points a photograph of a circle supplies are not general, so a solution does exist; but the problem is now overdetermined, and the object the solver returns is the smallest-eigenvector solution of a least-squares problem rather than a null vector.

Three things follow, and each is useful.

There is now a residual, and it means something. With five marks the residual is identically zero and carries no information. With six it is the amount by which the marks fail to lie on any one conic, which is a measurement of the marks rather than of the solver.

The residual is a test of the assumption. Six marks on a genuine circle give a residual at arithmetic noise. Six marks on something that is not a conic at all — a rounded rectangle, a hand-drawn oval, a curve with a flat on one side — give a residual that is not, and the size of it says how far from conic the thing was.

And more marks buy accuracy against noise. A mark located to within a pixel makes the five-point answer wrong by roughly a pixel’s worth. Twenty marks around the same curve average that down, and the improvement is the ordinary square-root one.

So five is the number at which the problem is determined, and it is almost never the number to use. This is the same trade the site meets in every recovery it makes: the minimal solution is what proves the theorem, and the overdetermined one is what a reader with a photograph should actually compute.

k₁ recovered from 5 bent lines and nothing elseThe fit is never shown the coefficient, the camera or the scene — only which sets of points came from straight edges. It returns -0.220000000 against a true -0.220000, off by 3e-15, and straightens its own input to 3e-13 px.fitted k₁ = -0.220000true -0.220000, off by 3e-15
Fig. 7 The same trade in the lens field, where it is unavoidable. A distortion coefficient recovered from the knowledge that some edges were straight — far more measurements than unknowns, fitted rather than solved, and the residual is what says whether the model was right.
Where the adjustment stops, and why the two curves stop in different placesBoth runs start from the same chained initialisation and move every camera and every point at once. Given exact correspondences the error falls to 1.9e-12 px, which is arithmetic rather than geometry. Given the same points read to 0.35 px it falls from 0.75 px to 0.1196 px and stays: no camera track and no scene reproject quantised marks exactly, and a solver that reached zero on them would be fitting the rounding.-10-50012345iterationreprojection error (px, log scale)exact marksread to 0.35 px0.75 px → 0.1196 px in 5 iterationsexact marks reach 1.9e-12 px
Fig. 8 And at the largest scale the site works at. Thousands of measurements, a few hundred unknowns, and an adjustment that converges — the far end of the road that starts with five marks and one conic.

Why five points, projectively

There is a second way to see the number five that explains why it is not four or six, and it is worth having because it makes the result look inevitable rather than lucky.

A conic in the projective plane is a symmetric 3×33\times3 matrix up to scale: six entries, minus one for the scale, is five. That count is projectively invariant — it does not change under any projectivity — which is why the same number governs a circle, an ellipse, a hyperbola and a pair of lines. They are one object in five dimensions, and the affine names are labels for where the object sits relative to a chosen line.

The five conditions are equally projective. “This point lies on this conic” is an incidence, and incidences survive projection. So the entire statement — five marks, one conic, exactly — is a projective statement, and it can be made on a photograph without knowing anything about the camera. That is the property that makes it usable.

Four constructions, three of them the same mapA shadow, a floor anamorph, a mirror and a rectification, each decomposed into its fixed points and lines. Three are central collineations with a line of fixed points; the fourth is not, and that is the difference between changing a picture and changing where it is seen from.constructionfixed structurea shadow, ground to floorhomology · ratio 0.6719a floor anamorphhomology · ratio -1.4815a mirror in a vertical planehomology · ratio -1.0000a rectificationgeneral · three fixed points3 of 4 are centrala line of fixed points is what they share
Fig. 9 The census of what survives a map of the plane, which is the frame this argument sits in. A conic goes to a conic; a point on a conic stays on it; a tangent stays a tangent. What does not survive is every one of the affine names.
Three circles on one ground, and the three conics they drawThe same camera and the same ground. The only thing that differs between the rows is how far the nearest point of the circle is from the plane through the eye — 4.95 m, 0.37 m, -2.98 m — and that alone decides whether the picture is an ellipse, a parabola or a hyperbola.circlenearest point, past the eye planeB² − 4ACthe picture isradius 4.00 m, wholly beyond the eye+4.951 m-1.61e-1ellipseradius 8.62 m, just touching it+0.372 m-1.58e+0ellipseradius 12.00 m, crossing it-2.978 m1.65e-1hyperbolaone camera, 34° across, eye 8.78 m from the centreellipse · ellipse · hyperbola
Fig. 10 And the affine names themselves, on one camera and one ground. The same five-point count applies identically to all three rows — the solver does not know or care which one it has produced.

Five marks, and the pencil they can fail to leave

It is worth drawing the degenerate case rather than only describing it, because what makes it dangerous is that it looks like the good case.

Put five marks on a photograph so that four of them fall on one straight edge — a kerb, a window mullion, the join between two paving slabs — and the fifth anywhere else. Every conic consisting of that straight line together with any line through the fifth mark passes through all five. There is a one-parameter family of answers and the solver returns one of them.

What the returned conic looks like is a pair of crossing lines, which is a perfectly legitimate conic and is exactly what the marks describe. The mistake is not in the arithmetic; it is in having asked five marks a question that needed a different five.

The practical rule follows from the failure rather than from taste: spread the marks around the curve. Four on one side and one on the other is nearly the degenerate case and inherits most of its conditioning, even though no four are exactly collinear. The eigenvalue gap says how nearly, and it is the number to look at before the residual.

Five marks fix the conic, and the sixth is a predictionFive marks on a photographed circle determine one conic — five points and five coefficients, with no fitting left over. The sixth mark was withheld from the fit and the conic passes 9.7e-14 px from it. Nothing about the camera, the circle's size or the plane it lies in was used.horizon12345withheldfive marks fitted, one withheldcorrect from 30 cm, at 160 mm widethe withheld mark is 1e-13 px off the fitted conic
Fig. 11 A tighter circle at a longer lens, where the marks crowd into a smaller part of the frame. The withheld mark still lands on the curve — the theorem does not degrade — but the conditioning does, and on a photograph with a pixel of uncertainty in each mark that is where the accuracy goes.

Doing it on a real picture

The construction is worth stating as a procedure, because it is one of the few things in this subject that a reader can carry out with a photograph and a straightedge and get an answer that is exactly right.

Mark five points on the curve. Anywhere on it. There is no need to find its ends, its axes or its centre — none of those survive projection anyway, so a method that needed them would be asking for something the picture does not contain.

Solve the five-by-six system. By hand this is a determinant; the conic through five points is the vanishing of a six-by-six determinant whose first row is (x2,xy,y2,x,y,1)(x^2, xy, y^2, x, y, 1) and whose other five rows are the same expressions at the marks.

Then use it as a curve. The conic can be intersected with any line in the picture, tangents can be dropped to it from any point, and its pole–polar relation can be constructed with a straightedge — all of which are things about the world, transported through the picture, and none of which needed the camera.

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. 12 What a conic in a picture is good for once it is there. The polar of a point, built from two secants and four joins — no length, no angle, no midpoint — and agreeing with the algebra to arithmetic noise.
The polar is the chord of contact, so it hands over the tangentsThe point is outside the conic, so its polar cuts the curve, and the two crossings are exactly where the tangents from the point touch. Both are found with a straightedge — the construction never measures anything — and they agree with the algebraic polar to 4.0e-13.the pointone point, one conicconstructed and computed agree to 4e-13
Fig. 13 And the same construction handing over the two tangents from an outside point, which is the chord-of-contact reading of the polar. Everything here is available from five marks and a ruler.

The determinant, written once

For a reader who wants the answer rather than the machinery, the conic through five marks is one determinant. Set

x2xyy2xy1x12x1y1y12x1y11x52x5y5y52x5y51=0.\begin{vmatrix} x^2 & xy & y^2 & x & y & 1 \\ x_1^2 & x_1y_1 & y_1^2 & x_1 & y_1 & 1 \\ \vdots & & & & & \vdots \\ x_5^2 & x_5y_5 & y_5^2 & x_5 & y_5 & 1 \end{vmatrix} = 0.

Expanding along the top row gives the six coefficients directly, as five-by-five minors of the marks’ own coordinates. It vanishes at each mark because the determinant then has two equal rows, which is the whole proof, and it degenerates to nothing when four marks are collinear because the corresponding rows become linearly dependent — the same failure the eigenvalue gap detects numerically, seen algebraically.

What the number five is really counting

One last reading, and it is the one that connects this essay to the rest of the field.

Five is the dimension of the space of conics. Every constraint that cuts that space down by one is worth the same amount, and a point on the curve is only the most obvious kind. A tangent line is worth one too — a conic tangent to five given lines is equally determined, by exactly the same count in the dual plane. So is “passes through this point with this tangent direction”, which is worth two.

Which is why the circular points are worth so much. They are two points that every circle passes through, so knowing that the thing photographed was a circle is worth two of the five conditions before any mark is made — and three marks on a photographed circle determine the conic, provided the plane’s horizon is known.

That is not a saving in effort. It is the reason a photographed circle calibrates a camera and a photographed ellipse does not: the two conditions the roundness supplies are the two that carry the metric information, and they are on the horizon.

Two points, and everything metric followsThe imaged circular points are where the horizon meets the image of any circle in the plane, and they are a conjugate pair — the first coordinate here is 169.5 − 497.2i. A rectification built from them and nothing else returns the world's angles to 7.1e-14° and its length ratios to 2.4e-15, and no length at all.horizonthe horizon does not cut the circle — the pair is complexrectified from the two points aloneangles: 7.1e-14°ratios: 2.4e-15length: —circle of radius 1.60 ma dash is a quantity two points cannot buy
Fig. 14 The two conditions roundness is worth. They sit on the plane’s horizon, they are the same two for every circle in the plane, and they are what a rectification is computed from.
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. 15 And where those two conditions sit in the ladder from a projective picture to a metric one. Five marks buy the curve; the two points buy the world.
A 12.8 m circle on the ground, seen from outside itThe whole conic is drawn, including the part no camera can photograph. Every point of the circle is at least 2.57 m beyond the plane through the eye, so the image is an ellipse and the camera can see all of it. B² − 4AC = -2.61e-1.horizonthe eye stands 8.78 m from the centrecorrect from 26 cm, at 160 mm wideellipse · nearest point +2.57 m
Fig. 16 A circle at a radius between the two the table above uses. The five-point count is indifferent to it: the conic through five marks is exact whatever the circle was doing relative to the eye.
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 1e-15 relative.recovered principal pointused to drawrecoveredgapfocal length1001.951001.951e-15principal x345.0345.08e-13angle38.0°38.0°correct from 23 cm, at 160 mm wide38° across
Fig. 17 The same trade made with edges instead of a curve: three vanishing points found in the picture give back the camera that made it. Counting constraints against unknowns is the whole method, and five is simply the conic’s number.

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.

CircleConicdegrees of freedomdesign matrixDiscriminantDualityEigenvaluesHomographyleast squaresnecessary, not sufficientpoint at infinityProjective mapsingular valuesTangent