Structured light — projector emitter

This window is the projectors. Put it full-screen on the framebuffer that drives them, tell it what the rig is, and it plays the calibration sequence into one projector’s raster at a time. Nothing is installed and nothing on the display machine is changed.

The rig

The sequence

Frames leave here encoded for a display gamma of 2.2 — PARAMETERS.md §3.2’s nominal. The Gray planes do not care, being black or white either way; the phase steps are sinusoids in emitted light and would be biased by a projector whose transfer is far from that. §3.2 classes the per-channel exponents as unmeasured and notes real projectors diverge 0.1–0.3 between channels, so this is an assumption rather than a measurement, and nothing here can check it for you.

Read a capture back

After shooting, bring the photographs here with the plan file you saved above. This decodes them and says what the capture was worth — how many correspondences survived, out of how many camera pixels, and which projectors nothing reached. It does not compute a pose: that needs each camera’s intrinsics, which this page does not have and cannot derive.

Your files are read through a canvas, which converts whatever colour profile they carry into sRGB before this page sees a single pixel. So the transfer is not a setting: these bytes are sRGB whatever the camera wrote, and telling the decoder otherwise would leave every correspondence in place and move it about thirteen times further from the truth. Shoot JPEG or PNG. A RAW file the browser cannot decode is refused rather than guessed at.

Hand in the whole camera position — every projector’s run, back to back, in the order they were shot — and never delete a photograph from its folder: not a spoiled run, not an exposure test. A deleted run is a fault this page cannot catch, because every projector after it can then be numbered wrongly with nothing to say so. Photographs that do not belong — ones taken before you pressed Play, a few test shots before the first run, of any frame and at any exposure, dark ones taken after the screen went black — are recognised and set aside, and a projector this camera could not see is noted rather than refused: there is nothing of it to decode. This page finds each run by what its own white, black and phase frames show, then checks that each Gray plane still sits beside its own complement. A frame lost or shot twice inside one run is usually caught, and costs that projector’s run rather than the capture.

So that those extras stay few, do not start the intervalometer long before you press Play, and stop it soon after this page’s end tone: keep them under about 30 at each end with the default plan of 34 frames a projector, which is about a minute at a 2-second dwell, and well under one projector’s run with any plan. When a projector is out of this camera’s view, its run is dark photographs too, and they look just like extras at either end. A long run of extras can then leave this page unable to tell which projector is which, and it refuses the folder rather than guess. What it cannot tell from a clean folder are the faults these notes name — a deleted run, photographs lost at an end, a paused page, a run stepped back within — which can file runs under the wrong projector with nothing to say so.

The end tone, not the sphere going dark, is the end of the position. With “Tick on each step” ticked, every step ticks and the end is a lower, longer tone, as the page paints the screen black. You stand at one camera, and from there the sphere looks dark for the whole run of a projector lighting its far side: that is a projector this camera cannot see, still playing, and its run must still be photographed — its dark photographs are how this page counts it. So start the intervalometer before you press Play, and stop it only after the end tone. A camera started after Play loses photographs at the front of the folder, and one stopped when the sphere went dark on your side loses them at the back; where the projector there is one this camera cannot see, they are dark, and nothing in the folder says they are gone. Four or more of those lost at one end — or all but a few, where the projector there is one this camera can see — with more than 30 dark extras at the other, such as the page’s black kept a minute after the end tone or a long wait before Play where projector 1 is out of this camera’s view, read by count exactly like a folder numbered a projector over, and this page can file every run under the wrong projector with nothing to say so. So can a page paused for a minute while a projector this camera cannot see is playing, where the last projector is out of view too: stop the camera, not the page.

Set the camera number before you read each position — 1 for the first, 2 for the next. Each camera is a separate solver input with its own pose, and nothing in a photograph says which one held the shutter. Every position you read is kept under its number until you load a plan file, and the report covers all of them, because one camera cannot separate a projector’s distance from its field of view: it takes a second position before the report will vouch for a solve. Reading a camera number again replaces what it held, and photographs read again under another number move to it.

If a report asks you to re-shoot a projector, leave the spoiled run where it is, add the new photographs to the end of that camera position’s own folder, and read the folder again under the same camera number. Re-shoot a run from its white — Home, then ] — and never step back within it with ← or Previous: a run played again from partway can be filed with its frames out of place, with nothing to say so. Each re-shot run is matched to its projector by comparing it with the photographs already there, and is read in place of that projector’s earlier run if it passes its checks. Do that only while the tripod has not moved since the position was shot: that comparison cannot tell a camera that moved. Once it has, shoot the whole position again into a new folder and read it under the same camera number, which replaces what that number held. Do the same, aiming the start, when the refusals are patterns that no longer add up to their complements in more than one run: that is what a photograph taken while the pattern changed looks like, and it spreads across the whole position, runs that passed included (docs/CALIBRATE.md Part 4.2).

Before you photograph anything, step to each projector’s white frame and check that the projector that lights up is the one the panel names. If it is not, this display’s quadrant order differs from the config’s, and every frame after that would be filed under the wrong projector.