Brightness and contrast modeling