Compression Ratio of an image using matlab
2 views (last 30 days)
Show older comments
I was trying to calculate the CR(compressing ratio) of an image that I compressed and decompressed using FFT in matlab. I have read a similar post here about CR calculation but I did not get the method he was using to process the image. That post was saying that : CR = numel(X)/numel(Y) What I understood is that X is my image before FFT and Y is after.
But this results in CR =1 which I do not think that is the correct answer. Can someone explain to me what am I missing?
0 Comments
Answers (2)
Walter Roberson
on 24 Nov 2015
fft is not in itself an image compression technique.
However, you can do fft and you can check to see which positions of the result have the greatest absolute magnitude. Then you can construct a list of the most important coefficients together with their positions, selecting only some of them. If the storage required for the coefficients plus the storage required for the position information is less than the storage required for the original coefficients, then you get compression.
0 Comments
Image Analyst
on 24 Nov 2015
You need to look at the size on disk. Use the dir() function. Once they're read back in and decompressed into a rows x columns 2-D uint8 image, both will be the same size in memory so that's why you got a Cr of 1 and that's why you need to look at the size on disk.
0 Comments
See Also
Categories
Find more on Computer Vision with Simulink in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!