R/nr-color.R
nr_dither.Rd
Dither to binary image
nr_dither(nr, value = 0.5, algo = "fs")
native raster image
Threshold value. Default: 0.5 (valid range [0, 1])
Dithering algorithm. 'fs' (floyd-steinberg) or 'atkinson'. Default: 'fs'
Invisibly return the supplied native raster image which was been modified in-place
Other color manipulation functions: nr_color_replace(), nr_desaturate(), nr_threshold()
nr_color_replace()
nr_desaturate()
nr_threshold()
nr <- nr_copy(deer[[1]]) plot(nr) nr_dither(nr, 0.99) plot(nr)