preview: initial sharpness detection code.