Binarize🔗
Transforms any gray-level or color image to a binary image using a static gray-level threshold.
Inputs🔗
image
: Input imagelevel
: Gray-level threshold. Every pixel with a gray level less than the threshold is regarded as background.invert
: Inversion flag. If this value istrue
, inverts the result so that pixels whose gray level is less than level are regarded as foreground.
Outputs🔗
image
: Gray-level 8-bit image. Background is zero, foreground is 255.