Skip to main content

threshold

Function threshold 

Source
pub fn threshold(
    src: &RasterBuffer,
    threshold: f64,
    above_value: f64,
    below_value: f64,
) -> Result<RasterBuffer>
Expand description

Applies a threshold operation

§Arguments

  • src - Source raster
  • threshold - Threshold value
  • above_value - Value for pixels >= threshold
  • below_value - Value for pixels < threshold

§Errors

Returns an error if operation fails