Type Definition visioncortex::PathI32
source · [−]Expand description
Path of 2D PointI32
Implementations
Returns a copy of self after Path Smoothing, preserving corners.
corner_threshold
is specified in radians.
outset_ratio
is a real number >= 1.0.
segment_length
is specified in pixels (length unit in path coordinate system).
Returns a copy of self after Path Simplification:
First remove staircases then simplify by limiting penalties.
pub fn image_to_path(
image: &BinaryImage,
clockwise: bool,
mode: PathSimplifyMode
) -> PathI32
pub fn image_to_path(
image: &BinaryImage,
clockwise: bool,
mode: PathSimplifyMode
) -> PathI32
Converts outline of pixel cluster to path with Path Walker. Takes a bool representing the clockwiseness of traversal (useful in svg representation to represent holes). Takes an enum PathSimplifyMode which indicates the required operation:
- Polygon - Walk path and simplify it
- Otherwise - Walk path only
Returns a copy of self converted to PathF64