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!