Shutter Codes for Scenes Made of Moving Objects

When a camera's shutter stays open while things move, each moving object smears into a streak, and fine detail along the motion direction is lost. Coded exposure fixes part of this. The shutter flickers open and closed in a chosen on/off pattern during one frame, so the smear keeps its detail and can be undone mathematically. But nearly every shutter code in use was designed under one assumption: the whole image blurs the same way. Real scenes are a few independent things moving differently in front of a background, and a code tuned for one global blur is not obviously the right code for telling those things apart.

We propose to design the shutter code jointly with a decoder that describes the scene as a small set of layers. Each layer is one object, with an appearance, a soft mask, and a short parametric trajectory. The code is optimized to make those trajectories recoverable from a single coded frame: their speeds, their directions of travel, and where each layer ends. It is not optimized to make every pixel of a dense video reconstructable. In two sentences: a flickering shutter stamps a time-code into every motion streak, and we choose that time-code so a decoder that thinks in terms of objects can read off how each object moved. The question we test is whether building object structure into the decoder changes which shutter code is best, and whether that change pays off in motion accuracy per captured photon.

Where the Directions Meet

Coded exposure supplies the physical mechanism. The flutter shutter of Coded exposure photography: motion deblurring using fluttered shutter replaces the box-shaped time window of a normal exposure with a pseudo-random binary sequence. A box window has frequencies where its response is exactly zero, and detail at those frequencies is lost for good; the binary sequence removes those zeros and makes deblurring stable. Fluttering Pattern Generation Using Modified Legendre Sequence for Coded Exposure Imaging showed that low-autocorrelation Legendre sequences give the flattest spectrum. Both papers optimize a property of one global blur kernel. That is the assumption we drop.

A second property of these codes matters more for us than invertibility. An asymmetric code makes the streak an optical timestamp: it records which end of the streak came first. The principle goes back to particle-image velocimetry, where Asymmetric autocorrelation function to resolve directional ambiguity in PIV images used unequal pulse spacing to order particle positions in time. Legendre codes were chosen for flat spectra, not for how well they reveal direction and speed. When the unknown is a few trajectory parameters rather than a dense image, those two goals can pull the code in different directions.

Hardware-software co-design, which treats the optics and sensor timing as trainable first layers of a network, supplies the method. Time-Multiplexed Coded Aperture Imaging: Learned Coded Aperture and Pixel Exposures for Compressive Imaging Systems learned binary exposures end to end. It used hard thresholding in the forward pass and a sigmoid relaxation in the backward pass, and reported gains above 4 dB PSNR in hyperspectral and light-field imaging. We reuse that training trick directly. Deep Optics for Monocular Depth Estimation and 3D Object Detection and CodedVO: Coded Visual Odometry motivate the task-driven framing. Both designed optics so that the blur itself encodes a scene quantity, in their case depth, instead of producing a clean picture. We apply the same logic to time: the coded blur should encode per-object motion.

The closest existing system is BDINR, from Lightweight High-Speed Photography Built on Coded Exposure and Implicit Neural Representation of Videos. It pairs a fixed asymmetric flutter code with an implicit neural representation, meaning a network that outputs the frame at any continuous time. It unfolds one coded frame into a video and reaches 30.64 dB PSNR on GoPro with 3.7M parameters. BDINR differs from our proposal on two axes. Its code is fixed rather than co-designed, and its output is an unstructured stream of frames rather than an explicit set of objects with trajectories. Generalized compressive recovery frameworks such as A Unified Framework for Compressive Video Recovery From Coded Exposure Techniques share the second property: they recover dense video. We found no work in the file that jointly optimizes a shutter code for a layered, object-level scene model.

The research file did not include specific papers on structured scene representations. The layered model below is therefore our own design choice and should not be read as borrowed from a cited system.

Core Claim

A global shutter code optimized for a layered scene model with per-object parametric motion should give lower velocity and direction error, and sharper layer boundaries, than two alternatives at the same photon budget. The first alternative is a Legendre code. The second is a code learned for dense video reconstruction.

The mechanism is identifiability. Dense reconstruction rewards flat spectra everywhere. Layer-wise motion estimation rewards codes whose streaks look very different for small changes in speed or for reversed direction, and that stay separable where two layers overlap. We also expect the learned code to spend its open time differently: shorter total open time, but more informative timing. That matters because the main practical weakness of coded exposure is discarding photons in low light.

Research Program

The forward model is written as a differentiable renderer. A coded frame is modeled as

$$B(x) = \int_0^T c(t) \sum_{k=0}^{K} w_k(x,t)\, A_k\big(x - p_k(t)\big)\, dt + n(x).$$

The symbols are as follows. $c(t)\in\{0,1\}$ is the shutter code over exposure time $T$. $A_k$ is the appearance of layer $k$, with $k=0$ the background. $p_k(t)$ is the layer's trajectory, parameterized as a low-order polynomial or a small homography path. $w_k(x,t)$ are occlusion-aware compositing weights computed from soft masks and a depth order. $n$ is shot and read noise, whose variance grows as $c$ is open less.

The decoder takes $B$ and predicts $\{A_k, \text{masks}, p_k\}$ for a fixed maximum $K$. Its structure is a slot-style encoder, meaning a network with $K$ competing output slots that each claim one object. The decoder re-renders its prediction through the same equation. It is trained on a mix of two losses: reconstruction loss on $B$ and on held-out sharp sub-frames, and supervised trajectory loss where ground truth exists.

We optimize the code in two independent ways, so that we can tell a real effect from an optimization artifact. The first is end-to-end training with the forward-backward binarization of Time-Multiplexed Coded Aperture Imaging. A duty-cycle constraint $\frac{1}{T}\int c \le \rho$ caps the photon budget. The second optimizes the code before any decoder exists, by minimizing a Cramér–Rao bound, the lowest achievable variance of any unbiased estimator. For a code $c$, let $\theta$ collect the trajectory parameters of all layers, and let $\mathcal{I}(\theta; c)$ be the Fisher information of the noisy observation $B$ with respect to $\theta$, averaged over a distribution of scenes. We then solve

$$c^\star = \arg\min_{c}\; \mathbb{E}_{\text{scenes}}\,\mathrm{tr}\big(\mathcal{I}(\theta; c)^{-1}\big) \quad \text{s.t. duty cycle} \le \rho.$$

If the two procedures converge on codes with similar autocorrelation structure, we have evidence that the effect comes from the representation and not from a quirk of training.

We keep a single global code rather than per-pixel codes. Pixel-wise exposure systems such as Space-Time-Brightness Sampling Using an Adaptive Pixel-Wise Coded Exposure are more expressive, but they need hardware that is harder to build. The software-defined sensors surveyed in Software-Defined Imaging: A Survey can already switch a global shutter pattern. Whether a single global code can serve several differently moving objects at once is exactly the point in dispute.

Baselines

The naive reference is a conventional box exposure of the same duration, decoded by the same layered network. This isolates what coding buys at all. A second naive point is a short exposure whose open time equals the coded duty cycle. It has the same photon count but no temporal coding, which tells us whether the code does more than shorten the exposure.

The strongest existing method is BDINR from Lightweight High-Speed Photography Built on Coded Exposure and Implicit Neural Representation of Videos. It reports 30.64 dB PSNR on GoPro coded-blur video reconstruction. We will retrain it on our exact synthetic coded frames with the same noise model and the same number of training iterations. Per-object motion is then extracted from its output by running a pretrained optical-flow network and a motion-segmentation step on the reconstructed frames. This is the obvious "reconstruct, then analyze" pipeline, and it is the strongest competitor because its dense reconstructions may already contain all the motion information. We found no reported result on Lacuna for per-object velocity or direction accuracy from coded-exposure frames, so this comparison will be established here rather than taken from the literature. To count as beating it, our system must do two things. It must lower mean velocity endpoint error by a margin larger than the seed-to-seed spread over at least three training seeds. And it must not lose more than 0.5 dB PSNR on sharp-frame reconstruction on GoPro.

The key ablation crosses code type with decoder type. The three codes are a Legendre code, a code learned for dense reconstruction, and a code learned for the layered decoder. The two decoders are a dense decoder and the layered decoder. Every cell receives the same tuning budget and duty cycle. Only this grid can show that the structured representation changes the optimal code, rather than simply being a better decoder.

Why not just…?

Why not just use a Legendre code and a better decoder? This is the most serious threat. The Legendre codes of Jeon et al. are already well conditioned, and learned codes often beat good fixed codes by only small margins. The ablation grid settles it directly. If the layered decoder with a Legendre code matches the layered decoder with a learned code on velocity error and direction accuracy, we report that the benefit lives entirely in the representation. The co-design claim would then be dropped.

Why not reconstruct dense video and run optical flow afterwards? Dense reconstruction spends its capacity on texture everywhere, including the static background. Errors near object boundaries, where layers overlap within the streak, pass straight into the flow estimate. The BDINR-plus-flow baseline above is exactly this pipeline, and it is judged on the same motion metrics. It is not given a handicap.

Why not capture a short burst instead of one coded frame? A burst multiplies readout bandwidth and read noise with every extra frame. Coded exposure uses one readout. We include a burst of equal total exposure and matched readout-noise model as an extra reference. If the burst wins at high light but loses in low light, that locates the regime where our approach is worth using. If it wins everywhere, that is a finding we will state.

Why not per-pixel codes? They would likely win in accuracy, but they need modulators such as DMDs or specialized pixel circuits. Our question is what a globally switched shutter can do, since global switching is the realistic deployment path.

Proposed Experiments

The main testbed is synthetic data where ground truth is exact. We composite two to four textured foreground layers over backgrounds drawn from GoPro sharp frames, with polynomial trajectories that include reversed directions and overlapping paths. Coded frames are rendered at matched duty cycles $\rho \in \{0.25, 0.5\}$ and at several photon levels. The metrics are three: velocity endpoint error per layer, direction-sign accuracy (the timestamp property), and mask intersection-over-union.

For comparability with published work, we also report PSNR and SSIM on the standard GoPro coded-blur setting against BDINR's 30.64 dB. A small real-capture check uses a camera with a programmable global shutter, filming objects moved on a motorized stage, where trajectories are known.

Two outcomes are decisive. The first is whether the code learned for the layered decoder and the code from the Cramér–Rao bound agree with each other and differ measurably from the Legendre code, both in autocorrelation and in the grid results. The second is whether the advantage grows as light falls and as the number of overlapping layers increases, which is what the identifiability argument predicts. If neither happens, the representation, not the co-design, is the contribution, and the note will say so.