Datasheet

e-Paper ESP8266 Driver Board User Manual
IMAGE PROCESSING
The client-side application provides two kinds of image processing: Level and Dithering.
LEVEL
The Level supposes that that image can be divided on a few large regions, in which all of
pixels have color ‘close’ to one of available colors: black, white or red and ‘far’ to others available
colors. This kind of processing is suitable for 2- or 3-color schematics or texts.
For example, if pixel’s color of a grayscale image is equals and less than 127, the assigned
available color is black, otherwise is white (figure 6).
In case of colored image the green and blue channel are combined to green-blue or not-
red channel which is ‘orthogonal’ to the red one. On the color diagram (figure 7) it is shown that
pixels with high value of red channel and low value of green-blue channel is takes red color,
otherwise black or white as in previous example.
Mathematically the definition of color is based on the discrepancy calculation the sum of
squares of channel differences between given and available colors. Pixels take available color
which has minimal discrepancy with their color. In the code snipped below the available colors
are stored in curPal array: