0
$\begingroup$

I have looked at various sources, but still have not been able to answer the question: what is compression ratio? I have come to the understanding that this is the definitive answer:

compression ratio = (block size * bits per pixel) / (dct coefficients * bits per pixel)

--or--

compression ratio = amount of bits in original / amount of dct coefficients

Please confirm.

$\endgroup$
4
$\begingroup$

Neither.

A true compression ratio is: "original file size in bits" divided by "compressed file size in bits". A practical (based on disk limits) compression may embed the chunk size effect: "original file size in number of chunks" divided by "compressed file size in chunks", less favorable.

Some of the main reasons for "neither" are:

  • DCT is not the only method for image compression: dct co-efficientswould be meaningless for non-DCT methods
  • in JPEG, DC coefficients are further predicted in a raster fashion
  • images have color components, further decorrelated and differentially quantized to reduce variability
  • even assuming that DCT can stand for "transformed into less redundant symbols": you are loosing the header, the entropy or dictionary coding, and never complete the construction of an actual string of compressed bits.
  • the "amount" of DCT coefficients, or "dct co-efficients" is not precise enough to be counted.

However, an estimate of the number of bits taken by quantized DCT coefficients (through entropy for instance), when divided from the original image size, can provide a rough estimate of what you can expect from JPEG compressing, at least at intermediate bit-rates.

$\endgroup$

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.