Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

SelfCalibrationFactor

Created by Codex.

Estimate two focal lengths from a fundamental matrix and known principal points.

Open In Colab

Mathematical idea

For fundamental matrix FF and calibration matrices Ki(fi),Kj(fj)K_i(f_i),K_j(f_j), the induced essential matrix is

E(fi,fj)=Kj(fj)TFKi(fi).E(f_i,f_j)=K_j(f_j)^{\mathsf T}F K_i(f_i).

A valid essential matrix has singular values (σ,σ,0)(\sigma,\sigma,0). The factor penalizes departure from the two equal nonzero singular-value constraints, thereby estimating the focal lengths. SVD means singular value decomposition.

Model

The factor implements the Fetzer focal-length constraint. Its two scalar variables are f_i and f_j; the fundamental matrix and principal points are fixed constructor data. The residual is a two-vector measuring deviation from the equal-nonzero-singular-values condition of an essential matrix.

focal keys: [7710162562058289152, 7710162562058289153]
residual dimension: 2

Practical notes

  • Keep focal-length variables away from zero; the implementation floors tiny magnitudes for numerical safety, not as a modeling prior.

  • Add positive focal priors or a suitable parameterization in a larger problem.

  • Respect the convention x_j^T F x_i = 0; swapping image order requires transposing F and swapping the associated metadata.