The cheapest motion detector in the world is a subtraction. Take a frame, take the next one, line them up pixel for pixel, and subtract. Where nothing moved, the two frames agree and the difference is zero — black. Where something moved, they disagree, and the difference lights up. Run your eye down the bright pixels and you’ve found the motion without ever teaching a machine what a car is.
It is a genuinely lovely idea, and for a camera bolted to a wall it nearly works. The background holds still frame to frame, so it subtracts away to nothing, and the only thing left glowing is the thing that actually moved — the car, the cyclist, the door swinging open. Motion falls out of arithmetic.
Then the camera moves, and the whole trick inverts.
Everything changed, so everything “moved”
Public cameras are not bolted to your wall. They are somebody else’s — a city traffic cam that pans on a schedule, a shop’s webcam a passer-by knocks a few degrees, a pole-mounted feed that sways in a gust. The moment the camera shifts, even slightly, every pixel in the frame lands somewhere new. The lamppost that was at column 200 is now at column 214. The road markings slid. The skyline slid. Subtract this frame from the last and the two no longer agree anywhere, so the difference lights up everywhere.
The detector, faithfully, reports what it was built to report: motion, across the entire frame. It is not wrong about the pixels. Every one of them did change. It is wrong about the world — nothing out there moved except the one car, and the one car is now a needle in a field of false alarms it can’t be told apart from. A three-degree nudge of the lens has manufactured more “motion” than a rush-hour intersection ever could.
This is the trap under every naive change detector, and it has a name: you have confused the motion of the camera with motion in front of it. Egomotion — the camera’s own movement — reads identically to the thing you actually care about, because both of them are just pixels that changed. The arithmetic can’t see the difference. Only the geometry can.
The world moves one way; the camera moves every way at once
Here’s the tell that lets you separate them. When a real object crosses the scene, it moves and almost nothing else does. One car slides left; the road, the buildings, the sky all stay put. The change is local — a small island of disagreement in an ocean of frames that still match.
When the camera moves, the opposite happens. The car keeps doing its own small thing, but now the road, the buildings, and the sky all shift too — and, crucially, they shift together, in a single coherent way. Pan the lens right and the entire background slides left by the same rule. That coherence is the signature. A whole frame agreeing on one direction of shift is not a hundred objects deciding to move in formation; it’s the camera, and only the camera, that could produce it.
So the job isn’t to detect change. Change is easy and change is a liar. The job is to first explain away all the change that a single camera movement would account for — and then take seriously only the change that’s left over, because that’s the part the camera can’t be blamed for.
Measure the lens first, then ask what’s left
The order matters, and it’s counterintuitive. You do not look for the moving car first. You look for the camera’s motion first, precisely so you can subtract it and stop it from drowning everything.
Pick a scatter of stable landmarks in the frame — corners, edges, high-contrast marks that ought to be nailed to the ground: a curb, a sign, the corner of a building. Track where each of them went from one frame to the next. If the camera held still, they didn’t move and there’s nothing to correct. If the camera panned, they all moved, and — this is the gift — they all moved in a way that fits one simple transform: a shift, a small rotation, a zoom. Solve for that one transform and you have measured the camera’s own motion directly, in pixels.
Now warp the previous frame by that transform before you subtract — re-register it, so the lamppost lands back on the lamppost and the curb back on the curb. The background, which only appeared to move because the lens did, cancels to black again. And the car, which was moving on its own account and doesn’t fit the camera’s transform, survives the cancellation. It’s the one thing that refused to move in formation, so it’s the one thing left glowing. You’ve handed the false alarms back to the lens and kept the single true one.
The figure above runs exactly this: a frame pans, the naive difference floods the scene red, and then the background is registered and pinned — and the flood drains off everything except the one object that was genuinely crossing.
Why a platform of borrowed cameras has to care
For a system that owned its cameras, this would be a nice-to-have. Bolt the camera down, and egomotion mostly goes away. Thyseus doesn’t get that luxury. Its whole premise is reading cameras it doesn’t own and can’t stabilize — feeds that pan on someone else’s schedule, that get bumped, that lean in the wind — and turning what they see into points on a shared map. A false “motion” flag isn’t a cosmetic glitch there. It’s a phantom object about to be placed on the map at a real coordinate, indistinguishable, downstream, from a car that was actually there.
Get the egomotion step wrong and every gust of wind becomes traffic. So the map’s honesty starts one step earlier than anyone looking at it would guess — not at “is there a car,” but at “did the world move, or did the lens?” You cannot map what moved until you can tell the two apart. The whole pipeline waits on the boring question first, because the interesting one gives a confident wrong answer if you skip it.
A camera that never moves makes the world easy to read. A camera you don’t control makes you earn it — by measuring its restlessness before you trust anything it shows you.