Preprocess includes enhance contrast and smoothing.