Model-based Local Contrast Enhancement for Magnified Images