We present an automated algorithm for global contrast enhancement
of images with multimodal histograms. To locate modes and valleys,
histogram analysis is performed by kernel density estimation,
a robust nonparametric statistical method. Histogram warping
by monotonic splines pushes the modes apart, spreading them out
more evenly across the dynamic range. This technique can assist
in the contrast correction of images taken facing the light source.