Typical Joint Photographic Experts Group (JPEG) images that we are used to seeing, work by encoding each pixel into 24 bits—one 8-bit number per RGB (red, green, blue) color component, which gives us an integer within the 0-255 range. This is just a number, 255, but is it enough information or not? To understand this, let's try to understand how these numbers are recorded and what these numbers mean.
Most current digital cameras use a Bayer filter, or equivalent, that works using the same principles. A Bayer filter is an array of sensors of different colors placed on a grid similar to the following diagram:
Image source—https://en.wikipedia.org/wiki/Bayer_filter#/media/File:Bayer_pattern_on_sensor.svg (CC SA 3.0)
In the previous diagram, each of these sensors measures the intensity of the light that gets into it, and a group...