pub fn threshold_binary(
input: &Tensor,
threshold: f32,
max_val: f32,
) -> Result<Tensor, ImgProcError>Expand description
Binary threshold: output 1.0 where input >= thresh, else 0.0. Input: [H, W].
Binary threshold: outputs max_val where value > threshold, else 0.0.