how can i find the compression ratio after running the LZW compression code ?

Risposte (1)

Look at the size of the file on disk and divide the number of bytes the image variable has in your MATLAB program by that number. For example, the disk file is 200,000 bytes, and the size in MATLAB is 1,000,000 bytes. 1,000,000/200,000 = 5 so the compression ratio is 5 to 1.

2 Commenti

The code i used does not generate a new image file it builds a table and post the entries. so how can i benefit from that?
I don't know what that means but try "whos" to get the size of the data/table that you think is the compressed version and compare it to the size of the uncompressed version.

Accedi per commentare.

Richiesto:

il 13 Apr 2017

Commentato:

il 14 Apr 2017

Community Treasure Hunt

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

Start Hunting!

Translated by