Histogram Equalisation

This demonstrates histogram equalisation. The algorithm used here is the one given in the Wikipedia definition. The equalisation is performed separately for the RGB channels. The alpha channel is left as it is, or the output might be transparent. Try it out on the colour images to see how it changes their colour balance. This change in colour balance can be avoided by first transforming the image to a more appropriate colour space and equalising that instead.