Repository navigation
Commit d896761
committed
SfM: Update visibility on feature transitions [R14-F7] (CPU perf)
## Summary
Update the visibility pyramid when a feature gains its first triangulated correspondence or loses its last. Additional correspondences change support but leave the visible feature set unchanged, so repeating every pyramid-level update does unnecessary work.
## Changes
- Put SetPoint and ResetPoint beside the existing zero/one visibility-count transitions, preserving occupied-cell scores for colliding features.
- Extend the existing visibility-score and AddImage tests to cover repeated support, collisions, partial/final removal, underflow and rebuilding the manager.
## Background
The repeated updates are inherited from fe8f82a, "Initial commit" (2016), in src/base/image.cc. The ObservationManager extraction, eaebe3c, "Add ObservationManager (colmap#2575)", retained them.
## Results
Fixed public Add64/Delete32/Delete32 bookkeeping on a 16-image, 64-track, 120-pair fixture:
| Platform | Before | After |
| --- | ---: | ---: |
| Linux/WSL | 1.395 ms | 0.640 ms |
| Windows | 2.776 ms | 1.438 ms |
Each value averages four fresh process means per arm, ABBAABBA, with two warmup and ten measured batches per process. Canonical inputs and outputs match within each platform.
Whole-command Linux observations, including setup/oracles/serialization: median CPU 0.495 -> 0.443 s, median per-process peak RSS 414.50 -> 414.35 MiB, mean instructions 3.879 -> 3.782 billion. Windows median CPU 2.234 -> 2.211 s and median per-process peak working set 14.54 -> 14.33 MiB have overlapping process ranges. These broader counters describe the probe, not isolated pyramid operations.
## Validation
- Current composition: all 18 maintained manager cases and two mapper lifecycle cases passed, without skips. Earlier matched arms passed the same selected counts on Linux and Windows.
- clang-tidy-18 completed on the owner and maintained test with no displayed source diagnostics; generated/header warnings were suppressed. Changed-line formatting passed with the real source filename.
- Incremental build: three translation units and two test links, reusing 46 production objects and 13 archives. Source, selected-link and provider postflight checks completed using the retained outputs.
AI disclosure: Totally vibe coded1 parent d186f12 commit d896761
2 files changed
Lines changed: 50 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
171 | 172 | | |
172 | 173 | | |
173 | | - | |
174 | | - | |
175 | 174 | | |
176 | 175 | | |
177 | 176 | | |
| |||
187 | 186 | | |
188 | 187 | | |
189 | 188 | | |
| 189 | + | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
193 | | - | |
194 | 192 | | |
195 | 193 | | |
196 | 194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | 8 | | |
| 9 | + | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
674 | 674 | | |
675 | 675 | | |
676 | 676 | | |
| 677 | + | |
| 678 | + | |
677 | 679 | | |
678 | 680 | | |
679 | 681 | | |
| |||
726 | 728 | | |
727 | 729 | | |
728 | 730 | | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
729 | 763 | | |
730 | 764 | | |
731 | 765 | | |
| |||
786 | 820 | | |
787 | 821 | | |
788 | 822 | | |
| 823 | + | |
| 824 | + | |
789 | 825 | | |
790 | 826 | | |
791 | 827 | | |
| |||
808 | 844 | | |
809 | 845 | | |
810 | 846 | | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
811 | 857 | | |
812 | 858 | | |
813 | 859 | | |
| |||
0 commit comments