opencv::cudaarithm

Function threshold

Source
pub fn threshold(
    src: &impl ToInputArray,
    dst: &mut impl ToOutputArray,
    thresh: f64,
    maxval: f64,
    typ: i32,
    stream: &mut impl StreamTrait,
) -> Result<f64>
Expand description

Applies a fixed-level threshold to each array element.

§Parameters

  • src: Source array (single-channel).
  • dst: Destination array with the same size and type as src .
  • thresh: Threshold value.
  • maxval: Maximum value to use with THRESH_BINARY and THRESH_BINARY_INV threshold types.
  • type: Threshold type. For details, see threshold . The THRESH_OTSU and THRESH_TRIANGLE threshold types are not supported.
  • stream: Stream for the asynchronous version.

§See also

threshold

§C++ default parameters

  • stream: Stream::Null()