Algosim documentation: binarize

binarize

Replaces all pixels in a pixmap with black and white depending on their lightness.

Syntax

Description

binarize(pm, x) returns bm with all pixels with lightness greater than x replaced by white and all other pixels replaced by black. If omitted, x defaults to 0.5.

Examples

binarize(ExampleData("Sally"))

Image 1

See also