ransac_cylinder — 3D robust_fit op

• Data kinds: points × normals → primitive

• Call: import fullseye as fs; fs.ledger.ransac_cylinder(points, normals, thresh, iters=800, seed=0) (to call the implementation directly, import ransac_fit; ransac_fit.ransac_cylinder(points, normals, thresh, iters=800, seed=0); from the registry, ops3d.get("ransac_cylinder"))

Usage

Outlier-robust RANSAC cylinder fitting (point normals are required).

The normals of a cylinder surface are orthogonal to the axis, so the axis direction is estimated from the cross product of the normals of 2 points → all points are projected onto the plane orthogonal to the axis → a circle is fitted in that plane → the inliers with |projected distance - r| < thresh are maximised. On the final inliers the axis is re-estimated more robustly (smallest singular direction of the SVD of the normals = axis), and the projected circle is refitted by least squares. If there are no normals, estimate them on the caller side before passing them.

Args:

points: (N,3) point cloud.

normals: (N,3) (unit) normal of each point.

thresh: threshold on |projected distance-r| for counting as an inlier.

iters: number of RANSAC iterations.

seed: random seed (deterministic).

Returns:

(params, inlier_mask, info). params = {"axis": (3,) unit axis, "point": (3,) a point on the axis,

"radius": float}. info holds the inlier count n_inliers / ratio inlier_ratio / iters.

Background guides (the physics and conventions behind this op)

• blas_threads_and_memory — Why matrix decompositions are slow — BLAS threads, caches, memory layout

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)

• ransac_prim — py -3.11 examples_3d/ransac_prim.py

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

fuse_to_voxel · angle_between_lines · angle_between_planes · angle_line_plane · distance_point_plane · distance_point_line · distance_line_line · distance_segment_segment

Same category (robust_fit)

ransac_plane · ransac_sphere · ransac_line · fit_cone · fit_torus · fit_ellipsoid


*Provenance: ransac_fit.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.