Created by Codex.
Transfer image points with two essential matrices and one fixed shared calibration.
Mathematical idea¶
After calibration, a point defines an epipolar line in the target view,
with transposes applied when an edge is stored in the opposite orientation. Their homogeneous intersection predicts the third observation; the factor returns its two-dimensional pixel residual after applying .
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.XModel¶
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.