r/computervision • • Oct 08 '26

Help: Project RGB-D relocalization: good feature matches, but wrong camera poses

I’m building a 3D mapping system using RGB-D cameras, based on existing SLAM techniques, with persistent spatial memory.

The main issue is relocalization after tracking loss, especially when the camera returns to a known place from a different viewpoint.
I’m using historical keyframes, shared 3D landmarks, PnP/RANSAC and geometric verification.

Yet some incorrect poses still pass verification: one had 44 inliers, 0.83 px median reprojection error and 3.72 cm depth residual, but was actually off by 10.36 cm and 5.99°.
My best experiment correctly relocalized only 9/34 known returns.

What would you investigate first: landmark quality, geometric degeneracy, matching, or pose verification?
I can share a minimal reproducible example.

2 Upvotes

4 comments sorted by

1

u/sam9510 Oct 08 '26

Are you using VIO to track camera movement? or buffered tracking? Those might help prevent tracking loss in the first place. After loss - I think lightglue is good at reacquiring even with bad jitter.

1

u/Flyward_Aerospace Oct 09 '26

Your own numbers point at degeneracy rather than matching. 44 inliers at 0.83 px median that is still 10 cm and 6 degrees out is what you get when the inliers sit on a near planar patch or in a narrow bearing spread, because then you can slide along the optical axis without moving reprojection error much. Reprojection error just isn't observing the DOF you care about there. Before touching the matcher I'd run a PCA on the inlier landmark cloud and look at the smallest eigenvalue, plus the angular spread of the bearings, and gate acceptance on that instead of inlier count. Worth checking whether those landmarks were triangulated off a narrow baseline too, since their positions are then very uncertain along the original viewing ray and a wrong pose will fit them fine.

1

u/xArvel_Crynydx Oct 10 '26

Well, if the main problem is tracking loss and finding an object again, that calls for a Kalman-filter-like approach. It's one standard approach of estimating the position of an object after loss (like a GPS signal from a car driving through a tunnel, or a pedestrian walking across a car (in an automotive cross-traffic-alert situation), temporarily hidden behind an object like a wall or other pedestrians crossing the street. You have detected the object and determined the speed and trajectory and you would estimate where the object would have been later.

If it's a known location and you'd only move the camera in a controlled way (i.e. you can only rotate within one axis), you could create a blank template first, so you could match this as sort of ground truth (sort of like determining the viewframe from a known panorama). If you have motion data, you can do something like structure from motion and determine the camera movement from there (or multi-view stereo). So there are several approaches I would start with in this scenario.