Skip to main content

denoise

Function denoise 

Source
pub fn denoise(mask: &mut Vec<bool>, width: u32, height: u32, min_size: u32)
Expand description

Remove small noise clusters from a diff mask before dilation.

Runs a quick connected-component pass on the raw diff mask and zeros out any component with fewer than min_size pixels. This prevents tiny rendering-noise specks from being dilated and bridging real change regions.