how to convert bpp(bits per pixel to compression ratio)?

22 views (last 30 days)
e.g. let bpp is 0.1870....than what will be the compression ratio?

Answers (1)

Walter Roberson
Walter Roberson on 10 May 2015
That depends upon the original image. Most images in common use are 8 bits (uint8) per color component, 3 color components per pixel, so 24 total bits per pixel. If you had 0.1870 bits per pixel instead, your compression ratio would be 24:0.1870 or about 128.3 to 1
Some kinds of image have only 1 color pane, and some kinds of images use more or fewer bits per component.
imfinfo() can be used to extract information about an image file. In particular look at the Bitdepth field.
tina jain
tina jain on 10 May 2015
Edited: tina jain on 10 May 2015
X is the image. e.g lena image(256*256*1), file size is size of image after ezw compression

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!