Histogram Equalization

There are a number of point operations which can be used to enhance the details in images. One common method is histogram equalization. Here, the cumulative histogram is calculated and used to remap pixel values in the image. The result is an image with an almost flat histogram. The program greymap -h performs histogram equalization. (see code)

Command Usage

greymap [options] infile outfile
        [-d]      Print debugging information
        [-s # #]  Scale pixels to specified range
        [-w # #]  Window pixels to specified range
        [-h]      Perform histogram equalization
        [-t]      Trim top and bottom 1 percent of range

Example

greymap -h input.im he.im
disp input.im he.im