pub struct MaskProcessingOptions {
pub binary: bool,
pub blur: bool,
pub blur_sigma: f32,
pub mask_threshold: u8,
pub dilate: bool,
pub dilation_radius: f32,
pub fill_holes: bool,
}Expand description
Configuration for mask post-processing operations.
Defines the pipeline of blur, threshold, dilation, and hole-filling operations applied
to raw mattes. Used as defaults in Outline and can be overridden
per operation via MatteHandle and MaskHandle.
§Explicit Configuration
This struct does not apply automatic logic. For example, setting dilate = true or
fill_holes = true will not automatically enable binary. If you need a binary mask
for dilation or hole-filling to work meaningfully, you must explicitly set binary = true
or call threshold in your processing chain.
Note: The CLI’s --binary auto mode does automatically enable thresholding when
--dilate or --fill-holes is specified. The library leaves this decision to you for
maximum control and predictability.
Fields§
§binary: boolWhether to apply binary thresholding to the mask.
blur: boolWhether to apply Gaussian blur to the mask.
blur_sigma: f32Standard deviation (sigma) for Gaussian blur.
mask_threshold: u8Threshold value (0–255) used for binary conversion and hole-filling.
dilate: boolWhether to dilate the mask using a Euclidean distance transform.
dilation_radius: f32Radius in pixels for the dilation operation.
fill_holes: boolWhether to fill interior holes in the binary mask.
Trait Implementations§
Source§impl Clone for MaskProcessingOptions
impl Clone for MaskProcessingOptions
Source§fn clone(&self) -> MaskProcessingOptions
fn clone(&self) -> MaskProcessingOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MaskProcessingOptions
impl Debug for MaskProcessingOptions
Source§impl Default for MaskProcessingOptions
impl Default for MaskProcessingOptions
Source§impl PartialEq for MaskProcessingOptions
impl PartialEq for MaskProcessingOptions
impl StructuralPartialEq for MaskProcessingOptions
Auto Trait Implementations§
impl Freeze for MaskProcessingOptions
impl RefUnwindSafe for MaskProcessingOptions
impl Send for MaskProcessingOptions
impl Sync for MaskProcessingOptions
impl Unpin for MaskProcessingOptions
impl UnsafeUnpin for MaskProcessingOptions
impl UnwindSafe for MaskProcessingOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.