Type Definition visioncortex::PathI32[][src]

type PathI32 = Path<PointI32>;

Path of 2D PointI32

Implementations

impl PathI32[src]

pub fn smooth(
    &self,
    corner_threshold: f64,
    outset_ratio: f64,
    segment_length: f64,
    max_iterations: usize
) -> PathF64
[src]

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).

impl PathI32[src]

pub fn simplify(&self, clockwise: bool) -> Self[src]

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
[src]

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

pub fn to_path_f64(&self) -> PathF64[src]

Returns a copy of self converted to PathF64