Skip to main content

threshold

Function threshold 

Source
pub fn threshold<IM>(im: IM, op: CmpOp, thresh: u8, a: u8, b: u8) -> IM
Expand description

Threshold the image so that all pixels compared with op to thresh are set to a if true and otherwise to b.

Currently implemented only for MONO8 pixel formats.

Panics: panics on image shape or stride problems.