Confusion whether the calculated compression ratio is correct or not.
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am applying compression on an image of 40KB(350x500x3 uint8) to get new image of 18KB(348x500x3 uint8) .I have used the following code for finding the compression ratio-
z='xyz.jpg';
z1='out.jpg';
k=imfinfo(z);
k1=imfinfo(z1);
ib=k.Width*k.Height*k.BitDepth/8;
cb=k1.Width*k1.Height*k1.BitDepth/8;
cr=ib/cb;
The value of cr comes to be 1.005747126436782 .
I don't know whether the value of cr is correct or not.Can anyone verify it? Also i would like to know how it is manually calculated via the formula.
3 commentaires
Walter Roberson
le 30 Juil 2019
In https://www.mathworks.com/matlabcentral/answers/433311-how-to-compute-number-of-dedicated-bits-in-arithmetic-coding-in-matlab#answer_350087 I mention some of the perils of relying on file size to calculate compression ratio.
Réponses (0)
Voir également
Catégories
En savoir plus sur Denoising and Compression dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!