This functions equalizes either the whole contents of an image or the area specified by a selection. It operates on a histogram of the images.