Skip to content

Support time-varying camera intrinsics and zoom modeling - #32

Draft
sarlinpe wants to merge 1 commit into
cutsfrom
zoom
Draft

sarlinpe wants to merge 1 commit into
cutsfrom
zoom

Conversation

@sarlinpe

@sarlinpe sarlinpe commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

Summary

Support time-varying camera intrinsics (optical zoom).

  • One camera per frame: --time-varying-intrinsics (in vidmap.run and the frontend CLI) uses the per_image camera policy in the database and mapper state, with per-view camera priors.
  • Initialization: per-frame predicted focals, median-filtered and Gaussian-smoothed in log space (vidmap/utils/camera_smoothing.py) to reject single-frame prediction spikes.
  • Native relative focal priors: LogRelativeFocalPriorCostFunction (analytic Jacobians) links consecutive keyframe cameras in view graph calibration and bundle adjustment. The Cauchy loss acts as a quadratic smoothness term within continuous footage and lets the focal length jump at cuts or abrupt zooms, without explicit segmentation. The mapper keeps the raw per-frame focal priors.
  • Regularization: uncalib/da3 uses focal prior weight 1e-3 in VGC and multiplier 0.01 in BA, so that near-zero-baseline pairs cannot collapse the focal lengths.
  • Tests: smoothing, option validation, per-frame cameras, focal priors, multi-camera BA, and the native relative focal priors (C++ and Python).

Stack update: removed the unused mapper-side focal smoothing path, the unused uncalib/da3_zoom preset and RunOptions.time_varying_intrinsics, and shared the flag's config overrides.

- --time-varying-intrinsics (vidmap.run and the frontend CLI): one camera per frame in the
  database and mapper state (per_image camera policy) with per-view camera priors.
- Frontend initialization: per-frame predicted focals, median-filtered and Gaussian-smoothed
  in log space (vidmap/utils/camera_smoothing.py) to reject single-frame prediction spikes.
- Mapper: raw per-frame focal priors, plus native Ceres log relative focal priors between
  consecutive keyframe cameras in view graph calibration and bundle adjustment
  (LogRelativeFocalPriorCostFunction, analytic Jacobians). The Cauchy loss acts as a
  quadratic smoothness term within continuous footage and lets the focal jump at cuts or
  abrupt zooms without explicit segmentation.
- uncalib/da3 mapping defaults: focal prior weight 1e-3 in VGC and multiplier 0.01 in BA, so
  near-zero-baseline pairs cannot collapse the focal lengths.
- Tests: smoothing, option validation, per-frame cameras, priors, multi-camera BA, and the
  native relative focal priors (C++ and Python).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant