Image correction and smoothing