How to calculate the Compression ratio
5 ビュー (過去 30 日間)
古いコメントを表示
Hi, could someone explain to me how to calculate the compression ratio of an image from the quantization bit allocation? I thought calculating the ratio from the the image sizes was correct but no, there seems to be a way of calculating it from the quantization bits. Please guide me through this. Thank you
0 件のコメント
回答 (1 件)
Walter Roberson
2013 年 1 月 18 日
Under limited circumstances in which quantization (and repacking of binary) is the only compression algorithm, then the compression ratio approaches the number of bits in the original pixel, divided by the number of bits in the quantized pixel.
If the number of quantization states is not a power of 2 (e.g., you quantize to 50 shades), then in the limit use log2 of the number of quantization states, provided you are usual optimal packing (but you would normally use arithmetic encoding instead in such a situation; it makes the calculations much easier.) A less efficient packing that is much easier to process would use ceil(log2(num_quantization_states)) -- e.g., ceil(log2(50)) bits per pixel.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Image Segmentation and Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!