In the live Kinect viewer, the browser can skip ahead to the latest cloud. For looking around the room, I want a current picture. But suppose I change the rule that decides when a surface has entered a box. If I move my hand in front of the sensor a second time, I’ve changed both the rule and the input.
I added recording to Kinect Lab so I could rerun the analysis on one passage. The test I wanted was simple to read. Given the same input and settings, would the journal put the entry and the exit on the same frames?
What I saved before projection
My earlier offline viewer can already open a saved point cloud. For this experiment I wanted to recompute the analysis, including the reference depth from the first part of the recording. I save the bridge’s rectified depth, registered color and smaller RGB preview before application projection. The archive also carries factory calibration and the original frame metadata, including depth sequence numbers and host arrival timestamps. These are the processed inputs that Kinect Lab receives from the bridge.
The capture code copies each acquired pair into an owned packet. The capture loop keeps using its buffers while the writer owns the data it still has to write. The channel has four waiting slots. If they fill up, recording fails explicitly. The overload test stalls the writer, fills all four slots and checks that the fifth submission and the attempt to finish both fail.
Each frame pair occupies 2,125,588 bytes in the uncompressed archive. At 30 pairs per second, that would be about 64 MB/s. In the take I use below, the recorder received 442 pairs in 30.037 seconds, about 14.7 pairs per second or 31.3 MB/s. At that rate, it wrote all 442 pairs, just under 940 MB, and the waiting queue peaked at one packet.
The driver’s pairing listener counted 458 individual color or depth frames discarded before they reached the recorder. It increments that counter when a per-stream queue overflows or when it skips older frames to select a match by timestamp. The depth sequence numbers below retain their gaps, and the combined count gives me no breakdown by stream. The archive contains every pair the recorder received. The lower delivery rate in this run remains unexplained. When I measured the depth references, the server also published about 15 clouds per second, and that cause is still open too.
The clock inside the recording
The replay server reads this archive without opening the Kinect. On forward playback, the browser waits for analysis of the current frame to be accepted before it advances. If a seek or pause invalidates the request while analysis is running, the player checks the token before allowing a late result to move the playhead.
The zone monitor turns repeated depth observations in a box into entry and exit events. It needs elapsed time as well as distinct observations. Using the browser’s current clock would let a slow worker or a pause change how long a candidate appears to persist. In replay, I feed the monitor time derived from the recorded host arrivals. I can pause between successive steps without inserting a gap into the recorded observations. A seek starts a fresh event history, since the frames on either side of the jump no longer form a continuous observation.
Two runs through the passage
I passed my hand into the passage, held it briefly and withdrew it. The replay check ran twice on that recording. Both runs used the same zones (Passage, Near field and Near middle) and a depth reference built from frames 1 through 30. The change display threshold stayed at 100 mm. Both runs requested all 442 frames in order. The recording spans 29.41 seconds of host arrival time. The runs took 33.277 and 33.783 seconds of elapsed playback time.
| Event in the “Passage” zone | Recording time | Frame | Original depth sequence |
|---|---|---|---|
| Entered | 22.144 s | 333 | 689 |
| Exited | 22.736 s | 342 | 707 |
The journal matched in both runs. The event times describe when the monitor confirmed enough measured depth in or through the box. They do not timestamp the exact moment my hand crossed either boundary.
With the recording on disk, I can change a rule and ask a concrete question about the result. Did it move the entry away from frame 333? I can go back to what the sensor measured there without trying to move my hand the same way again.
Comments, questions, or just a reaction?
Send an email to ~bounga/bounga.org-discuss@lists.sr.ht. It is public and archived, so other readers can follow along and answer too.