AR: sub-pixel corner refinement, ROI-first detection, anchor coplanarity check

This commit is contained in:
jessikitty committed 2026-10-12 13:07:46 +11:00
1 parent 7947eb61a0
commit 7fc2b02e6a
13 files changed
+1160 -10

No files matched your search

+28
View File
@@ -101,6 +101,9 @@ ws open rx active,pong WebSocket state + recent message types
scene 11 anchors ghost recs 2 scene loaded, ghosts held client-side
60 fps detect 20Hz@960 fov 58 render rate, detect rate/resolution, camera fov
REJ:jump (only when the solver refused a pose)
scan roi 4x @1.3x 38kpx detection mode: 4 crops, each 1.3x the detail
subpix 4/4 0.21px ...of a full scan; corners refined, mean shift
geom spread 10.4cm (max 16.0) anchor conditioning — see below
eng opencv moving engine; FROZEN = ghost motion paused
axis std cv:ready engine mode + OpenCV worker state
markers 3/4 seen [0,4,6] +1dup solved/raw crests, ids, duplicate decodes
@@ -116,6 +119,31 @@ mirrored axis; a constant ratio means the projection doesn't match the lens (tun
`localStorage.nbx.hfovDeg`); an intermittent horizontal flip with correct vertical
is the coplanar ambiguity — stand the tower up.
**Scan line.** `full` means the whole detection frame was decoded; `roi Nx`
means N crops around the previous frame's crests were decoded instead, each at
native video resolution. `@1.3x` is how much more detail each crop carries than
the same patch of a full scan — above 1.0 the crop is the better read. `kpx` is
pixels actually decoded this tick; compare it against 518k for a full 960x540
scan. `roi>full` means a crop pass came back short and a full scan ran straight
after, which is the designed fallback and costs one wasted pass. A full scan
also runs at least every 600ms regardless, to pick up newly visible crests, so
`markers ... not in this layout` can lag by up to that long in roi mode.
**Subpix line.** `refined/total` crests whose corners were refined, and the mean
correction applied, in detection-space pixels. A mean shift around 0.2-0.5px is
normal and is roughly the quantisation the raw detector leaves behind. `0/4`
means refinement is rejecting everything: too little contrast, too small a
crest, or surface texture around the border — it falls back to raw corners, so
nothing breaks, but tracking is no more precise than before.
**Geom line.** RMS distance of every anchor corner from the best-fit plane
through all of them. `COPLANAR` means every crest shares a plane, which is the
condition that makes a mirrored camera pose fit the pixels just as well as the
true one; the physics gates in `cv-worker.js` will be doing all the work and
will occasionally be wrong. Stand a crest up — the A3 rig's tower gives ~3.5cm,
and a single wall-mounted crest at 8cm in a town layout gives ~2.7cm. Both are
comfortably clear of the 1.5cm threshold.
## Gotchas worth remembering
**Detection filters against the active scene.** A crest that isn't an anchor in