A model that inverts has a horizon instead of a fold
Worth reading first: Straight lines that are not · Which rule a fisheye obeys, from straightness alone.
A barrel model folds at a radius it sets itself finds the polynomial every calibration fits to a wide lens — the radius times one plus a coefficient times the radius squared — stops increasing at a radius its own first coefficient fixes. At a coefficient of −0.28 that is 47.49 degrees of field, and past it two directions land on one picture radius. The routine that undistorts pictures with it does not refuse there: it hands back wrong directions from 46.75 degrees, by as much as 106.5, and refuses only at 65.5.
A tilted sensor is not a distortion then found that the polynomial’s tangential companions describe a change of camera badly. Both are failures of one family of models, and there is another family in common use which fails differently.
A model chosen for one property
The division model writes the undistorted radius as the distorted one divided by one plus a coefficient times its square. It is used because that inverts in closed form: the inverse is a quadratic, and the admissible root is the one that goes to zero with its argument. No iteration, no convergence test, no failure to converge.
The polynomial has no such inverse. Undistorting a picture with it means solving for the radius numerically, which every calibration library does and which is where the silent failure of the earlier measurement lives.
So the two are usually compared on convenience. The question worth asking is what each one can represent, and the answer separates them more sharply than the convenience does.
One turns around; the other never does
Set both models to the same coefficient and draw them against the radius a pinhole would give.
The polynomial rises, reaches a maximum, and comes back down. At a coefficient of −0.42 the turn is at 0.89 focal lengths, which is 41.7 degrees of field, and past it the curve is two-valued: two directions land on one picture radius and the map is no longer a map from direction to picture.
The division model rises and keeps rising. At the same coefficient it approaches 1.543 focal lengths and never reaches it. That number is one over the square root of the coefficient’s magnitude, and it is a horizon rather than a fold: the whole infinite pinhole plane — which is the whole hemisphere of directions — lands inside a disc of that radius.
Nine tenths of the way out to the horizon is 82.2 degrees of field. So a model adopted because it inverts easily turns out to reach where the other cannot go at all.
The failure the polynomial has and this one does not
The earlier measurement’s finding is worth restating precisely, because the contrast is exact rather than rhetorical.
The polynomial’s radial map has a maximum. Past it the map is not injective, so undistorting is not a well-posed question — two directions are consistent with one picture radius and nothing in the picture says which. That is a defect of the model, not of the solver, and it is silent because the solver returns one of the two roots without complaint.
The division model’s map is monotone on the whole positive axis for a barrel coefficient. Checked at every hundredth of a focal length out to four hundred — a field no lens has — it never decreases, and its supremum is the horizon. So the inverse is unique everywhere and the closed form is not merely convenient but correct.
What the division model cannot do is represent a picture radius beyond its horizon. That is a constraint rather than a failure: any coefficient fitted to real data has a horizon outside the data, and if it does not, the fit has said something the data did not.
Fitted to a fisheye, over a field
Representing a wide field is the use that separates them, and every fisheye is a different rule supplies the four laws to fit: equidistant, equisolid, stereographic, orthographic.
Both models were fitted to each law by least squares, over fields from forty degrees to eighty, with two coefficients each so the comparison is like for like. The worst error is reported as a fraction of the picture’s own radius at the edge of the field.
Below sixty degrees the polynomial is the better model, by a factor of about two: 3.1 × 10⁻³ against 4.8 × 10⁻³ for the equidistant law at forty-five degrees. That is worth saying first, because it is why the polynomial is the standard choice and why the rest of this is about the edge rather than about the two families.
At seventy-five degrees the division model is better on every law, by factors of three to five: 5.5 × 10⁻² against 2.6 × 10⁻¹ for the equidistant law, 1.2 × 10⁻¹ against 4.9 × 10⁻¹ for the orthographic.
The residual is not the whole of it
The comparison above is a comparison of residuals and it understates the difference, because at those fields the polynomial is not a model any more.
The polynomial fitted to the equisolid law over seventy-five degrees folds at 61.7 degrees. Fitted to the orthographic law it folds at 58.9. So a fifth of the field it was fitted over is past its own fold, and over that part the curve it draws is not a map from direction to picture radius — it is a curve that happens to pass near the data while running back inward.
A fit does not notice. Least squares asks how far each sample is from the curve, and a sample near a curve that is coming back down is as close as one near a curve that is going up. Nothing in the residual says the model has stopped being invertible, and nothing in a calibration report usually does either.
So the honest statement is two-part: past seventy degrees the division model is better on the residual, and past sixty the polynomial has stopped being a model over part of its own data while its residual carries on looking respectable.
Why the two fail in opposite directions
The shapes of the two failures are worth naming, because they follow from one line each.
The polynomial’s radial map is a cubic in the radius, with a negative leading coefficient for a barrel lens. A cubic with a negative leading term must eventually come down, and the only question is where — which is what the coefficient decides. The fold is not a defect that a third or fourth coefficient repairs; it moves the fold and gives the curve another one further out.
The division model’s map is a ratio whose denominator grows faster than its numerator. It therefore tends to a finite limit rather than turning around, and the limit is where the denominator’s growth exactly cancels the numerator’s. Adding coefficients moves the horizon and does not create a fold, because the ratio stays monotone as long as the denominator stays positive.
That is the whole of it: a polynomial that must eventually decrease, against a ratio that must eventually flatten. Neither is more principled; they are different shapes, and the shape decides which fields each can describe.
Turn the sign round and the two exchange failures
The measurement so far is about a barrel lens, which is what a wide lens is. Pincushion distortion is the other sign, and running both models at a positive coefficient is the sharpest test of whether the difference above is about the two families or about barrel lenses.
It is about the families, and they swap.
A polynomial with a positive coefficient is a cubic with a positive leading term: it rises for ever and never folds. So the failure a barrel model folds at a radius it sets itself measures does not exist for pincushion at all.
The division model with a positive coefficient acquires the failure the polynomial has lost, in the opposite currency. Its inverse contains a square root whose argument goes negative past a finite undistorted radius: at a coefficient of 0.25 that radius is exactly one focal length, which is forty-five degrees of field, and beyond it no picture radius corresponds to any direction. The model does not fold; it runs out of world.
So the honest summary of the pair is not that one model is better behaved. It is that each has one limit, that the limits are in different currencies — a fold in the picture against a ceiling on directions — and that which of the two is limited is decided by the sign of a coefficient rather than by anything about lenses.
What each model owes a renderer
A headset renders a picture bent so its lens can straighten it, which is the one case in which distortion is introduced on purpose. The render is distorted on purpose measures that round trip closing to a thousandth of a millionth of a pixel, and the price in delivered pixels at the edge of the field.
The two models cost a renderer quite different amounts there. The division model’s forward direction — the one a renderer needs, from an undistorted direction to a bent picture radius — is the closed-form root, so the whole warp is arithmetic. The polynomial’s forward direction is the easy one and its inverse is the iteration, which is the direction a camera pipeline needs rather than a renderer.
So the choice between them is partly a choice about which direction is going to be run millions of times. That is a good reason to prefer one and it is not a reason to believe one, and the two get confused: a model adopted for the speed of one direction is then trusted about the field it can represent, which is a separate property and the one measured here.
Neither model touches the other thing a lens does. Straight lines that are not establishes that a radial map leaves exactly one family of lines straight — those through the principal point — and that is true of both models at every coefficient, because it follows from the map being radial and from nothing else. A lens destroys the invariant is likewise indifferent: the cross-ratio fails under either model by an amount set by the distortion rather than by its parametrisation.
What this means for a calibration
Three practical readings, and the third is the one that is not obvious.
Below about fifty degrees of half-field, use the polynomial. It is the better model there by a factor of two on every law tried, its fold is well outside the data, and it is what every toolkit expects.
Past about sixty-five, use the division model or a fisheye law directly. The polynomial’s fold is inside the data by then, and a fitted model that is not invertible over part of its own field will produce wrong directions from a picture rather than an error.
And check the fold as part of reading a calibration. The fold’s position follows from the coefficients alone — it needs no data and takes one line — so it can be computed from any calibration report and compared with the field the camera actually has. A report whose fold is inside its own field is telling its reader something, and nothing in a residual says it.
Fitting a lens from straightness alone and the lines that calibrate a lens measure how well the coefficient itself is determined by a picture; this adds the separate question of whether the model that coefficient belongs to can be inverted over the field it was fitted to, and the two are independent. A coefficient determined to nine parts in ten thousand, in a model that folds at sixty degrees, is a precise number in an unusable map.
How the horizon is found, and why it needs no data
One more property separates the two, and it is the one that makes the rule above checkable by a reader who has only a calibration report.
Both limits are properties of the coefficients alone. The polynomial’s fold is where the derivative of its radial map vanishes, which for a one-term model is at one over the root of three times the coefficient’s magnitude; the division model’s horizon is at one over the root of the coefficient’s magnitude. Neither needs a picture, a target, a residual or a camera — just the numbers a calibration prints.
That is unusual. Almost every claim a calibration makes needs the data back to check: whether the fit was good, whether the target filled the frame, whether the principal point was free. This one does not, and it takes two lines of arithmetic to convert a printed coefficient into a field angle past which the model has stopped describing anything.
The measurement above uses that in both directions. The fold angles quoted for the polynomial fitted to each law — 66.2 degrees for stereographic, 58.9 for orthographic — come from the fitted coefficients and not from the residuals, and they are what says the fit had stopped being a model before it stopped fitting. And a division model’s horizon, computed the same way, is what says whether its extrapolation past the fitted field is a hemisphere or something smaller.
What this does not settle
Only the radial part is compared. Both families have tangential companions, and a tilted sensor is not a distortion measures what those do when the departure they are asked to absorb is a change of camera rather than a lens. Nothing here asks whether a division model with tangential terms behaves any better in that case.
The laws are the targets rather than a lens. A real fisheye follows none of the four exactly, and fitting a model to a law measures the model’s shape rather than its performance on glass. What the comparison is entitled to say is which model can follow a wide, smooth, monotone curve to the edge of a hemisphere, which is a statement about the family.
And the two-coefficient comparison is one choice among several. A three-term polynomial fits better than a two-term one and folds somewhere else; a one-term division model is worse than a two-term one and has a simpler horizon. The comparison here holds the count equal, which is the fairest single choice and is not the only defensible one.
Still open: where the horizon should be put deliberately
The horizon is a consequence of the fitted coefficient here, and it need not be. A fit could be constrained to place the horizon at a stated field — ninety degrees, say, or a hundred — and asked for the best coefficients subject to that.
That is worth measuring because the horizon is the one thing the division model claims about directions it was never shown. A fit over seventy-five degrees puts the horizon wherever the residual likes, which for the equidistant law is not at ninety; so the model extrapolates to a hemisphere it has no evidence about, and a renderer using it outside the fitted field gets whatever the extrapolation says. The measurement asks how much residual a constrained fit costs inside the data, against how much better it behaves outside — and whether a model whose horizon is pinned at the physical limit of a hemisphere is measurably worse where it was fitted, or whether the constraint is nearly free and should simply be imposed.
The short version
The polynomial and the division model fail in opposite directions. The polynomial’s radial map turns around at a radius its own coefficient fixes — 41.7 degrees of field at a coefficient of −0.42 — and past it two directions land on one picture radius. The division model’s never turns around: it rises monotonically toward a horizon at one over the root of the coefficient, 1.543 focal lengths at the same setting, so the entire hemisphere of directions lands inside a finite disc and nine tenths of the way out is 82.2 degrees.
Fitted to the four fisheye laws with two coefficients each, the polynomial is the better model below sixty degrees by about a factor of two, and the division model is better past seventy by factors of three to five. At seventy-five degrees the polynomial has folded inside the field it was fitted to — at 58.9 degrees for the orthographic law — and its residual says nothing about it.
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.
- The lens a pavement can hide — both name brown–conrady, model error, radial distortion
- A fitted radius is wrong before it is uncertain — both name instrument limit, model error
- A floor with a referent — both name instrument limit, model error
- A mirror ball is an equal-area fisheye — both name field of view, fisheye
- A pane gives a product before it gives two numbers — both name instrument limit, model error
- A wedge of glass turns the camera behind it — both name camera calibration, model error
Named objects
A flat tag is an object no other essay names yet.
Barrel distortionBrown–ConradyCamera calibrationfield of viewFisheyeinstrument limitInverse projectionInvertibilityModel errorRadial distortion