0
$\begingroup$

The quantization table is given on the JPEG Wiki page. How was this table derived? I'm currently doing a project where I have to come up with custom quantization table for an image, but I don't know how to begin. I figure if I learn how the JPEG table was derived, I might come up with a semi-original idea.

$\endgroup$
0
$\begingroup$

The standard JPEG quantization table is a typically 8 x 8 matrix of weights whose elements divide the corresponding elements of the 8 x 8 DCT coefficients of an image block.

The division effectively reduces the value of the DCT coefficients and most of them forced to be zero. The standard table is determined (optimized) to yield minimum distortion with maximum compression (per quality) with respect to the most typical images and average viewer visual charactersitics.

As s result high frequency coefficients are reduced as much as possible.

Note that the JPEG quality parameter already gives the user a means of adjusting the effective quantization table weights, but not over individual, elements. So you can also design an application (or viewer) specific quantization table if you wish according to the rate-distortion criteria you have in your mind.

Note that designing a custom quantization table requires you to embed this information within the compressed data bitstream.

$\endgroup$
  • $\begingroup$ could I somehow perform an analysis of the 8x8 DCT coefficients so I can see which pixels in any 8x8 block exhibit the most variance and then create a quantization table based on the calculated variance? $\endgroup$ – user50420 Nov 26 '18 at 0:08
  • $\begingroup$ yes (probably) you could something similar. But then you should also embed that specific quantization table into the JPEG bit stream and hence lose the very means of compression refficiency... $\endgroup$ – Fat32 Nov 26 '18 at 0:13
  • $\begingroup$ Is is possible to optimize the quantization table to the whole image. It will cause the overhead of storing the quantization table on the header, but I usually leads to good results. That is the approach done by the JPEG encoder Guetzli created by Google. See: github.com/google/guetzli $\endgroup$ – LEo Aug 23 at 17:16
  • $\begingroup$ @LEo yes you can design a whole image optimized quantization table and transmit this (or embed) with the compressed picture data. $\endgroup$ – Fat32 Aug 23 at 21:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.