The second projection

A projector is a camera run backwards

Turn a projector fifteen degrees from square and it throws a trapezium; keystone correction cannot add light outside it, so it shrinks the picture until it fits and discards a sixth of the panel. And the instrument itself comes back out of the picture it threw — 2880 panel pixels recovered against 2880, by the function the wrong field wrote for hand-drawn cubes.
17 min read 10 figures One machine used twiceThe round trip

Worth reading first: Flattening a façade out of the photograph · Recovering the camera from the picture it drew.

This site has argued three times that a projection is one operation with the centre moved. A shadow is a projection from the lamp. A reflection is the view from a camera behind the mirror. A parallel drawing is a photograph from infinitely far away.

A projector is the fourth member of that family and the most literal. It is a camera with the light running the other way: the same optics, the same focal length, the same principal point, the same lens distortion, and a panel where the sensor was. Everything this site knows about cameras applies to it directly, and the two questions worth asking are the ones the site asks of every instrument — what does the geometry cost, and can the instrument be recovered from the picture it made?

What keystone correction actually costsA projector turned 15° from square throws its rectangular panel as a quadrilateral. Correction cannot add light outside it, so it shrinks the picture until it fits — and 18.7% of the projector's pixels are thrown away. The fraction is measured on the panel rather than on the wall, because turning the projector makes the wall picture larger while making the panel usage smaller.15° of yaw, 6° of pitch, 1.50 throw ratio81.3% of the panel reaches the corrected rectangleouter: the thrown quadrilateral · inner: what correction can keep18.7% of the panel discarded
Fig. 1 A projector turned 15° from square, with 6° of tip. The outer shape is what its rectangular panel throws on a flat screen; the inner rectangle is the largest correctly-shaped picture that fits inside it. 18.7% of the panel’s pixels reach nothing at all.

The trapezium is a homography

A projector’s panel is a rectangle. Its image on a flat screen is the image of a rectangle under a projective map, which is a general quadrilateral — and the map itself is a homography, determined by four corner correspondences.

That is exactly the object the metrology field works with from the other side. Flattening a façade takes a photograph of a planar surface and finds the homography that undoes the perspective, turning the drawn quadrilateral back into the rectangle it is a picture of. A projector’s keystone is the same map, applied deliberately by the geometry and undone deliberately by the electronics.

So keystone correction is rectification, and it inherits everything rectification has: it is exact, it needs four correspondences, it is a projective map so it preserves cross-ratios and straight lines, and it cannot be done by scaling or shearing because those are affine and the map is not.

A façade, flattened out of the photographFour corners of a rectangle of known proportions fix the homography. Three lengths it was never given come back to 4e-16 relative — so every measurement on that plane is available, in units of the rectangle's own width.the picturethe same plane, rectifieddoor — 0.5068 widths (true 0.5068)sill — 0.3026 widths (true 0.3026)diagonal — 1.1766 widths (true 1.1766)worst error 4e-16 relativethe probes were not used to build the map
Fig. 2 The same map from the camera’s side. A photograph of a plane, and the homography that returns it to a rectangle — exact, and determined by four correspondences. A projector’s keystone correction is this operation applied before the light leaves, and it has the same properties because it is the same map.

What correction costs, and where the cost is measured

Correction cannot add light outside the thrown quadrilateral. All it can do is stop using the panel pixels that fall outside the rectangle it wants, so it shrinks the picture until the rectangle fits and discards the rest.

The price grows quickly. These are for yaw alone, with the projector level — the figure above adds six degrees of tip, which takes the 15° case to 18.7%:

yaw panel discarded
5.9%
10° 11.8%
15° 17.8%
25° 29.9%
30° 36.2%

A third of a projector’s pixels are gone by thirty degrees, and the specification sheet that quoted the resolution did not mention it.

The fraction is measured on the panel, and the first version of this measured it on the wall. That is worth recording because it was wrong in a way that is easy to miss and impossible to argue with once seen. Turning the projector makes the thrown quadrilateral larger — the far edge is further away and spreads — so the inscribed rectangle’s area on the wall can grow while the number of panel pixels reaching it falls. Measured on the wall the loss came out as 7.7% at 15° and 1.8% at 25°, which is not merely inaccurate but the wrong sign.

The gate now checks monotonicity across seven angles for exactly that reason. A quantity that is supposed to worsen with an angle and does not is the cheapest possible detector of a measurement made in the wrong place, and it costs one line.

What keystone correction actually costsA projector turned 28° from square throws its rectangular panel as a quadrilateral. Correction cannot add light outside it, so it shrinks the picture until it fits — and 36.0% of the projector's pixels are thrown away. The fraction is measured on the panel rather than on the wall, because turning the projector makes the wall picture larger while making the panel usage smaller.28° of yaw, 6° of pitch, 1.50 throw ratio64.0% of the panel reaches the corrected rectangleouter: the thrown quadrilateral · inner: what correction can keep36.0% of the panel discarded
Fig. 3 The same geometry at 28°, where nearly a third of the panel is discarded and the surviving rectangle is noticeably off-centre. The loss is monotone in the angle — checked at seven of them — because it is measured where the pixels are rather than where the light lands.

The instrument, recovered from its own picture

The site’s round trip has been pointed at a camera, at a construction, at a hand-drawn cube and at a divergent perspective. It has never been pointed at a projector, and the setup is a small pleasure to arrange.

Reverse the roles. Treat the wall as the world and the panel as the image plane. Then a rectangle drawn on the wall is a rectangle in the world, its image on the panel is a trapezium, and the two pairs of opposite edges of that trapezium meet at two vanishing points whose world directions are perpendicular.

Two orthogonal vanishing points and a known principal point determine a focal length, and that is a function this site already had — written for the wrong field to ask what solid a hand-drawn cube depicts, and used here with no changes at all.

The answer: 2880.00 panel pixels against a true 2880, a relative error of 2.4×10152.4 \times 10^{-15}. The true value is the panel width times the throw ratio and it never enters the computation — the recovery is shown four panel coordinates and nothing else, exactly as every other recovery on this site is shown the picture and never the camera.

A projector is a camera run backwards, and it can be recovered from its own pictureReverse the roles: the wall is the world and the panel is the image. A rectangle on the wall appears on the panel as a trapezium, its two pairs of opposite edges meet at two vanishing points, and those directions are perpendicular — so focalFromTwoPoints returns 2880.0 panel pixels against a true 2880, a relative error of 9.5e-16. Nothing in the computation was shown the projector's angle.the wall rectangle, as the panel sees itrecovered focal length2880.0 pxthe projector's own2880.0 px18° of yaw, 6° of pitchthrow ratio 1.5000 recovered against 1.50
Fig. 4 The recovery. The wall’s rectangle as the panel sees it, and the projector’s own focal length read out of it — 2880.0 panel pixels against 2880, which is a throw ratio of 1.5000 against 1.50. Nothing in the computation is shown the projector’s angle.

And it does not depend on which rectangle was thrown. The gate runs the recovery on a second, entirely different wall rectangle and requires the same answer, because a focal length that changed with the test pattern would be a property of the pattern rather than of the instrument.

What the recovery needs, stated as a shortfall

The recovery above returns a focal length and nothing else, and it is worth being exact about why, because the shortfall is the same one the metrology field records.

Two orthogonal vanishing points give one equation, so with the principal point taken as given — the panel’s own centre, which is a fair assumption for a projector — one unknown can be found. That unknown is the focal length.

The angle is not recoverable from this alone, and the reason is that a plane has only two directions in it. Three mutually orthogonal directions are what the camera recovery needs, and a flat wall supplies two. Flattening a façade records the same limit from the camera’s side: a single plane determines a homography and leaves the camera’s orientation underdetermined without a further assumption.

So the projector’s recovery is a genuine round trip on one parameter and silent about the rest, which is the honest description. What it demonstrates is that a projector’s intrinsics are an ordinary camera’s intrinsics, readable by ordinary means — not that a projector can be fully calibrated from one thrown rectangle.

The refusal, which is the informative case

A square-on projector throws a rectangle. Both pairs of opposite edges are parallel on the panel, there are no vanishing points to intersect, and the recovery has nothing to work with.

That is not a failure of the method. It is the statement that a picture with no keystone in it contains no evidence about the projector’s angle or focal length, and it is asserted as a refusal rather than allowed to return a plausible number out of a nearly-singular intersection.

It is worth naming what kind of statement that is, because the site has met the same shape twice before under different names. Three collinear vanishing points form no triangle and the camera recovery refuses them. A level camera makes horizon-based height measurement a cliff rather than a slope, and the metrology field refuses that too. In each case a degenerate configuration is one where the quantity being sought has left no trace, and the right response is to say so rather than to return the answer a solver happens to converge on.

The general principle: a measurement’s precision is not a property of the instrument, it is a property of the configuration, and there are configurations where it is zero. A refusal is the honest report of one.

The three vanishing points of one box, drawn to scale with the boxThe picture is the small rectangle. Two of the three vanishing points fall well outside it, which is why they are computed rather than located by eye.the pictureVP₁VP₂VP₃orthocentrefocal length from the triangle — 853.9 pxspread 1e-14% across three routes
Fig. 5 The configuration that carries information, and the degenerate one it becomes. Three vanishing points forming a proper triangle determine a focal length and a principal point; three that are collinear determine nothing. A square-on projector is the two-point version of the same degeneracy — the evidence is not faint, it is absent.

Throw ratio is a focal length in disguise

The trade’s word for a projector’s angle is the throw ratio: the distance to the screen divided by the width of the picture it makes there. A 1.5 throw ratio means a picture two metres wide from three metres away.

That is a focal length expressed in picture widths, which is the same quantity this site prints on every figure. The site’s strip says correct from 40 cm at 160 mm wide, which is a ratio of 2.5; a projector’s specification sheet says 1.5; and the two are the same kind of number pointing in opposite directions along the same axis.

The conversion is one line. A projector with throw ratio TT and panel width PP pixels has a focal length of TPT \cdot P panel pixels — which for a 1920-pixel panel at 1.5 is 2880, and is exactly the number the recovery above returns.

What is worth noticing is that the projector’s convention is the better one for the purpose. A throw ratio is dimensionless and immediately usable: it says where to put the machine for a picture of a given size, which is the question anybody installing one has. A focal length in millimetres would need the panel’s physical size named alongside it, which is the same incompleteness a camera lens’s focal length has and which the projector trade has simply avoided.

So of the two industries using the identical optics, one quotes a quantity that is incomplete without a second number and the other quotes a ratio that is not. That is worth recording as a small vindication of the site’s own convention, which has printed a distance in picture widths since the first commit.

How far back the picture is correct from, against how wide it isA 24° picture is correct from 38 cm and a 90° picture from 8 cm.020406020406080horizontal field of view (degrees)correct viewing distance for a 160 mm wide picture (cm)long lens — 38 cmwide — 14 cmvery wide — 8 cmsame picture width throughoutthe only variable is the angle
Fig. 6 The site’s own version of a throw ratio. Station distance in picture widths against field of view — dimensionless, complete, and the same quantity a projector’s specification sheet quotes. The camera trade’s focal length in millimetres is the one convention of the three that needs a second number to mean anything.

What a projector shares with a camera and what it does not

Having built the analogy, it is worth marking where it stops, because an analogy nobody has bounded is a source of wrong claims.

Shared, exactly: the intrinsics. Focal length, principal point, pixel aspect, radial distortion. All of them are properties of the same optics used in the same way, and all of the site’s machinery applies unchanged.

Shared, with the arrow reversed: the projection. A camera maps world rays onto panel coordinates; a projector maps panel coordinates onto world rays. They are the same map read in two directions, which is why the recovery above works.

Not shared: occlusion, and it is the substantial difference. A camera sees the nearest surface along each ray. A projector illuminates every surface along each ray, so a projected image falls on the first surface and on everything behind it that the first does not block — and the resulting shadow is the projector’s view of the occluder, which is the site’s shadow essay exactly with the lamp replaced by a projector that is also carrying a picture.

And not shared: the depth buffer. A camera needs one only in simulation; a real one gets occlusion for free. A projector has no way at all to decide what should be lit, because light does not stop at the surface a designer intended.

That last is a real difference in kind rather than a detail, and it is what makes projection mapping onto a three-dimensional object a hard problem while photographing the same object is not.

A box and its shadow, both projections from a pointThe rays from the lamp to the corners are the same construction as the rays from the eye to the corners — one operation, two centres.correct from 26 cm, at 160 mm wide34° across
Fig. 7 The half of the analogy that does not transfer. A lamp — or a projector — illuminates everything along each ray, and what lands on the far surface is the lamp’s own view of whatever intervened. A camera never has this problem because occlusion resolves itself; a projector always has it because light does not stop where a designer wants it to.

Two things correction cannot buy back

The panel loss is the visible price. Two others are worth naming because neither shows up in the fraction and both are consequences of the same homography.

Resolution across the picture becomes uneven. The far edge of the trapezium is further from the projector, so each panel pixel covers more wall there. At 15° of yaw on a 1.5 throw ratio the far edge’s pixels are about a third larger than the near edge’s — so the corrected picture, which is a uniform rectangle on the wall, is drawn from panel pixels of varying size. That is exactly the non-uniformity the pre-warp measures for a headset lens, produced by a projective map instead of a radial one.

And focus cannot be uniform. A projector’s lens focuses at one distance; the trapezium spans a range of distances; so one edge of the picture is nearer than the other and only a band of it can be sharp. That is optics rather than geometry and this site does not compute it, but the geometry says exactly how much range there is to cover: for the 15° case, the far corner is 27% further away than the near one.

Neither is a defect of keystone correction. Both are properties of the arrangement, and correction repairs the shape without touching either — which is the general form of what a projective correction does. A homography puts the corners where they belong and says nothing about what happens between them.

That is the same limit the metrology field states from the other side. Rectifying a plane recovers the true shape of a façade and does not recover the resolution the oblique view failed to record: the far end of a rectified image is genuinely softer, permanently, because the pixels were not there.

A façade, flattened out of the photographFour corners of a rectangle of known proportions fix the homography. Three lengths it was never given come back to 7e-16 relative — so every measurement on that plane is available, in units of the rectangle's own width.the picturethe same plane, rectifieddoor — 0.5068 widths (true 0.5068)sill — 0.3026 widths (true 0.3026)diagonal — 1.1766 widths (true 1.1766)worst error 7e-16 relativethe probes were not used to build the map
Fig. 8 What a rectification does and does not repair. The shape comes back exactly; the sampling does not, because the far end of an oblique view was recorded with fewer pixels per metre than the near end. Keystone correction inherits the identical limit, with light going the other way.

The family, complete

Four projections from a centre, in the order this site built them: the camera, the shadow’s lamp, the mirror’s virtual camera, and the projector. Every one of them is the same operation, every one has a station point, and every one is measured with the same machinery.

The projector is the last of them to be built and it is the one that closes the loop, because it is the only one whose picture is itself a picture. A shadow is a picture of an object; a reflection is a picture of a scene; a projector throws a picture of a picture, so the whole chain from a rendered frame to a viewer’s eye is three projections composed — the virtual camera that made the frame, the projector that threw it, and the eye that reads it off the wall.

A projection of a projection is a projection, so the composite is one too, and it has a single station point that is computable from the three. Which is, at the end of this field, the same claim the site started with: every picture states the point it is correct from, and the only work is finding out which point, through however many projections it took to get there.

A print, photographed again — flat and rolledFour marks fix a homography; the other 16 are predicted by it. On a flat print they land where it says to 1e-13 px. Rolled to 1/R = 0.25 per metre the same four predict the same 16 to 8.3 px, because a composition of projections is a projection only if the middle surface is a plane.an anchorcorrect from 19 cm, at 160 mm wideflat 1e-13 px · rolled 8.3 px
Fig. 9 The composition rule the whole chain rests on. Two projections through planes compose into one projection, with one station point, computable from both. A rendered frame thrown by a projector and read off a wall is that rule applied twice, and the result is a picture correct from one place in the room.
A projector is a camera run backwards, and it can be recovered from its own pictureReverse the roles: the wall is the world and the panel is the image. A rectangle on the wall appears on the panel as a trapezium, its two pairs of opposite edges meet at two vanishing points, and those directions are perpendicular — so focalFromTwoPoints returns 2880.0 panel pixels against a true 2880, a relative error of 1.6e-16. Nothing in the computation was shown the projector's angle.the wall rectangle, as the panel sees itrecovered focal length2880.0 pxthe projector's own2880.0 px26° of yaw, 6° of pitchthrow ratio 1.5000 recovered against 1.50
Fig. 10 And the round trip at a steeper angle, where the trapezium is pronounced and the answer is unchanged. The recovered focal length is a property of the instrument, so it does not move when the instrument is turned — which is the check that says the recovery is reading the projector rather than the picture.

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.

Camera calibrationcentre of projectionDemonstrationDepicted rectangleFocal recoveryGround plane rectificationHomographyProjective mapRectificationVanishing point