Commit ec51503
committed
fix: correct MAGSAC++ IRLS gamma weight (B2 + B3) in getScore; trim DoF=4 tables
getScore computed the per-point MAGSAC++ weight at the wrong gamma argument:
- B3: sigma_max was increasedThreshold (the inlier threshold) rather than
threshold/k. Now sigma_max = increasedThreshold/k drives both the argument and
the prefactor; the inlier-collection cutoff stays at increasedThreshold = k*sigma_max.
- B2: the index used the 1e4 precision against the coarse stored_gamma_values
table (step 1e-3), reading the gamma at 10x the argument. Now it indexes the
fine stored_complete_gamma_values table (step 1e-4) whose spacing matches 1e4.
Tables (gamma_values.cpp) are now generated by scripts/generate_gamma_values.py
(scipy.special) and trimmed to the useful interval [0, k^2/2]: 66385 entries
(was [0,10]=100001). The dead coarse table is removed. The generated C++ documents
how it was produced and why the length; the table is sized for the precise
k = sqrt(chi2_0.99(4)) so it works with either the imprecise k literal kept here
(3.64) or the precise per-DoF k introduced by danini#50.
k stays at the existing imprecise literal in this PR (focused on B2/B3); precise
per-DoF k is danini#50's job. Changes results for existing DoF=4 estimators: validate
on Adelaide/EVD/homogr before submission.1 parent 799a645 commit ec51503
3 files changed
Lines changed: 1436 additions & 2400 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
0 commit comments