Mobile app version of vmapp.org
Login or Join
Fox8063795

: Why do JPEG files blur red more than other colors? I am trying to figure out why JPEG compression causes noise in the red spectrum that is larger and fuzzier in regards to, say, the blue

@Fox8063795

Posted in: #Compression

I am trying to figure out why JPEG compression causes noise in the red spectrum that is larger and fuzzier in regards to, say, the blue spectrum. I've seen this question and I am not looking for a workaround; I just want to know why red is prone to more distortion during compression.

This behavior is highly visible in 'political campaign' images (where the picture is rendered in red, blue, and some shade of tan), but is visible elsewhere too. Here is an example:

Notice the border along the red side?

10.05% popularity Vote Up Vote Down


Login to follow query

More posts by @Fox8063795

5 Comments

Sorted by latest first Latest Oldest Best

 

@Connie430

Compression artifacts from hard edges are proportional to the contrast of the edges--the red-blue edge is the contrastiest thing in that image.

Any saturated primary fares badly in the jpg color representation scheme. The difference in the example image is a saturated red vs. a dull blue-gray.

The tenet that "chroma subsampling doesn't affect sharpness" also tends to fail for saturated primaries bordering black.

10% popularity Vote Up Vote Down


 

@Murray976

Due to our natural environment being predominantly green, our eyes are most sensitive to green. We can detect more subtleties in the green portion of the spectrum. Evolution - avoiding predators, identifying prey. It is this inequality in colour perception that probably leads to red components in images looking different.

10% popularity Vote Up Vote Down


 

@Ogunnowo857

JPEG compresses colour equally and therefor does not cause a blur with red, however, the human eye might.
The human eye has approximately 7 million cones and about 65% of them receive red light.
This may be why we see reds blur more than other colours... because we see "more" red.

10% popularity Vote Up Vote Down


 

@Hamaas979

Everything @Scott said is true but for better understanding of the WHY and even how come RED seems to look worse, I direct you to this information (emphasis mine and edited for flow)


JPEG ... is designed for compressing either
full-color or gray-scale images of natural, real-world scenes [and] is
a lossy compression algorithm...

JPEGs are best suited for continuous tone images like photographs or
natural artwork; not so well on sharp-edged or flat-color art like
lettering, simple cartoons, or line drawings. JPEGs support 24-bits of
color depth or 16.7 million colors.

JPEG is actually just a compression algorithm, not a file format.
JPEG is designed to exploit certain properties of our eyes, namely,
that we are more sensitive to slow changes of brightness and color
than we are to rapid changes over a short distance.

While JPEGs are usually the best choice for photographs, on 8-bit
monitors they are force-dithered into an 8-bit palette. JPEG
compression is treated as 24 bit data (8 bit for gray), regardless of
the colors in the original image. Therefore, if you reduce an image
from 24-bit to 8-bit prior to JPEG compression, the compression ratio
will actually worsen as will the overall quality.

JPEG compression introduces noise into solid-color areas, which can
distort and even blur flat-color graphics. This is why JPEGs are not
well suited to flat-color sharp-edged art or type. A JPEG can reduce
a 900K 24-bit image to 45K (high quality) or 30K (medium quality), a
factor of 20:1 to 30:1. With JPEGs, however, the more you compress,
the more edge definition and sharpness you lose. JPEGs do not support
transparency, either.

It is important to note that saving a graphic to JPEG format with
compression should be a last step. Compression effects are cumulative.
This means that every time you re-save a JPEG file, you are
compressing it further, and thereby tossing away data (photographic
detail) that you can't get back.


Now for the super technical details that explain the prevalence of the RED (which is a trick on the eye actually) you might want to read this information (again emphasis is mine)


The starting point of the JPEG compression are the pixels in the
primary colors red, green and blue, which are for a lossy compression
is not optimally suited. Before the actual compression simply convert
the RGB colors, for example, in the YCrCb model that the first channel
stores the pure brightness information (Y), so the average of the
brightness of the red, blue and green channel. Stores in the second
channel is the deviation of the red channel of the average brightness,
and in the third channel, the deviation of the blue channel. The value
for the green channel can be calculated from this and does not need to
be specially recorded. Once you have separated as components luminance
(brightness) and chrominance (color), you can reduce the resolution of
the two chrominance channels to half or a quarter, as they for the
sharpness does not matter. The visual cortex of humans contains
independent systems for the perception of colors and shapes, and the
color-blind would ignore the former fine resolution color boundaries
anyway, the color detection system works again with a three to four
times as low resolution as the form of recognition.


Hope that helps you understand better all that's going on.

10% popularity Vote Up Vote Down


 

@Nimeshi706

JPG is a lossy compression method. This means every time you save a jpg image data is thrown away in order to save file size (kb). It is important to realize that this loss of data happens each and every time you save a jpg. So if you open a jpg, then save it as a jpg you have thrown away more image data. It is in areas where the data loss has occurred that artifacts (or scum or fuzziness) begin to appear.

This loss of data is most often noticeable where colors transition from one field of solid color to another field of solid color. There's no direct issue with any particular color specifically. It is more about large areas of similar colors.

For images which contain only large areas of flat color, formats such as gif are more appropriate than jpg. The gif format was designed to maintain large areas of flat color.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme