Function chanvese::chanvese [] [src]

pub fn chanvese(
    img: &FloatGrid,
    init_mask: &BoolGrid,
    max_its: u32,
    alpha: f64,
    thresh: u32
) -> (BoolGrid, FloatGrid, u32)

Runs the chanvese algorithm

Returns the resulting mask (true = foreground, false = background), the level-set function and the number of iterations.

Arguments

  • img - the input image
  • init_mask - in initial mask (true = foreground, false = background)
  • max_its - number of iterations
  • alpha - weight of smoothing term (default: 0.2)
  • thresh - number of different pixels in masks of successive steps (default: 0)