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.

EssentialTransferFactor

Created by Codex.

Transfer image points with two essential matrices and one fixed shared calibration.

Open In Colab

Mathematical idea

After calibration, a point u~a\tilde u_a defines an epipolar line in the target view,

c(a)EacK1u~a,c(b)EbcK1u~b,\ell_c^{(a)} \propto E_{ac}K^{-1}\tilde u_a, \qquad \ell_c^{(b)} \propto E_{bc}K^{-1}\tilde u_b,

with transposes applied when an edge is stored in the opposite orientation. Their homogeneous intersection u^cc(a)×c(b)\hat u_c\propto\ell_c^{(a)}\times\ell_c^{(b)} predicts the third observation; the factor returns its two-dimensional pixel residual after applying KK.

import gtsam
import numpy as np

from gtsam import symbol_shorthand

C = symbol_shorthand.C
K = symbol_shorthand.K
P = symbol_shorthand.P
S = symbol_shorthand.S
X = symbol_shorthand.X

Model

This class calibrates the three image points, performs epipolar transfer with the two essential matrices, and uncalibrates the transferred point before computing pixel error. Calibration is fixed data owned by the factor.

Python provides variants for Cal3_S2, Cal3f, and Cal3Bundler.

calibration = gtsam.Cal3_S2(500.0, 500.0, 0.0, 320.0, 240.0)
triplets = [(np.array([310.0, 235.0]),
             np.array([330.0, 236.0]),
             np.array([320.0, 235.5]))]
factor = gtsam.EssentialTransferFactorCal3_S2(
    gtsam.EdgeKey(0, 2), gtsam.EdgeKey(1, 2), triplets, calibration
)

print("factor keys:", factor.keys())
print("residual dimension:", factor.dim())
factor keys: [2, 4294967298]
residual dimension: 2

Choosing the class

Use this fixed-calibration version when all involved views share known intrinsics. Use EssentialTransferFactorK when calibration must be optimized jointly.