How to calculate Compression Ratio for Signal?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi, I am looking for help. I need to calculate the compression ratio for signal in matlab. Pls any one know, the implmentation!
0 commentaires
Réponses (1)
Walter Roberson
le 27 Déc 2013
compression_ratio = storage_required_for(CompressedSignal) / storage_required_for(OriginalSignal)
Remember to take into account that the required storage for a location depends upon the datatype (double, uint8, and so on.)
2 commentaires
Walter Roberson
le 27 Déc 2013
"storage required for" is part of "size". "size" does not include only width times height: it has to take into account also bit-planes and the storage requirement per bit-plane per pixel.
Ah, I see I flipped the ratio around in what I wrote. Yes you would normally divide original by compressed size.
type single() uses 4 bytes per location.
If you are using the same datatype for both the compressed and uncompressed signal, then the amount of storage per location factors out of the top and bottom of the ratio. However, it is common in compression for the original source to be "pixels" or "single" or "double" but the compressed data to be in "bytes" or "bits", so it is generally safer to be explicit about the storage, as doing so can help guide your thinking about what the output "really means".
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!