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.

DsfTrackGenerator

The Keypoints class and tracksFromPairwiseMatches helper are internal GTSFM data structures for feature matching. They turn pairwise image matches into multi-view feature tracks using a disjoint-set forest.

Open In Colab

Build the feature-matching inputs

GTSFM represents each image’s detections with a Keypoints object containing an Nimes2N imes 2 coordinate matrix. Pairwise matches map an IndexPair to rows of corresponding keypoint indices. Ordinary Python lists and dictionaries are converted to the internal KeypointsVector and MatchIndicesMap types by the wrapper.

track count: 3
[0 1] -> [[10.0, 20.0], [50.0, 60.0]]
[0 1 2] -> [[30.0, 40.0], [70.0, 80.0], [130.0, 140.0]]
[1 2] -> [[90.0, 100.0], [110.0, 120.0]]

Inspect the generated tracks

tracksFromPairwiseMatches() merges pairwise correspondences with a disjoint-set forest and returns SfmTrack2d objects. For each track, indexVector() lists the participating cameras and measurementMatrix() contains the image coordinates in the same order.