Skip to main content

multi_threshold

Function multi_threshold 

Source
pub fn multi_threshold(
    input: &[u8],
    output: &mut [u8],
    thresholds: &[u8],
    levels: &[u8],
) -> Result<()>
Expand description

Multi-level thresholding

Apply multiple thresholds to create multiple output levels.

§Arguments

  • input - Input data
  • output - Output data
  • thresholds - Sorted threshold values
  • levels - Output level for each threshold range (length = thresholds.len() + 1)

§Errors

Returns an error if parameters are invalid