Can both PSNR and Compression ratio be good for the same image?

조회 수: 2 (최근 30일)
tina jain
tina jain 2015년 11월 20일
답변: Walter Roberson 2015년 11월 20일
I am using a compression algorithm for a image. Then I am calculating both PSNR and compression ratio of the image. I am getting a high PSNR value. For the same image is it possible to obtain high compression ratio?

답변 (1개)

Walter Roberson
Walter Roberson 2015년 11월 20일
Yes.
Let the image be 1024 x 768, with the pixel value 42 in every pixel except the bottom row is 43. This can compress considerably, possibly to 5 bytes. But suppose the decompressed version is all 42 everywhere, that the bottom border of 43 was restored incorrectly.
Then for this image, for the MSE calculation the difference would be 0 nearly everywhere but would be 1 for a 1 x 768 strip. The total squared error would then be 1*768 and that would be divided by 1024 * 768 to give an MSE of 1/1024. If you work through the PSNR calculation,
10*log10(255^2/(1/1024))
you will get about 78.2 which is decent. Meanwhile your compression ratio might be 150000 to 1.
If you accept a lower compression ratio then the PSNR can improve by supposing lower and lower imperfections in the re-creation, which would probably take more storage.
Of course if you have a constant image and it is restored perfectly and compresses extremely well because it is constant, then your PSNR is going to be infinite because your MSE would be 0.

Community Treasure Hunt

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

Start Hunting!

Translated by