Before we get to encoding images with different types of sampling let us spend a few minutes understanding the concept of sampling/subsampling.
So what is Chroma Subsampling ?
Chroma subsampling is encoding color data at a reduced resolution in comparison to brightness data. It is a way of sharing color data across a number of pixels. Since a human eye is much more sensitive to changes in light/brightness compared to color most modern day imaging systems sample the color data. This reduction in resolution for color data is largely imperceptible to a human eye allowing for compression/reduction in file sizes. Chroma subsampling has been described using the 4:x:x model from its early days. In rare cases we see 3:x:x used as well.
The 4:x:x / 3:x:x models are applicable to video codecs. These models were/are not applicable to analog encoding and camera sensors.
The human vision system processes color at approximately a third of the resolution of luminance.
Please read this blog on color spaces and models for a better understanding of this concept - https://coderevere.com/single-blog.php?blog=colorspacemodel
Is there a model used in our image/video systems to conceptually apply/replicate human vision in the digital world ?
Yes! HVS (Human Visual System) is a model used by digital image and video processing systems to deal with human vision. As we are all aware human vision is an extremely complex system, we may never be able to understand it entirely, these models are but a representation and are continually updated as our knowledge improves.
When did it all begin ?
Georges Valensi was the first to develop the concept of separation of chroma(color) and luma(brightness) channels in 1938. This concept helped separate color and brightness into two different signals which would then be displayed as a single output on the television screen. This separation helped in developing chroma subsampling in the 50s by Alda Bedford for RCAs color television development, this would later develop into the well known NTSC standard for analog television.
Stay tuned for Analog vs Digital Video in a later blog.
Back in the 1950s and 60s there was a concern that color television would require the kind of bandwidth the technology of that era would not be able to support. Then came along chroma subsampling, allowing reduction in color signals (most of the blue signal was discarded, most of green was retained along with partial retention of red signal - roughly equivalent to 4:2:1) which helped RCA in compressing color television signals.

RCA CT-100 at a museum playing Superman. The RCA CT-100 was the first mass-produced color TV set. Image Source : Wikipedia
Common types of Chroma Subsampling -
4:4:4 - No Chroma Subsampling
4:2:2 - Full Vertical , Half Horizontal Color Resolution
4:2:0 - Half Vertical and Horizontal Color Resolution
4:1:1 - Full Vertical , Quarter Horizontal Color Resolution

Here is an image I put together which contains a few colors stacked next to each other, ran it through the above types of subsampling using ImageMagick -
Original -

4:4:4 -

4:2:2 -

4:2:0 -

4:1:1 -

You can see from the images above how there is a gradual degradation in color quality across images due to subsampling. Especially 4:1:1 starts showing color bleeding quite prominently due to the much reduced color resolution.
Note : ImageMagick uses its own method to describe chroma subsampling with its {horizontal}x{vertical} notation. Please refer two sets of commands below, the first set of commands were used to convert to different types of subsampling with the second set demonstrating the relationship between 4:x:x and ImageMagicks {horizontal}x{vertical} subsampling description.
magick chroma.png -sampling-factor 4:4:4 -quality 90 chroma444.jpg
magick chroma.png -sampling-factor 4:2:2 -quality 90 chroma422.jpg
magick chroma.png -sampling-factor 4:2:0 -quality 90 chroma420.jpg
magick chroma.png -sampling-factor 4:1:1 -quality 90 chroma411.jpg
magick identify -verbose chroma444.jpg | grep 'sampling'
jpeg:sampling-factor: 1x1,1x1,1x1
magick identify -verbose chroma422.jpg | grep 'sampling'
jpeg:sampling-factor: 2x1,1x1,1x1
magick identify -verbose chroma420.jpg | grep 'sampling'
jpeg:sampling-factor: 2x2,1x1,1x1
magick identify -verbose chroma411.jpg | grep 'sampling'
jpeg:sampling-factor: 4x1,1x1,1x1
0 Comments