Skip to main content

Module line_extraction

Module line_extraction 

Source
Expand description

Line extraction from 2D point clouds using the Split-and-Merge algorithm.

The Split-and-Merge (Iterative End Point Fit) algorithm recursively splits a point sequence wherever a point deviates too far from the line connecting the two endpoints, then merges adjacent collinear segments.

Reference: PythonRobotics line_extraction by Atsushi Sakai.

Structs§

LineExtractionConfig
Configuration parameters for line extraction.
LineExtractionResult
Result of a line extraction run.
LineSegment
A line segment defined by its two endpoints.

Functions§

line_extraction
Extract line segments from a 2D point cloud using Split-and-Merge.
point_to_line_distance
Perpendicular distance from point (px, py) to the line through (x1, y1) and (x2, y2).