sampson_distance — 3D two_view op

• Data kinds: image2d × image2d → signal

• Call: import fullseye as fs; fs.ledger.sampson_distance(F, pts1, pts2) (to call the implementation directly, import twoview; twoview.sampson_distance(F, pts1, pts2); from the registry, ops3d.get("sampson_distance"))

Usage

The Sampson distance of the epipolar constraint (the first-order geometric error, per correspondence). → (N,).

Raises ValueError: points are not (N,2) / non-finite / correspondence counts mismatch.

Computation: with homogeneous coordinates x1=(u1,v1,1), x2=(u2,v2,1), (x2ᵀ F x1)² / ((F x1)_0² + (F x1)_1² + (Fᵀ x2)_0² + (Fᵀ x2)_1² + 1e-12).

• The unit is the 2nd power of pixels (the 2nd power of distance). To threshold in pixels, take sqrt or raise the threshold to the power 2.

• F follows the convention of fundamental_8point, x2ᵀ F x1 = 0 (pts1 → x1, pts2 → x2). If you swap the order, transpose F.

• Since 1e-12 is added to the denominator, even F=0 raises no exception and returns 0 (F is not checked).

• The return value is float64 (N,). Deterministic. Not (N,2), non-finite, or mismatched point counts give ValueError.

• Typical: checking the fit of fundamental_8point, sorting out mismatches (large values), preprocessing before recover_pose.

Background guides (the physics and conventions behind this op)

• depth_sensors — Depth sensors — ranging principles, real-device figures, how dropouts appear

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

Runnable examples (verified samples that actually call this op)

• two_view_pose — py -3.11 examples_3d/two_view_pose.py

Ops the type connects to (they accept signal as input)

fuse_to_voxel

Same category (two_view)

fundamental_8point · essential_8point · recover_pose · triangulate


*Provenance: twoview.py — 3D operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.