Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visualize quantization table compression #4

Open
OmarShehata opened this issue Mar 18, 2022 · 0 comments
Open

Visualize quantization table compression #4

OmarShehata opened this issue Mar 18, 2022 · 0 comments

Comments

@OmarShehata
Copy link
Owner

Currently the slider "compresses" the image by zero-ing out DCT components in order of highest weight.

This is not quite how JPEG works in practice. To apply compression, you divide each component by a specific constant factor. These constants for each component are specified in a quantization table.

The values in the quantization table are chosen to preserve low-frequency information and discard high-frequency (noise-like) detail as humans are less critical to the loss of information in this area.

From: http://www.robertstocker.co.uk/jpeg/jpeg_new_10.htm

So it could be interesting to compare compressing using different quantization tables. Or simply as someone suggested on Twitter: zero-out the components by the zig zag order (highest frequency to lowest) which is generally how the quantization tables are designed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant