calculating exposure value based on image luminance