outline-core 0.2.0

Image background removal with flexible mask processing options
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use image::GrayImage;

use crate::OutlineResult;

/// A trait representing an algorithm that can turn a mask into a vector representation.
pub trait MaskVectorizer {
    /// Configuration options for the vectorizer.
    type Options;
    /// The output type produced by the vectorizer.
    type Output;

    /// Convert a grayscale mask into a vector representation.
    fn vectorize(&self, mask: &GrayImage, options: &Self::Options) -> OutlineResult<Self::Output>;
}

#[cfg(feature = "vectorizer-vtracer")]
pub mod vtracer;