Debayering
Debayering, also known as demosaicing, is the process of reconstructing a full-color image from the incomplete color samples captured by a color filter array on a digital image sensor. In most cameras the sensor uses a Bayer filter mosaic, a 2x2 pattern of red, green, green, blue (RGGB). Each sensor pixel records only one color, so debayering estimates the other two color components for each pixel to produce a complete RGB image.
The simplest methods interpolate linearly from neighboring samples. Bilinear interpolation uses adjacent pixels, while bicubic interpolation
Demosaicing can introduce artifacts such as color zippering along high-contrast edges, false colors around fine patterns,
Applications include digital cameras, smartphones, and video pipelines, as well as scientific imaging where faithful color