Lecture 22: Image Processing (2)
angelinelykk

To explain this slide, humans are less sensitive to changes in color compared to changes in brightness. We are also less sensitive to errors in high-frequency content such as rapid changes in color/ brightness such as sharp edges compared to smooth consistent low-frequency areas. Therefore, JPEG compression algorithms try to concentrate error in these areas where humans are less likely to detect errors. The compression reduces image data in those areas to reduce the file size but have less impact on how we perceive the image's overall quality. Thus, JPEG compression takes advantage on the sensitivities of the human visual system to reduce file size while maintaining perceived quality to us.

jinweiwong

This explains why JPEG is called a "lossy" data format since it compresses information. PNG is a "lossless" data format, so it retains all information but may take up more space.

jacky-p

It's interesting to see how JPEG Compression utilizes areas where humans have low sensitivity in order to get rid of data/compress images so that this loss of information is not noticeable by humans. It is an ingenious way to reduce image file size.

draynr

How do we determine the ratio of compression or the compression level of an image?

zepluc

The ration of comperssion should be defined by user. The higher the compression level, the smaller the file size and, typically, the lower the image quality. For example, web images are often compressed more aggressively to reduce loading times.

myxamediyar

To answer Draynr, I'd guess that the compression ratio is the ratio between the amount of space that the compression takes up vs non-compressed version. Might be wrong

ElShroomster

I don't know if it is just me, but if I take a JPEG image and keep converting it between PNG and JPEG, the image seems to keep losing quality (even though I don't think that's what it is supposed to do since it should just remove the high frequencies once and just be done with it). Could this be an issue with how I am converting it back and forth or is this just how JPEG conversion works?

Zzz212zzZ

JPEG compression algorithm takes advantage of the fact of the human visual system that it is less sensitive to the low frequency within the image. So doing this compression from PNG to JPG won't cause a drastic quality decrease in the view of human eyes.

ShivanPatel2025

Does this lead to worse visual quality of images with significant high-frequency content?

emily-xiao

@ShivanPatel2025, images with a lot of high-frequency content, like intricate textures or patterns, can suffer more noticeably under aggressive JPEG compression. This is because JPEG's method of simplifying data to reduce file sizes can blur or distort these details, which are made up of the very high frequencies JPEG aims to compress more heavily.

Songbird94

Does jpeg lose quality because it fails to concentrate error or because human are just sensitive enough?

yangbright-2001

In terms of compression quality, I am always confused about the difference between jpeg and png. I search and summarize the below info, JPEG uses lossy compression, which means that it reduces file size by slightly lowering image quality. This can lead to artifacts in the image, especially after multiple edits and saves. It's commonly used for photographs and images with complex coloring. PNG format uses lossless compression, meaning it preserves all image data and quality regardless of how many times it is edited and saved. It is ideal for images that require high clarity, such as logos and graphics.

sebzhao

I've heard that JPEG compression is really good and stands the test of time and that certain learned compression schemes using neural nets can be actually beaten by JPEG compression!

508312

This is really interesting, using human perception as a metric. It does make sense, but it is something I would never consider. This approach which doesn't use rigid metrics, but rather a fact of human perception is a very powerful one,

GarciaEricS

As someone who has been using a computer since practically forever but only got into computer science in college, it's really cool to see how these file formats and concepts that I've passively known about but never had too deep of an understanding come up in these classes. I now know (in essence) what jpeg compression is, and it's pretty cool that taking a computer graphics course is what gave me that exposure.

You must be enrolled in the course to comment