1. A method of enhancing contrast, the method comprising: using a processor to perform the steps of: obtaining a first luminance histogram of an input image; computing a first cumulative density function based on the first luminance histogram; generating a second luminance histogram through pixel redistribution of the first luminance histogram; computing a second cumulative density function based on the second luminance histogram; computing a conversion function based on the first cumulative density function based on the first luminance histogram and the second cumulative density function based on the second luminance histogram; and changing luminance distribution of the input image based on the conversion function.