Skip to main content

binary_threshold

Function binary_threshold 

Source
pub fn binary_threshold(
    input: &[u8],
    output: &mut [u8],
    threshold: u8,
    max_value: u8,
    min_value: u8,
) -> Result<()>
Expand description

Binary threshold with custom output values

§Arguments

  • input - Input data
  • output - Output data
  • threshold - Threshold value
  • max_value - Value to use when input >= threshold
  • min_value - Value to use when input < threshold

§Errors

Returns an error if buffer sizes don’t match