Borrar filtros
Borrar filtros

How to calculate Compression Ratio for Signal?

1 visualización (últimos 30 días)
Hafeezullah Amin
Hafeezullah Amin el 27 de Dic. de 2013
Comentada: Walter Roberson el 27 de Dic. de 2013
Hi, I am looking for help. I need to calculate the compression ratio for signal in matlab. Pls any one know, the implmentation!

Respuestas (1)

Walter Roberson
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
Hafeezullah Amin
Hafeezullah Amin el 27 de Dic. de 2013
Thanks for suggestion, I am using type single, but i am confused with the formula used for image compression, which is CR=(uncompressed image size/compressed image size)!
Walter Roberson
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".

Iniciar sesión para comentar.

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!

Translated by