A projector is a camera run backwards
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?
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.
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° | 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.
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 . 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.
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.
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 and panel width pixels has a focal length of 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.
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.
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.
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.
Shares its objects with
Essays that name at least two of the same things, and that neither author linked.
- An inverse perspective is a leaning plane — both name demonstration, depicted rectangle, projective map, vanishing point
- The plan hidden in the photograph — both name ground plane rectification, homography, rectification, vanishing point
- A pixel is not a point — both name camera calibration, demonstration, vanishing point
- The divide is postponed, not avoided — both name centre of projection, demonstration, projective map
- The picture whose lines spread — both name demonstration, depicted rectangle, vanishing point
- What happens behind the eye — both name centre of projection, demonstration, projective map
Named objects
A flat tag is an object no other essay names yet.
Camera calibrationcentre of projectionDemonstrationDepicted rectangleFocal recoveryGround plane rectificationHomographyProjective mapRectificationVanishing point