VisualGeometryToolkitEstimation provides robust estimation for geometric
vision: one generic RANSAC loop and the estimation problems of the
VisualGeometryToolkit packages, from lines, homographies, fundamental and
essential matrices and absolute pose to radial cameras and hand-eye
calibration. Every find_* pipeline runs MSAC scoring and refits the model on
the inliers by default (least squares for most problems), and other scorers
and local optimizers plug in by keyword. A camera model is regressed onto
another camera by three verbs: fit_camera (one linear solve, no guess),
refine_camera (the exact pixel least squares from a guess) and
approximate_camera (the two).
pkg> add VisualGeometryToolkitCore VisualGeometryToolkitEstimationJulia 1.13 or later. Every dependency is in the General registry. The example uses the geometry types of VisualGeometryToolkitCore, so the line adds both packages.
The example builds 40 correspondences from a known homography, replaces 8 of them with random points, and recovers the homography and the 32 inliers.
using VisualGeometryToolkitCore, VisualGeometryToolkitEstimation, Random
using VisualGeometryToolkitCore: inlier_mask # public, not exported
H_true = HomographyMat([1.02 -0.02 12.0; 0.01 0.98 -5.0; 1e-5 2e-5 1.0])
rng = Xoshiro(1)
src = [Point2(640rand(rng), 480rand(rng)) for _ in 1:40] # source points, pixels
dst = [to_euclidean(HomographyMap(H_true)(x)) for x in src] # their images under H_true
for i in 1:8 # replace 8 with outliers
dst[i] = Point2(640rand(rng), 480rand(rng))
end
result = find_homography(correspondences(src, dst)) # MSAC at 3 px, the default
count(inlier_mask(result)) # 32, the true correspondences
H = Matrix(estimate(result))
H ./ H[3, 3] ≈ Matrix(H_true) # true
result_2px = find_homography(correspondences(src, dst); # a scorer overrides the class's
scoring = VisualGeometryToolkitCore.MsacScoring(HomographyProblem; threshold = 2.0))The Getting Started guide continues from here.
- Getting Started:
a first pipeline, composing a scorer and a local optimizer, and calling
ransacdirectly. - Fitting Algorithms:
every
find_*andfit_*pipeline with its default threshold. - Extending: writing a new RANSAC problem.
- Architecture: the type hierarchy, the contracts and the design decisions.
- API Reference.
The package builds on VisualGeometryToolkitCore, which holds the geometry types, the minimal solvers and the contracts the loop is written against. The paper scorers and local optimizers implement those contracts in RANSACScoringDoneRight.jl and LocalOptimizationDoneRight.jl. The portal links every package of the toolkit.
VisualGeometryToolkitEstimation is written by James Pritts, with contributions from Philipp Böll (@phib2b): opt-in joint scale estimation for up-to-scale pose pairs in robot-world calibration. Cite the toolkit. Its CITATION.cff is the source of this entry, and GitHub's "Cite this repository" button exports it:
@software{pritts2026vgtk,
author = {Pritts, James and Sauer, Hendrik},
title = {{VisualGeometryToolkit.jl}: Julia Packages for Multiple-View Geometry},
url = {https://github.com/VisualGeometryToolkit/VisualGeometryToolkit.jl},
doi = {10.5281/zenodo.23548372},
year = {2026}
}Cite also the papers behind the methods you use; the portal lists them.
MIT