I wrote myself a program for whitening the background of grayscale images. Given some threshold, if a pixel is lighter than the threshold, and all of the eight surrounding pixels are lighter than the threshold, the central pixel is set to be white. It works surprisingly well for such a simple idea. The solid white background will then compress much better than a noisy gray background. It also greatly improves the contrast on an e-ink device.
|