Surfaces that are not flat

Shot on one surface, shown on another

Two picture surfaces are two charts of the same pencil of rays, so a reprojection between them is a change of coordinates and loses no geometry at all — bit-exact at all 408 sampled directions. What it costs lies elsewhere — 70 per cent of the source has nowhere to go, and the target wants ×5.49 the marks at its edge.

Worth reading first: When the picture surface is not flat · Every fisheye is a different rule · Where a surface spends its pixels.

A picture taken on one surface and displayed on another is an ordinary thing to want. A fisheye photograph shown rectilinear; an equirectangular panorama shown as a flat view; a cylindrical stitch flattened for print. The operation is called a reprojection and it feels as though it ought to lose something.

It loses no geometry whatever, and the reason is structural rather than fortunate. Both surfaces are charts of the same object — the pencil of rays through one point — so a direction that has a mark on one has a mark on the other, and the map between them is a change of coordinates. There is nothing in a picture but directions, and a change of coordinates does not disturb them.

Exact to the last bit at all 408 sampled directions, against 15.6° for the same pipeline with one inverse wrongA direction sent from the equidistant fisheye to the flat plane and back, plotted against how far off the axis it started. The departure is exactly zero at all 408 sampled directions — both surfaces are charts of the same pencil of rays and a reprojection between them is a change of coordinates, so there is no geometry to lose, and on this pair the direction that comes back is the identical number rather than a near one. The lower curve therefore sits on the plot's own floor of 10⁻⁶ arcseconds, which is a drawing convention and not a measurement. A floor is worth nothing without something it is not, so the upper curve is the same pipeline with one substitution — the reprojected picture read back through the source's own inverse instead of the target's, which is what a pipeline that has forgotten which surface it is on does. It produces a perfectly good picture and it is wrong by up to 15.6 degrees. Beyond 48° the target has no image at all and the measurement stops rather than continuing with a number.-5-2.5002.50510203040degrees off the optical axishow far a direction moves, in arcseconds (log)one inverse wrongthe reprojectionequidistant → rectilinear, and backbit-exact against 15.6°
Fig. 1 A direction sent from the equidistant fisheye to the flat plane and back, against how far off the axis it started. The departure is exactly zero at all 408 sampled directions — not small, but the identical number returning. The lower curve sits on the plot’s own floor of 10⁻⁶ arcseconds, which is a drawing convention rather than a measurement. The upper curve is the same pipeline with one inverse wrong, at 15.6°, which is what makes the floor a reading.

That control matters more than the result. A round trip returning its input is the easiest thing in this collection to achieve by accident — compose a map with something that is not quite its inverse and the errors can still cancel, and a pipeline that never actually consults the surfaces would also return its input perfectly. The 15.6° is the same machinery with one step replaced by a plausible wrong one, and it says the zero was produced by the geometry rather than by the plumbing.

So the price is not geometric, and there are two of them

If nothing is lost in the mapping, a reader is entitled to ask what the difficulty is, since reprojected pictures plainly do look worse. The answer is two prices, and neither is about the geometry of the map.

Reprojected exactly, to 3e-3 arcseconds — and 70 per cent of the source picture has nowhere to goThe same room shot on the equidistant fisheye at 180° across, and shown on the flat plane at 100°. Both surfaces are charts of the same pencil of rays through one point, so the reprojection is a change of coordinates and loses no geometry at all: a direction sent across and back moves by 3.1e-3 arcseconds, which is the arithmetic floor. The outlined region on the left is everything the right-hand picture can hold; the 65 per cent of the sky outside it, and the 70 per cent of the source picture's own area that carries it, is the whole of the loss and it is a loss of coverage rather than of geometry. What else changes is where the reader stands: the right-hand picture is correct from the distance printed below it, and the left-hand one has no such distance at all.shot on the equidistant, 180° acrossshown on the plane, 120° across56% of this picture has nowhere to gocorrect from 5 cm, at 160 mm widethe right-hand panel · 4e-3″ of geometry lost
Fig. 2 The same room shot on the equidistant fisheye at 180° across and shown on the flat plane at 100°. The reprojection is exact to 3.1 × 10⁻³ arcseconds. The outlined region on the left is everything the right-hand picture can hold, and the 70 per cent of the source picture’s own area outside it — carrying 65 per cent of the sky — has nowhere to go at all. That is the first price and it is a matter of coverage rather than of fidelity.

The first price is reach, and it is worth naming as a property of the target rather than as a failure of the operation. Every surface in this collection has a bound on how far off its axis it can put a mark, and the bound is a fact about the surface’s own law rather than about its size — a plane made a metre wide still cannot hold 90°.

The first price is reach. The plane cannot hold a half-turn of directions at any size, so a fisheye’s outer sky has no image on it. Nothing is distorted; those directions simply have no target. Widening the output frame recovers some of it and never all of it, because the plane’s reach is bounded by 180° and it approaches that bound at infinite width.

Reprojected exactly, to 4e-3 arcseconds — and 56 per cent of the source picture has nowhere to goThe same room shot on the equidistant fisheye at 180° across, and shown on the flat plane at 120°. Both surfaces are charts of the same pencil of rays through one point, so the reprojection is a change of coordinates and loses no geometry at all: a direction sent across and back moves by 4.3e-3 arcseconds, which is the arithmetic floor. The outlined region on the left is everything the right-hand picture can hold; the 50 per cent of the sky outside it, and the 56 per cent of the source picture's own area that carries it, is the whole of the loss and it is a loss of coverage rather than of geometry. What else changes is where the reader stands: the right-hand picture is correct from the distance printed below it, and the left-hand one has no such distance at all.shot on the equidistant, 180° acrossshown on the plane, 120° across56% of this picture has nowhere to gocorrect from 5 cm, at 160 mm widethe right-hand panel · 4e-3″ of geometry lost
Fig. 3 The same reprojection to a wider flat frame, 120° rather than 100°. The unused fraction of the source falls from 70 per cent to 56, and the exactness is untouched at 4.3 × 10⁻³ arcseconds. Coverage is bought back by widening the output, and the second price — which the next figures measure — goes up as it is.

What “the same pencil of rays” is claiming

The exactness rests on one sentence and it is worth unpacking, because it is the premise that fails in every case where a reprojection is not exact.

A picture, on any of these surfaces, is a rule assigning a mark to a direction. It is not a rule assigning a mark to a point of the world — depth never appears, and two objects on one ray are drawn on top of each other whatever their distance. That is the whole content of a pinhole projection, and it is what a line is a closed curve reads from the algebraic side: what a camera records is a set of directions through a point, and the surface is only the paper it is written on.

So two surfaces sharing a centre are two notations for one thing. Converting between them is like rewriting a number from decimal to binary: the notations differ in which properties are easy to read off, and the number is untouched. The reason there is nothing to lose is that there was never anything in the picture except directions, and the reprojection is a bijection on directions wherever both surfaces reach.

That also says exactly when the claim fails, and it is not subtle. It fails when the two pictures do not share a centre — a stitched panorama assembled from exposures about the wrong pivot, or a photograph of a photograph taken from somewhere else. Then there are two pencils rather than one, the map between them depends on the depth of what is being looked at, and no coordinate change can express it. A projection of a projection measures that case and finds a homography through a plane and something measurably not a homography through a curve.

The distinction is therefore sharp rather than a matter of degree. One centre: exact, depth-free, computable from the two surface laws alone. Two centres: depth-dependent, and the geometry is a different subject.

The second price is resolution, and it is the one nobody budgets for

The marks a picture has were laid down by the surface it was taken on. A reprojection can move them but cannot make more of them, and the target surface has its own opinion about where marks ought to be.

The flat frame wants ×5.49 the marks at its edge and ×1.66 on its axisWhat a reprojection from the equidistant fisheye to a 100° flat frame costs in resolution, direction by direction. Both surfaces are given the same mark budget over their own fields, so this is not the observation that one picture is larger — it is how much finer the target's grid is than the marks available to fill it. On the axis the factor is ×1.66, and at the edge of the frame it is ×5.49 — which is why a reprojected fisheye is crisp in the middle and soft at the corners. Two further prices, neither of them geometric: 68 per cent of the source picture is outside the frame altogether, and the reader must now stand 6.7 cm from a picture 160 mm wide, where the fisheye it came from had no correct distance at all.02401020304050degrees off the optical axis, inside the reprojected framemarks the target wants, per mark the source laid downone mark for one mark×5.49 at the edge68% of the source unusedcorrect from 6.7 cm at 160 mm wide
Fig. 4 What the reprojection costs in resolution, direction by direction, with both surfaces given the same mark budget over their own fields — so this is not the observation that one picture is larger. On the axis the flat frame wants ×1.66 the marks that are available, and at the edge of the frame it wants ×5.49. That is why a reprojected fisheye is crisp in the middle and soft at the corners.

This is where a surface spends its pixels arriving as a practical consequence. The equidistant fisheye spends nearly evenly; the flat plane spends heavily at its edges. Reproject from the first to the second and the target’s outer regions are asking for a density the source never recorded, so those marks have to be invented by an interpolator. The geometry is exact and the picture is soft, and both statements are true at once.

The demand is worse the wider the output frame, which sets the two prices against each other.

The flat frame wants ×5.20 the marks at its edge and ×0.79 on its axisWhat a reprojection from the equidistant fisheye to a 120° flat frame costs in resolution, direction by direction. Both surfaces are given the same mark budget over their own fields, so this is not the observation that one picture is larger — it is how much finer the target's grid is than the marks available to fill it. On the axis the factor is ×0.79, it passes one at 24° off axis, and at the edge of the frame it is ×5.20 — which is why a reprojected fisheye is crisp in the middle and soft at the corners. Two further prices, neither of them geometric: 53 per cent of the source picture is outside the frame altogether, and the reader must now stand 4.6 cm from a picture 160 mm wide, where the fisheye it came from had no correct distance at all.0240204060degrees off the optical axis, inside the reprojected framemarks the target wants, per mark the source laid downone mark for one mark×5.20 at the edge53% of the source unusedcorrect from 4.6 cm at 160 mm wide
Fig. 5 The same cost at a 120° output frame. On the axis the factor is now ×0.79 — below one, so the centre has marks to spare — it passes one at 24° off axis, and at the edge it is ×5.20. Widening the frame recovered coverage, and it moved the shortfall outward rather than removing it.

So the choice of output field is a genuine trade with numbers on both sides. Narrow it and more of the source is discarded; widen it and more of the output is interpolated. There is no setting at which a fisheye becomes a rectilinear picture for free, and the essay’s whole practical content is that the cost is in coverage and sampling rather than in the geometry that everybody worries about.

Where the marks were, and why the shortfall has that shape

The shape of the resolution curve is not arbitrary and it follows directly from the two surfaces’ own spending.

One budget, six distributions: 68.3 marks per square degree on the plane's axis against 136 on the equal-area fisheye'sHow many of a picture's marks land on each square degree of world, plotted against the angle off the optical axis. Every surface is given the same 1 million marks spread over the same 50° cone, so the six curves enclose the same area and the comparison is about shape alone. The flat plane starts lowest at 68.3 and ends highest at 257, a factor of 3.77; the equal-area fisheye is the horizontal line at 135.7, flat to 8.3e-6 per cent. The sweep is at 45° to the axes, because a horizontal sweep runs along the cylinder's own equator where its area scale is exactly one and it would look flat too.1.8022.202.4001020304050degrees off the optical axismarks per square degree, at 1 million marks over the whole 50° coneplane ×3.77cylinder ×1.68stereographic ×1.48equidistant ×1.14equal-area ×1.00equirect. ×1.191 million marks over the same 50° cone, on all sixequal-area flat to 8e-6%
Fig. 6 The two spending profiles that produce it, over a 50° cone. The flat plane runs from 68.3 marks per square degree on its axis to 257 at the edge, a factor of 3.77; the equidistant fisheye is nearly flat, at ×1.14 across the same cone. The shortfall in the previous figures is the ratio of these two curves, direction by direction.

Read that way the resolution price is a subtraction rather than a phenomenon. The target’s demand is one curve, the source’s supply is another, and the factor a reprojection needs is the quotient. Both are known before any picture is taken, which means the cost of a reprojection is computable in advance — a photographer choosing a fisheye for later rectilinear output can work out exactly how soft the corners will be, from the two surfaces alone.

It also explains the sign change in the 120° case. At a wide output the plane’s axis is spending less than the fisheye did there, because the plane’s marks have been pulled outward to serve its edges; so the centre has marks to spare and the deficit begins only at 24° off axis.

Which direction to reproject, and why one way round is cheaper

The two prices are not symmetric between a pair of surfaces, and the asymmetry decides which way a workflow should run.

Going from the evenly-spending fisheye to the edge-hungry plane, the target asks for marks the source did not record — ×5.49 at the frame’s edge. Run the same pair the other way and the shortfall largely disappears: the fisheye asks for a nearly flat density, and a plane’s picture has marks to spare almost everywhere, having concentrated them at its own edges. The coverage price reverses too, and more brutally — a plane at 100° carries only a third of what a 180° fisheye holds, so reprojecting outward invents nothing and simply has nothing to put in the outer sky.

That gives a rule with a reason behind it. Capture on the surface that spends most evenly and reproject toward whatever is wanted, because an even source can supply any target’s demand up to a bounded factor, while a source that has concentrated its marks somewhere cannot supply a target that wants them elsewhere. Every fisheye is a different rule sets out the four laws a lens may obey, and this is the practical criterion for choosing between them when the output surface is not yet decided.

It is also why the intermediate storage format for a panorama matters more than it looks. A picture reprojected twice pays the sampling price twice, and the second payment is made on marks that were already interpolated. The cheapest pipeline stores on the evenest surface available and reprojects once, at the end, to whatever a reader is looking at.

The reprojection is not a projection, and that is worth being exact about

A reader who has followed a projection of a projection will want to know whether this composition is itself a projection, and the answer separates two things that are easy to run together.

A reprojection between two surfaces sharing a centre is not a new projection of the scene. It is the same projection, read off a different chart. Nothing about the scene enters — the operation takes directions to directions and knows nothing of depth, so a reprojected picture is correct for exactly the same eye position the original was, and the viewing distance changes only because the picture’s width and law have changed.

That is what distinguishes it from the compositions that essay measures, where a picture is photographed and the two centres are genuinely different. There the composite is a projection with its own centre, and through a curved surface it is measurably not a homography at all. Here there is one centre throughout, and the whole operation is a relabelling.

The distinction has a consequence. Because no scene enters, a reprojection can be performed on a picture of anything whatever without knowing the depths — which is why it is a routine operation and why stitching software does it without asking questions. The moment two centres are involved, as in a stitched panorama’s unavoidable parallax, depth enters and nothing is exact any more.

What a reader ends up looking at

Setting the two surfaces side by side on one scene is the plainest summary of what has actually been traded.

The same 100° view, projected onto a plane and onto a cylinderOn the plane every straight line stays straight (1e-13 px of bend) and the edges stretch; on the cylinder the stretch is even and straight lines bow by up to 652 px.flat picture plane — straight lines stay straightcylindrical picture surface — even stretch, bowed linesone scene, two picture surfacesneither is the distorted one
Fig. 7 Borrowed from the essay that measures it: the same 100° view on a plane and on a cylinder. On the plane every straight line stays straight — 1 × 10⁻¹³ pixels of bend — and the edges stretch; on the cylinder the stretch is even and straight lines bow by up to 652 pixels. Reprojecting between these two moves a picture between those two behaviours exactly, and the choice is which of them a reader should be looking at.

Neither picture is more correct. They are two charts of one pencil of rays, and a reader standing at the right distance from either is receiving the same directions. What differs is which properties are legible — straight edges on one, even spending and a wide field on the other.

Which of those a picture should make legible is a question about the picture’s purpose rather than about geometry, and it is the one thing in this essay the measurements cannot settle. A drawing whose subject is a building wants its edges straight; a drawing whose subject is the whole sky wants its marks spread evenly; a texture sampled by a machine wants neither and cares only about the sampling ratio. The reprojection is the operation that moves a picture between those, exactly, and the choice of destination is editorial.

So the honest way to state the whole operation is that a reprojection is a change of what is easy to read, bought with coverage and sampling. That is a genuine thing to want, and it is a much smaller claim than the one implicitly made when a fisheye is “corrected” — a word that suggests the original was wrong.

The viewing distance moves, and the picture does not

One consequence deserves its own paragraph because it is this collection’s signature and a reprojection is where it is easiest to get wrong.

Every figure here prints the distance it is correct from, and a reprojected picture prints a different one from its source — the flat 100° frame is correct from 7 centimetres at 160 millimetres wide, the 120° frame from 5. Those numbers moved. Nothing about the scene or the eye moved with them.

The reason is that the viewing distance is a property of the picture as an object on a page: it is the focal length scaled to the width the picture is displayed at, and a reprojection changes both the law and the width. A reader standing at the new distance in front of the new picture receives exactly the directions a reader standing at the old distance in front of the old one received — that is what the exactness means, restated in the room.

So a reprojection is a change of where a reader has to stand, and the picture’s correctness is preserved by moving them. Matching buys one seat is the companion statement for curved displays: a picture is right for a place, the place is computable, and changing the picture changes the place rather than breaking anything.

That is worth stating because “the fisheye has been corrected” invites the opposite reading — that the reprojected version is right and the original was wrong. Both are correct pictures, from two different points, and neither is a repair of the other.

Nothing here is a filter, and the word “resampling” hides that

A last distinction, because the vocabulary works against the geometry.

The operation this essay measures is a map on directions. The operation a program performs is that map plus an interpolation, because the source’s marks sit on a grid and the target’s grid asks for values between them. Those two are habitually named together as “resampling”, and running them together is what makes a reprojection seem lossy in a way the geometry says it is not.

Separating them is worth doing because they fail differently. The geometry is exact everywhere both surfaces reach and undefined outside — a hard boundary, no gradation. The interpolation is approximate everywhere, by an amount set by how much finer the target’s grid is than the source’s, which is exactly the ×1.66-to-×5.49 curve above. One of those is a fact about surfaces and the other is a fact about a program, and only the first is computable from the picture surfaces alone.

The practical form: the resolution curve tells a reader where an interpolator is being asked to invent, and how much. It does not say how well any particular interpolator does it. A picture reprojected with a good filter and one reprojected with a bad one have the same geometry and the same demand curve, and differ entirely in the part this collection does not compute.

That boundary is the same one the third column is area draws between a surface’s area scale and what a sensor does with it. The geometry says what is being asked for; the instrument decides what arrives.

What this does not settle

Three limits, and the first is the one that would change the numbers most.

Everything here assumes the two surfaces share a centre of projection. That is true of a reprojection performed on one photograph, and it is exactly what fails when a picture is stitched from several exposures taken about the wrong pivot — the case the pivot that is not the eye measures, where there is no single pencil of rays and the reprojection is not a change of coordinates at all.

The resolution costs are quoted as a demand, not as a result. A factor of ×5.49 says the target’s grid is that much finer than the marks arriving; what a reader sees depends entirely on the interpolator, and no amount of interpolation creates information. This collection computes the geometry and the sampling ratio; the filtering is somebody else’s subject.

And the exactness is bit-exact on this pair of surfaces, which is a stronger statement than it needs to be and is partly luck of the arithmetic. Both maps here are radial functions with clean closed-form inverses, so the round trip returns the identical double. A pair whose inverse needs iteration would return something a few ulps away and the claim would be “to the arithmetic floor” rather than “exact” — the same geometric statement, differently housed.

One pencil, two charts

The object is a set of directions through a point, and the finding is that moving a picture from one surface to another does nothing to it at all.

What it does is discard the directions the new surface cannot reach — 70 per cent of a 180° fisheye’s picture, going to a 100° flat frame — and ask for marks in places the old surface did not put any, by a factor of 5.49 at the frame’s edge. Both prices are computable before the shutter opens, from the two surfaces alone, and neither of them is the loss of geometry that the word reprojection seems to promise.

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.

Angular resolutionArea scalecentre of projectionChartEquidistantfield of viewFisheyePicture surfacere-projectionSolid angle