pub fn threshold_mask(mask: &[f32], threshold: f32) -> Vec<u8> ⓘ
Convert grayscale mask to binary mask