Concept

Quantisation — where it appears

Storing a continuous quantity as one of a finite set of values, which destroys distinctions finer than the step. A depth buffer's step is not even in distance, because the stored quantity can only be affine in one over the distance, so the codes crowd toward the near plane.

Named by 22 essays across 5 fields — each of them below, with the objects they name alongside it.

00.2500.5000.7501-10123distance from the eye — log₁₀ metresfraction of the buffer's codes used uphalf the codes by 0.20 ma linear map, for comparisonnear 0.1 m, far 1000 mharmonic mean 0.20 m against arithmetic 500 m

The precision a depth buffer has left

Depth is stored as an affine function of one over the distance, so half of a buffer's codes are spent before the harmonic mean of the near and far planes — twenty centimetres out of a kilometre. The resolution goes as the square of the distance, and the fix that works is not more bits.

pipeline · Zbuffer
one pixel is an areacentrescornersprincipal point moves0.707 pxfocal length changes by4.5e-13 pxan edge-versus-centre viewport1.303 pxa half-pixel convention is a principal-point error; an off-by-one viewport is a focal-length error8 vertices, all shifted by the same 0.7071 pxspread across marks 0.0e+0 px

A pixel is not a point

Where the sample sits inside a pixel is a convention, and getting it wrong shifts every mark by half a pixel in each axis. What that costs can be measured by recovering the camera from the picture — the answer is a principal point exactly 0.707 px from the truth with the focal length untouched, and the other half-pixel mistake does precisely the reverse.

pipeline · Viewport
24 kept · 26 clipped · every mark unmovedcorrect from 17 cm, at 160 mm wideclip plane tilted 18°

The near plane can be any plane

Rewrite one row of a projection matrix and the near plane stops being perpendicular to the axis and becomes whatever plane is asked for. Every x and every y is untouched — it is the same projection of the same scene from the same eye — and the depth order is wrecked, which is a clean separation of the two things a projection matrix does.

pipeline · Clipping
-0.10000.1002.5057.5010depth reported from the stepped disparity (m)height reported for each image row (m)the floor as it is35 platesspacing 3.9 cm → 1.95 mslope 1.997

Whole pixels cut space into shells

A disparity read to whole pixels can report only the depths fB/k, so a stereo pair does not measure distance on a scale — it chooses among 113 shells between half a metre and twelve, 6.7 cm apart at two metres and 1.39 m apart at ten. A level floor comes back as 35 standing plates. And a finer step and a better reading are different purchases: at a quarter pixel with a quarter pixel of matcher error the pair prints 449 depths and can tell 149 apart.

depth · Disparity
01230123the plane moved by a factor of ten to the …depth resolution, relative (powers of ten)near plane, brought infar plane, pushed out1/near − 1/farone term does all the work

One plane is nearly free

The near and far planes enter a depth buffer's precision through 1/near − 1/far, and one of those reciprocals is enormous. Pushing the far plane out by a factor of a thousand costs a tenth of a per cent; bringing the near plane in by the same factor costs a factor of a thousand — and an infinite far plane is the limit of the first rather than a separate case.

pipeline · Zbuffer
the seat3 chords against the arccurved monitor, 3 flat pieces6.80 mm of sag · 5.50 px at the seat

A curved screen is eight flat ones

A projection matrix is a plane and nothing else, so a curved display cannot be rendered — it has to be driven as several planes and assembled. The gap between chord and arc is the whole error, it goes as the square of the angle each piece spans, and the piece count therefore goes as the inverse root of the tolerance — three for eight pixels, eight for one, fifteen for a quarter.

pipeline · Tiling
where the eyes are aimedin plan, framed to the shells drawnzero at 0.92 m, 40° aside

Vergence moves the shells and does not respace them

Turn two eyes inward and the depths a whole-pixel reading can report stop being planes and become a family of near-circles through both eyes — the twenty-pixel shell standing at 0.74 m forty degrees aside where a parallel pair puts it at 3.82. The spacing between consecutive shells is the same to 0.07 per cent across the whole field, so vergence relabels the rays and does not sharpen them, and the resolution argument for turning the eyes in does not exist.

depth · Disparity
0.2000.4000.6001.8022.20range, mheight above the plane of the eyes, mhorizontalverticalat 2 m, 40 cm off the plane79° between them

The second disparity cuts cells

A point off the plane of the eyes has a vertical disparity as well as a horizontal one, and quantising both, on an 86,400-point lattice of a room, gives 7,663 labels where one coordinate gives 179 — a count that belongs to the lattice rather than the room, as the essay after this one found. The gain is entirely vergence's — two eyes looking straight ahead have no vertical disparity at all, exactly — and it is largest where the first reading is already finest: 60.8 in the near metre and 3.7 in the far band.

depth · Disparity
the constant-depth direction, 20.0°a floor banked 20°, 40 pixels of the walkworst 0.60 px off the line

A tilted span walks a staircase

A span along a banked floor's constant-depth direction is exact, and a renderer visits pixels rather than the span. Snapped to the grid, a 120 px span at a 20° bank costs 0.577 px where the same span along a page row costs 13.26 — twenty-three times better — and it never rises above 1.22 px at any bank. The price is bookkeeping: a band of twenty-four such spans draws 53 of its 1,368 pixels twice.

pipeline · Perspcorrect
0.2500.5000.75010204060copies made, each from the one beforea landmark, as a share of the heightthin: no grid · thick: eighteen squareshand 0.8%

A grid stops a copy drifting

A figure copied by hand from the last copy drifts as a random walk, by the square root of the copies. Copied on a ruled grid, with each landmark brought back to a line, it does not drift at all, because rounding throws the error away. That is how a correcting code works. It holds only below a sharp threshold on the hand, and the grid's size is the trade between how much it corrects and how much it can say.

conventions · Canon
010203051015how far each camera is turned in, degreesper centwhat the vertical disparity addslabels merged by rectifyingof those, from the warpfocal length to merge noneeach pair rectified at its own 900 px4.0% for eyes at 1.2 m

Rectifying a pair spends what its epipolar lines lean

Counted from the two disparities alone, rectifying a verged pair looks as if it throws away at least 99.7 per cent of what the pair can tell apart. That cannot be true of a warp that loses no ray, and it is not: once the place in the picture is counted, the vertical disparity adds 4.1 per cent for eyes verged at 1.2 m, and rectifying at the same focal length gives back all but 4.0 of it.

depth · Disparity
a wall at 10 m0 px−0.25 m0.25 px+0.17 m0.5 px+0.64 m0.75 px−0.64 m7 m8 m9 m10 m11 m12 m13 m14 mf = 900 px, B = 65 mm, whole pixelsshift 0.150 px puts a shell on the wall

A rectification's free shift is free only near the pair

Sliding a rectified pair's principal points apart adds a constant to every disparity, and a constant changes nothing about where points are — on paper. A whole-pixel reading is not paper. The same slide moves every depth the reading can report, and for a wall ten metres away the choice between the best shift and the worst is 1.71 metres. Near the pair it is millimetres. A matcher with half a pixel of its own error erases the choice, and pays more than the worst shift did.

depth · Disparity
the original gridthe grid at 0.5the dots are where each pixel's index standsshift -0.250 new px

Halving a picture moves its centre by a quarter of a pixel

Multiply a principal point by the scale of a resize and it comes out wrong by (s − 1)/2 of a new pixel, at any point and for every reduction. At a pyramid's fourth level that is nearly half a pixel, turning a recovered pose by half a degree. The picture, asked, reports the true map.

pipeline · Viewport
-0.50000.5001e+32e+33e+3the buffer's width (device pixels)displacement at the frame's edge (px)16:9 windows at 1.25×bound ±0.694 px

A rounded viewport has two focal lengths

Compute the aspect ratio from a window's requested size and draw into a buffer of whole device pixels, and the picture has two focal lengths that differ by up to one part in three hundred. It looks like a defect that should grow worse on small screens and better on large ones. At the frame's edge it does neither, because the error is a bounded displacement of a fraction of a pixel on any window at all.

pipeline · Viewport
direct0.708 pxdirect, logical shot0.000 pxcomposited0.708 pxcomposited, naive0.915 pxcomposited, logical shot0.000 pxnaive throughout, logical shot0.471 pxworst over every windowpale: breaks the bound

A display's scales cancel, if they are true maps

Between a renderer's buffer and a screenshot there may be two more resamples: a compositor reducing a whole-number scale to the panel, and a screenshot read back at the window's size. Each rounds to whole pixels, and under the true map the roundings telescope: only the last size and the renderer's assumed aspect matter, so the one-rounding bound survives, and a screenshot at the window's size shows the square camera exactly. A naive step breaks the bound in six per cent of windows and moves every centre.

pipeline · Viewport
0246801020304050generations of copyingerror in the proportions, rms (% of height)no ruletwo rulesgrid of 18chain of fourfour from the hairlinehand of 1% a markfifty copies: 0.99%

A ratio is a code with no threshold

A grid corrects a copy by rounding each mark to a line, which makes it exact below a threshold of hand and lost above it. A canon of ratios corrects by setting each landmark from another on the same drawing. That holds every ruled proportion at one hand's error for ever, at any hand, and holds nothing it does not name, and nothing about the figure's size. On a grid, a ratio canon is exact where the grid is and bounded where the grid is not.

conventions · Canon
the camera's principal point1280×720 logical, device scale 1.5crop rounding: 0.50, 0.00 px

A crop moves the frame and not the camera

A crop of a screenshot scales nothing. It moves the frame's corner and leaves the renderer's principal point where it was, so the cropped picture is exactly the picture of an off-centre camera and nothing in it can say otherwise. What the crop adds is the rounding of its edges to whole screen pixels, which moves the principal point by at most half a pixel each way, in a pattern that repeats with the crop's position and never grows. Converting the crop's corner with the map that is right for a pixel's centre adds half the scale's excess on top, a whole pixel on a display at 2 or 3.

pipeline · Viewport
window, 1280 × 720 logical, at 1.5117 × 73 pxfx 346.3 pxfy 348.4 pxcrop 211 × 131 → 117 wideheight 72.57 → 73

A thumbnail gives its camera a pixel it cannot see

A crop resized to a stated width has its height rounded, so its two focal lengths are scaled by two different ratios of whole numbers. They disagree by at most one rounding of the target's height, 1/(2h): 0.8% at 100 px wide, 0.1% at 800, and across ten thousand crop sizes the worst fills the bound. In the target's own pixels that is half a pixel times the crop's focal length in heights, six pixels for a narrow crop, while no corner of the picture moves more than half a pixel. A box and a square in the same thumbnail read the squeeze ten to forty times too coarsely to notice.

pipeline · Viewport
316 × 196690 × 428straight to 690fy/fx − 1 = 0.01%316 × 196117 × 73690 × 431via a 117 px thumbnailfy/fx − 1 = 0.71%316 × 19625 × 16690 × 442via a 25 px picturefy/fx − 1 = 3.28%boxes at 0.2 of their pixelseach tool rounds the height it was handed

A chain of resizes remembers its smallest picture

A picture resized several times, each tool keeping the aspect of the picture it was handed, carries every tool's rounding to the end: nothing undoes an earlier one, because the next tool rounds the aspect it was given. The final squeeze is bounded by the sum of every step's one rounding and fills it, so the smallest picture in the chain dominates, and an enlargement after a thumbnail brings the thumbnail's half pixel back magnified: 14 px of height at 690 px wide through a 25 px icon. The roundings add as a root of the count, floors add in a straight line, and a tool that keeps the source's own aspect forgets them all but its last.

pipeline · Viewport
0102030409.501010.5depth each row reports (m)row of the wallthe wall, 10 mno shear, each rowsheared, each rowfit, no shearfit, sheared65 mm pair, 900 px, 40 rowsfit 9.979 m against 9.75 m

A sheared rectification reads every wall at once

One constant shift of a rectified pair's principal points can put one depth exactly on a whole-pixel shell and no more. A shift that grows from row to row does what no constant can: shear one picture against the other so the shift climbs by one pixel over a wall's rows, subtract each row's share after the reading, and the rows' average lands on the wall's own disparity to within 1/(2n) of a pixel, at every depth at once — 2.1 cm at ten metres from forty rows, where the shells are 1.72 m apart. Only a shear can do it: a rotation or a difference of vertical scale breaks the shared rows. The price is one slant that the shear leaves undithered, and the gain belongs to a precise matcher; by 0.4 px of matcher error the matcher has dithered the wall itself.

twoviews · Epipolar
00.2500.5000.7501-20-1001020pixel down the patch's middle columnintensityexactsnapped spansturned framebank 20°, 0.3 cycles a texelrms: spans 0.120, frame 0.126

A banked floor drawn in its own frame trades place for sharpness

A renderer that walks a banked floor along its lines of constant depth, snapping each pixel to the nearest one, moves the texture by up to half a pixel across the line. Drawn instead on a lattice turned to those lines, every sample exact, and resampled onto the page once, the texture stays in place and loses contrast. The two errors are different in kind and grow differently: the snapped spans' in proportion to the texture's frequency, the resampled frame's as its square. So the frame is far better on slow textures, twelve times at 0.02 cycles a texel, and worse near the finest a pixel grid carries, with the crossing at 0.28 cycles a texel at every bank; on a checker, whose error lives at its edges, the two stay within a few per cent. Bought with more samples, each improves on its own schedule.

pipeline · Perspcorrect
2 point lampsthe card2 lamps across 36 cmstep 0.5000, worst error 0.2488

How many lamps make one lamp

An array of point lamps spread across the width a real lamp would occupy leaves a staircase rather than a ramp — 4 lamps step by 25.0 per cent of the whole, 64 by 1.6 per cent — and the worst departure from the true ramp falls as the -1.007 power of the count. A single point lamp is not a coarse version of that staircase; it is wrong by 0.50, the most a fraction can be wrong by.

light · Array

Named alongside it

The objects these essays reach for when they reach for this one.

Focal lengthinstrument limitPrincipal pointCamera matrixDisparitySampling gridDepth uncertaintyHomogeneous coordinatesrectified pairResidualAspect ratioDepth division

All concepts