Repository navigation
Commit 9371f7b
authored
Preserve zero descriptors in RootSIFT normalization (colmap#4891)
L1-Root normalization turns an all-zero descriptor row into NaNs by
dividing by its zero L1 norm. The bundled VLFeat descriptor code
preserves zero histograms, including those computed from flat gradients,
and the sibling L2 normalizer also keeps zero rows finite.
Skip normalization for zero-norm rows. Positive rows retain the same
arithmetic and byte-descriptor output. The change is in place and leaves
descriptor shapes, storage formats and the default normalization choice
unchanged.
Validation:
- All 12 native feature utility tests pass. The new mixed-row regression
fails on pristine `main`; all 11 existing cases pass there.
- A native probe using the bundled VLFeat implementation fails before
the fix and passes afterward. Twelve positive/empty matrix controls
preserve exact normalized values and bytes.
- `clang-format --dry-run --Werror` passes both changed files. Local
Clang-Tidy 23 reports the same five unchanged-header diagnostics on base
and patch; upstream uses Clang 18.
I ran a focused Windows native build, not a full application or GPU
build.
AI assistance disclosure: AI-assisted development tools were used during
investigation and implementation. The reported tests were run against
the final diff.1 parent 15526bb commit 9371f7b
2 files changed
Lines changed: 19 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
41 | 55 | | |
42 | 56 | | |
43 | 57 | | |
| |||
0 commit comments