Skip to content

Handle parallel optical axes in focus-based camera centering - #3792

Draft
Afloat16 wants to merge 1 commit into
nerfstudio-project:mainfrom
Afloat16:fix-parallel-camera-focus
Draft

Afloat16 wants to merge 1 commit into
nerfstudio-project:mainfrom
Afloat16:fix-parallel-camera-focus

Conversation

@Afloat16

@Afloat16 Afloat16 commented Oct 2, 2026

Copy link
Copy Markdown

Focus-based camera centering currently inverts a 3x3 normal matrix. Parallel optical axes make that matrix rank-deficient, so a normal forward camera trajectory can abort dataset preparation with linalg.inv instead of producing a focus estimate.

Use f_prior + A^+ (b - A f_prior) to select the least-squares minimizer nearest the current focus estimate. Full-rank configurations retain the existing solution; parallel cameras preserve the unidentifiable depth along their optical axis. Match the projector identity's device/dtype to the input poses.

Validation:

  • 9 focused tests passed, 1 CUDA test skipped on CPU Torch 2.14.1. Unchanged source: 6 failed, 3 passed, 1 skipped.
  • Tests cover parallel float32/float64 axes, nullspace-prior preservation, actual auto_orient_and_center_poses dataset preparation, rigid-world equivariance, a noisy full-rank reference, active-camera fallbacks, and nearly parallel scale consistency.
  • All existing cameras tests plus the new regressions: 18 passed, 1 skipped (existing deprecation warnings).
  • Repository Ruff 0.12.2 configured lint/format checks on changed files, license check and git diff --check passed.

Full project ns-dev-test, GPU execution, and reconstruction-quality benchmarks were not run for this patch. Focus-estimator derivatives with respect to pose parameters are not claimed.

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