Skip to content

Poses that contradict the world

S edited this page Aug 20, 2026 · 3 revisions

Poses that contradict the world

A pose solver returns an answer for whatever you feed it. Its reprojection error tells you the answer is consistent with the image. It cannot tell you the answer is consistent with reality, and those come apart more often than is comfortable.

How a perfect solution can be wrong

  • The two-fold ambiguity. A planar target admits two poses that reproject almost identically. Pick the wrong one and your overlay is tilted the opposite way, with a residual that looks fine.
  • A misdetected quad. If the detector's corners are subtly wrong — motion blur, a partially occluded code, a reflection — the solver faithfully solves the wrong problem.
  • A wrong size assumption. Scale ambiguity means a bad edge length yields a pose at the wrong distance, perfectly consistent in the image.
  • A code on a screen or in a reflection. The detector sees a valid code. It is not where the geometry says it is.

In every case the residual is small. Something else has to object.

Two of these — the ambiguity flip and a wrong size assumption — are about the pose's orientation and scale, and the check described below does not address them. What it does address is the crudest and most common one: a pose that puts the marker somewhere no physical thing could be.

The device already has an opinion

If the session is capturing depth, the framework is accumulating an occupancy grid — a voxel model of which parts of the space are occupied, built from the depth stream as the user moves. It exists for other reasons (the physics demo bounces balls off a mesh derived from it) but it is exactly the independent evidence a pose check needs.

A printed marker is a physical thing on a physical surface. So a solved pose implies claims about the world that the occupancy grid can check:

  • Is there a surface where the marker claims to be? A code floating in empty space, a metre in front of the wall, is not a code.
  • Is anything solid between the camera and the marker? If the line of sight to the marker passes through occupied space, you are looking at something that cannot be seen from here.

checkQrPlausibility is this check, and its verdicts are exactly those two questions plus "no grid yet": plausible, floating, behind-surface, no-grid.

Two limits are worth stating, because the more ambitious version of this idea is the one people assume is already implemented. The check takes the marker's centre point, not its full pose — so it cannot compare the marker's plane against the wall it is taped to, and it does not catch the two-fold ambiguity flip, which is the failure that would most benefit from an independent opinion. And the occlusion test is a scan over occupied cells rather than a ray-traversal algorithm; the framework does have voxel traversal, but it is used for carving free space into the occupancy grid, not here.

It is also a function you can call rather than a gate that is running: no app currently invokes it.

Why this is better than tightening the residual

The obvious alternative is to demand a lower reprojection error. It does not work, because the failure cases above have low residuals. Tightening the threshold rejects good detections at range and awkward angles while keeping the confidently-wrong ones. You lose recall without gaining precision.

The plausibility check works because it consults a different sensor. The solver reasons about the colour image; the occupancy grid comes from depth. For both to agree on a wrong answer, two independent sensing paths have to fail in a correlated way — rare, where a single-sensor check fails silently all the time.

The design principle

Sensor fusion is usually discussed as combining measurements to reduce noise. The underrated half is combining them to detect contradictions. Any time two sensors can be made to answer the same question, their disagreement is a free error detector, and it catches the failures that a confidence score computed from one sensor never will.

The same shape appears throughout this project: GPS observations checked against odometry-derived motion, marker size measured from depth rather than configured, marker pose checked against reconstructed geometry. In each case the second source is not there to improve the number. It is there to notice when the number is a lie.

The practical caveats

  • No depth, no check. The plausibility gate must degrade to "unverified" rather than "rejected" when depth is unavailable, or you lose marker support entirely on devices that lack it.
  • Early in a session the grid is empty. Absence of a surface is not evidence of absence until the user has actually looked at that space.
  • Moving things break it. A code held in someone's hand will keep disagreeing with a grid built a few seconds ago — correctly, but not usefully.

Which points back at the earlier rule: a marker used as an anchor must be fixed and surveyed. The plausibility check is one more reason that constraint is not bureaucracy.

Clone this wiki locally