Depth from travel time
Structured light and stereo triangulate: they need two viewpoints a baseline apart, and their depth error grows with the square of the distance. Time of flight needs no baseline. The sensor sends light and times its return; the light travels to the surface and back, so
A distance of 1 m means a round trip of 6.67 ns, and 1 mm of depth means 6.7 ps. Timing a single pulse that precisely needs fast detectors and electronics. This is how lidar works: one pulse, or a few, per point, scanned over the scene.
Phase instead of time
A time-of-flight camera measures every pixel at once and avoids timing single pulses. It modulates its light with a frequency , tens of megahertz, and each pixel compares the phase of the light that comes back with the phase of the light that went out. The round trip delays it by , a phase shift of
The pixel samples the received intensity four times per period, a quarter period apart. The background light and the strength of the reflection are unknown, but they cancel:
A higher frequency turns the same depth error into a larger phase change, so noise on the samples matters less.
The ambiguity range
A phase is only known up to whole periods. A surface at and one at give the same phase, so the sensor measures the distance modulo the ambiguity range
which is 7.5 m at 20 MHz and 1.5 m at 100 MHz. A higher frequency is more precise, but its range is shorter. Cameras resolve this by measuring with two or more frequencies: only the true distance fits all of them.
Try this
- Set the timer resolution of the pulse to 1 ns: the distance comes in steps of 15 cm. To get to 1 cm, the timer needs steps of 67 ps.
- Add jitter and press New measurement a few times: 100 ps of timing jitter is already 1.5 cm of depth.
- For the modulated signal, increase the distance slowly: the received wave slides to the right, and at it is back where it started. The measured distance drops to 0.
- Raise the frequency to 100 MHz: the ambiguity range shrinks to 1.5 m, and the sawtooth in the plot gets dense.
- Add noise to the samples at 10 MHz and at 100 MHz: the same noise gives a ten times smaller depth error at the higher frequency.