1. A method for enhancing an image, comprising: generating a luminance histogram for said image; generating a derivative histogram by taking a first derivative of said luminance histogram; searching for a plurality of black peaks and searching for a plurality of white peaks using said derivative histogram; obtaining a maximum black value and a maximum white value from said luminance histogram; obtaining a black luminance associated with said maximum black value and a white luminance associated with said maximum white value, wherein when searching for said plurality of black peaks, said negative derivative count is incremented if a current luminance position is greater than said black luminance and a current luminance histogram value is less than a predefined percentage of said maximum black value, without regard to the current derivative histogram value associated with said current luminance position, and wherein when searching for said plurality of white peaks, said negative derivative count is incremented if said current luminance position is less than said white luminance and said current luminance histogram value is less than a predefined percentage of said maximum white value, without regard to the current derivative histogram value associated with said current luminance position; and performing luminance scaling of said image between one black peak of said plurality of black peaks and one white peak of said plurality of white peaks, wherein a different search parameter is used for said searching for said plurality of black peaks than is used for said searching for said plurality of white peaks.