Skip to content

Commit 3dabeea

Browse files
committed
fix: complete rewrite of horizon calculation algorithm
The previous horizon calculation had fundamental bugs: - Used extrinsics_inv instead of extrinsics (wrong direction) - Incorrect axis flipping for coordinate transformation - Complex 3D point projection approach was unreliable - Resulted in 96%+ false positive rate (2435 issues at 0% tolerance) New implementation: - Uses camera pitch angle directly from extrinsics rotation matrix - Simple and robust: horizon_y = cy - tan(pitch) * fy - Works correctly with all calibration formats (OSDAR23, OSDAR26) - No calibration-specific workarounds needed - Removed unused helper functions and legacy code Results: - 0% tolerance: 140 issues (was 2435) - 94% reduction - 10% tolerance: 4 issues (was 2229) - 99.8% reduction - All 404 tests passing
1 parent bcd656f commit 3dabeea

4 files changed

Lines changed: 290 additions & 342 deletions

File tree

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2424
- **Applies only to track and transition annotations** - other object types are not checked
2525
- Useful when horizon calculations are slightly inaccurate due to calibration variations
2626

27+
### Fixed
28+
29+
#### Horizon Calculation (CRITICAL FIX)
30+
- **Complete rewrite of horizon calculation algorithm**
31+
- Previous implementation had fundamental bugs causing 96%+ false positives
32+
- New implementation uses camera pitch angle directly from extrinsics rotation matrix
33+
- Works correctly with all calibration formats (OSDAR23, OSDAR26, etc.)
34+
- No longer requires calibration-specific workarounds
35+
- Horizon is now correctly positioned based on camera tilt angle
36+
- Removed complex and incorrect 3D point projection approach
37+
- Results: 140 issues at 0% tolerance (was 2435), 4 issues at 10% tolerance
38+
2739
#### Multi-Scene Export (NEW)
2840
- **Batch Export Functionality**: Export multiple scenes to different formats at once
2941
- `export_scenes(input_folder, output_folder, formats)`: Core export function

0 commit comments

Comments
 (0)