/dithering

Simple dithering implementation (Floyd-Steinberg and Omohundro) in Matlab

Primary LanguageMATLABMIT LicenseMIT

Developed with Giuseppe Marino

Dithering

Dithering is a technique used to apply noise to an image in such a way that it tricks the human eye, improving the final quality. This implementation contains two versions, Floyd-Steinberg's and Omohundro's.

Usage

Both functions take two parameters, a grayscale image and the number of shades of gray to perform dithering.

f = floydsteinberg(img, 4);
figure; imshow(uint8(f));

o = omohundro(img, 4);
figure; imshow(uint8(o));

Floyd-Steinberg

Omohundro