Created by Codex.
Resolve the shared target view and matrix orientations for transfer factors.
Mathematical idea¶
An epipolar matrix reverses orientation by transposition: if maps a point in view to a line in view , then
TransferEdges finds the shared target view and orients both stored matrices so they produce lines in that same view before a transfer factor intersects them.
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.XPurpose and availability¶
TransferEdges<F> is a public C++ helper base used by the transfer-factor family. Given edges (a,c) and (b,c) in either orientation, it finds views a, b, and shared target c, then transposes matrices as needed so both map into view c.
It is not exposed as a standalone Python class; Python users configure it indirectly through a transfer-factor constructor.
C++ example¶
#include <gtsam/sfm/TransferFactor.h>
using namespace gtsam;
const EdgeKey edgeAC(0, 2);
const EdgeKey edgeCB(2, 1); // reversed relative to (b, c)
const size_t a = TransferEdges<FundamentalMatrix>::ViewA(edgeAC, edgeCB);
const size_t b = TransferEdges<FundamentalMatrix>::ViewB(edgeAC, edgeCB);
const size_t c = TransferEdges<FundamentalMatrix>::ViewC(edgeAC, edgeCB);
// a == 0, b == 1, c == 2The edges must share exactly the intended target view. Disjoint edges throw at construction.