Image Dithering is a process of adding some noise to an image. This noise can be used to randomize the quantization error. Dithering is an image processing technique which can be used to create the illusion of color depth on systems with a limited color palette. It introduces noise or a pattern into an image, and often these patterns are visible.
Error diffusion dithering is a process of image dithering using error diffusion, in which the quantization error of the current pixel is added to the pixel on the right and below according to a predefined formula. The error diffusion dithering algorithm can be written as:
Here, I provide an implementation for the Jarvis Judice Ninke dithering algorithm in a grayscale image. The figures provided show the effect on image before and after applying the dithering algorithm.