Simulate the effect of the backlight of a device on people's perception

Even if we see the same image on a device (such as an iPad), we perceive it differently when the backlight is different. For example, if we look at the following two images, they are both the same image, but the latter does not have a background (ignore the reflections), and we perceive it differently. My question is, how can I simulate the effect of the lack of backlighting, not obscuring it, but playing with the original image? Maybe you use some kind of translucent black mask?

Full backlight enter image description here

No backlight enter image description here

+5
source share
1 answer

Yes, you can imitate it. Physically, this is a very simple effect, and only your eyes make it look like a more complex illusion.

This is just a combination of two layers:

  • photo (backlight)
  • reflection (no backlight)

Reflection just exists all the time. The backlight image is on or off. In terms of implementation, these are additive levels (the sum of pixel values).

The eyes perceive only the backlight in the full image change mode, since the eyes adjust the overall brightness level of the screen.

If you implement this in code:

  • make sure that you use a linear color space for processing (delete gamma correction, process pixels, apply gamma correction).

  • when displaying the image on the screen, normalize the brightness (since to display the effect on the screen you need to be brighter than the real effect of the real world, and you have a lower dynamic range for operation).

0
source

Source: https://habr.com/ru/post/1237327/


All Articles