ReUseX  0.0.5
3D Point Cloud Processing for Building Reuse
Loading...
Searching...
No Matches
reusex::geometry::LoopClosureOptions Struct Reference

Parameters for wide-baseline loop-edge detection. More...

#include <LoopClosure.hpp>

Public Attributes

bool enable
 off by default; opt-in via rux optimize --loop-closure
LoopProposal proposal = LoopProposal::automatic
 Candidate-proposal strategy (see LoopProposal). Default automatic.
int exhaustive_budget = 80000
 automatic uses exhaustive proposal when the temporally-distant pair count is at most this; above it, appearance (BoW) retrieval.
int min_frame_gap = 50
 Skip pairs closer than this in frame index (those are handled by the temporal odometry factors, not loop edges).
int max_candidates_per_frame = 5
 Keep at most this many candidates per frame (nearest / most-similar first).
float max_candidate_distance = 2.5f
 Propose a pair only if the seed camera centres are within this distance.
float max_view_angle = 45.0f
 …and their optical viewing directions agree within this angle.
int vocab_size = 400
 visual words (binary k-means clusters)
int vocab_sample_per_frame = 80
 descriptors sampled per frame for vocab
int vocab_iterations = 8
 k-means (k-majority) refinement passes
int max_features = 3000
 ORB features per frame.
float ratio_test = 0.85f
 Lowe ratio threshold for descriptor match.
int min_match_inliers = 60
 reject a pair below this many RANSAC inliers
float ransac_inlier_dist = 0.10f
 3D-3D inlier threshold (m)
int ransac_iterations = 300
 RANSAC hypotheses.
float min_depth = 0.3f
 ignore keypoints with depth outside
float max_depth = 5.0f
 [min_depth, max_depth] (m)
float max_seed_disagreement = 0.0f
 Optional sanity gate: reject an edge whose relative translation disagrees with the seed poses by more than this (m).
float min_seed_disagreement = 0.10f
 LOWER gate: keep a loop edge only if its relative translation disagrees with the seed poses by at least this (m).
float min_seed_disagreement_fraction = 0.00555f
 Scale-relative part of the lower gate: a fraction of the seed trajectory's extent (issue #339).
float base_sigma_trans = 0.10f
 Base translational/rotational std at min_match_inliers; both shrink as sqrt(min_match_inliers/inliers) so well-supported edges pull harder (down to the floors below).
float base_sigma_rot = 0.05f
 rad
float min_sigma_trans = 0.04f
 floor on the translational std (m)
float min_sigma_rot = 0.02f
 floor on the rotational std (rad)
bool pcm = true
 Keep only the largest MUTUALLY CONSISTENT set of loop edges (Mangelson et al., PCM).
float pcm_trans_threshold = 0.30f
 cycle translation tolerance (m)
float pcm_rot_threshold = 0.15f
 cycle rotation tolerance (rad, ~8.6 deg)
int pcm_max_edges = 3000
 Cap the edge set fed to the O(M^2) consistency test (keep the highest- inlier edges).
unsigned seed = 42
 RANSAC determinism.

Detailed Description

Parameters for wide-baseline loop-edge detection.

Definition at line 86 of file LoopClosure.hpp.

Member Data Documentation

◆ base_sigma_rot

float reusex::geometry::LoopClosureOptions::base_sigma_rot = 0.05f

rad

Definition at line 173 of file LoopClosure.hpp.

◆ base_sigma_trans

float reusex::geometry::LoopClosureOptions::base_sigma_trans = 0.10f

Base translational/rotational std at min_match_inliers; both shrink as sqrt(min_match_inliers/inliers) so well-supported edges pull harder (down to the floors below).

Deliberately loose: an ORB+depth relative pose has cm-scale error, so an over-confident edge injects that error broadly (measured: tight defaults dropped honka GT 0.795 -> 0.770). GNC down-weights gross outliers on top. m

Definition at line 172 of file LoopClosure.hpp.

◆ enable

bool reusex::geometry::LoopClosureOptions::enable
Initial value:
=
false

off by default; opt-in via rux optimize --loop-closure

Definition at line 87 of file LoopClosure.hpp.

◆ exhaustive_budget

int reusex::geometry::LoopClosureOptions::exhaustive_budget = 80000

automatic uses exhaustive proposal when the temporally-distant pair count is at most this; above it, appearance (BoW) retrieval.

~80k pairs is a few minutes of matching.

Definition at line 95 of file LoopClosure.hpp.

◆ max_candidate_distance

float reusex::geometry::LoopClosureOptions::max_candidate_distance = 2.5f

Propose a pair only if the seed camera centres are within this distance.

m

Definition at line 107 of file LoopClosure.hpp.

◆ max_candidates_per_frame

int reusex::geometry::LoopClosureOptions::max_candidates_per_frame = 5

Keep at most this many candidates per frame (nearest / most-similar first).

Caps the O(N^2) proposal down to ~N*K matcher calls.

Definition at line 103 of file LoopClosure.hpp.

◆ max_depth

float reusex::geometry::LoopClosureOptions::max_depth = 5.0f

[min_depth, max_depth] (m)

Definition at line 127 of file LoopClosure.hpp.

◆ max_features

int reusex::geometry::LoopClosureOptions::max_features = 3000

ORB features per frame.

Definition at line 121 of file LoopClosure.hpp.

◆ max_seed_disagreement

float reusex::geometry::LoopClosureOptions::max_seed_disagreement = 0.0f

Optional sanity gate: reject an edge whose relative translation disagrees with the seed poses by more than this (m).

DISABLED by default (<= 0): the whole point of loop closure is to correct drift, so a large seed-disagreement is the signal, not the noise — hard-gating it throws away exactly the informative constraints (the #221 sweep learned this the hard way). Geometric RANSAC inlier count + GNC do the outlier rejection instead. Set > 0 only when the seed poses are trusted and you want a coarse guard against gross mismatches.

Definition at line 136 of file LoopClosure.hpp.

◆ max_view_angle

float reusex::geometry::LoopClosureOptions::max_view_angle = 45.0f

…and their optical viewing directions agree within this angle.

deg

Definition at line 109 of file LoopClosure.hpp.

◆ min_depth

float reusex::geometry::LoopClosureOptions::min_depth = 0.3f

ignore keypoints with depth outside

Definition at line 126 of file LoopClosure.hpp.

◆ min_frame_gap

int reusex::geometry::LoopClosureOptions::min_frame_gap = 50

Skip pairs closer than this in frame index (those are handled by the temporal odometry factors, not loop edges).

Definition at line 100 of file LoopClosure.hpp.

◆ min_match_inliers

int reusex::geometry::LoopClosureOptions::min_match_inliers = 60

reject a pair below this many RANSAC inliers

Definition at line 123 of file LoopClosure.hpp.

◆ min_seed_disagreement

float reusex::geometry::LoopClosureOptions::min_seed_disagreement = 0.10f

LOWER gate: keep a loop edge only if its relative translation disagrees with the seed poses by at least this (m).

An edge that already agrees with the seed carries NO drift-correction information — it only re-imposes the noisier ORB+depth estimate on poses that are already right, which perturbs an already-good scan (measured: honka GT 0.795 -> 0.73 from redundant edges). This is the opposite of max_seed_disagreement and is safe: it drops only non-informative edges, never the large-drift corrections. On a well-aligned scan this makes loop closure a near no-op; on a drifted scan the true loop (large disagreement) is kept. Set 0 to keep every edge.

This is the ABSOLUTE FLOOR of the gate (issue #339). The gate actually applied is max(min_seed_disagreement_fraction * trajectory_extent, min_seed_disagreement) — see seed_disagreement_gate(). The floor encodes a sensor property (the iPad-LiDAR depth-noise level below which a disagreement is matcher noise rather than drift) and so does NOT scale with the capture; the fraction encodes the drift budget, which does.

Definition at line 153 of file LoopClosure.hpp.

◆ min_seed_disagreement_fraction

float reusex::geometry::LoopClosureOptions::min_seed_disagreement_fraction = 0.00555f

Scale-relative part of the lower gate: a fraction of the seed trajectory's extent (issue #339).

Drift grows with how far the camera travelled, so a gate that separates "drift" from "matcher noise" cannot be a constant in metres — measured on a 16 m-drift scan it selects the wrong edges on a 2 m room scan (registration-improvements.md §9.4). Default 0.00555 reproduces today's 0.10 m on the office scan's 18.01 m extent exactly (0.00555 * 18.01 = 0.0999 m, below the 0.10 m floor), so this default only ever STRENGTHENS the gate — on captures longer than ~18 m. Set 0 to use the absolute floor alone.

Definition at line 163 of file LoopClosure.hpp.

◆ min_sigma_rot

float reusex::geometry::LoopClosureOptions::min_sigma_rot = 0.02f

floor on the rotational std (rad)

Definition at line 175 of file LoopClosure.hpp.

◆ min_sigma_trans

float reusex::geometry::LoopClosureOptions::min_sigma_trans = 0.04f

floor on the translational std (m)

Definition at line 174 of file LoopClosure.hpp.

◆ pcm

bool reusex::geometry::LoopClosureOptions::pcm = true

Keep only the largest MUTUALLY CONSISTENT set of loop edges (Mangelson et al., PCM).

Two true loops form a near-identity cycle when chained through the seed odometry between their endpoints; a perceptual-aliasing false positive does not. This is what makes trusting loop edges safe on scans with repeated structure. Strongly recommended before loop_edges_trusted.

Definition at line 183 of file LoopClosure.hpp.

◆ pcm_max_edges

int reusex::geometry::LoopClosureOptions::pcm_max_edges = 3000

Cap the edge set fed to the O(M^2) consistency test (keep the highest- inlier edges).

0 = no cap.

Definition at line 188 of file LoopClosure.hpp.

◆ pcm_rot_threshold

float reusex::geometry::LoopClosureOptions::pcm_rot_threshold = 0.15f

cycle rotation tolerance (rad, ~8.6 deg)

Definition at line 185 of file LoopClosure.hpp.

◆ pcm_trans_threshold

float reusex::geometry::LoopClosureOptions::pcm_trans_threshold = 0.30f

cycle translation tolerance (m)

Definition at line 184 of file LoopClosure.hpp.

◆ proposal

LoopProposal reusex::geometry::LoopClosureOptions::proposal = LoopProposal::automatic

Candidate-proposal strategy (see LoopProposal). Default automatic.

Definition at line 91 of file LoopClosure.hpp.

◆ ransac_inlier_dist

float reusex::geometry::LoopClosureOptions::ransac_inlier_dist = 0.10f

3D-3D inlier threshold (m)

Definition at line 124 of file LoopClosure.hpp.

◆ ransac_iterations

int reusex::geometry::LoopClosureOptions::ransac_iterations = 300

RANSAC hypotheses.

Definition at line 125 of file LoopClosure.hpp.

◆ ratio_test

float reusex::geometry::LoopClosureOptions::ratio_test = 0.85f

Lowe ratio threshold for descriptor match.

Definition at line 122 of file LoopClosure.hpp.

◆ seed

unsigned reusex::geometry::LoopClosureOptions::seed = 42

RANSAC determinism.

Definition at line 190 of file LoopClosure.hpp.

◆ vocab_iterations

int reusex::geometry::LoopClosureOptions::vocab_iterations = 8

k-means (k-majority) refinement passes

Definition at line 114 of file LoopClosure.hpp.

◆ vocab_sample_per_frame

int reusex::geometry::LoopClosureOptions::vocab_sample_per_frame = 80

descriptors sampled per frame for vocab

Definition at line 113 of file LoopClosure.hpp.

◆ vocab_size

int reusex::geometry::LoopClosureOptions::vocab_size = 400

visual words (binary k-means clusters)

Definition at line 112 of file LoopClosure.hpp.


The documentation for this struct was generated from the following file: