How to calculate Compression Ratio for Signal?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hi, I am looking for help. I need to calculate the compression ratio for signal in matlab. Pls any one know, the implmentation!
0 comentarios
Respuestas (1)
Walter Roberson
el 27 de Dic. de 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 comentarios
Walter Roberson
el 27 de Dic. de 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".
Ver también
Categorías
Más información sobre Denoising and Compression en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!