How to compare or find out the P.S.N.R. value of two images?

29 ビュー (過去 30 日間)
Sandeep V
Sandeep V 2015 年 4 月 26 日
コメント済み: MD IS 2020 年 5 月 26 日
I am giving two images below can anybody help in finding out the P.S.N.R. value of them? My base picture is "t.png" and the image after processing is "output.png", can anybody help me in finding out their respective P.S.N.R. values?

採用された回答

Image Analyst
Image Analyst 2015 年 4 月 26 日
Copied from the help:
psnr
Peak Signal-to-Noise Ratio (PSNR) expand all in page
Syntax
peaksnr = psnr(A,ref) example
peaksnr = psnr(A,ref,peakval)
[peaksnr,snr] = psnr(___)
Description
example
peaksnr = psnr(A,ref) calculates the peak signal-to-noise ratio for the image A, with the image ref as the reference. A and ref must be of the same size and class.
peaksnr = psnr(A,ref,peakval) uses peakval as the peak signal value for calculating the peak signal-to-noise ratio for image A.
[peaksnr,snr] = psnr(___) returns the simple signal-to-noise ratio, snr, in addition to the peak signal-to-noise ratio.
  9 件のコメント
Image Analyst
Image Analyst 2019 年 10 月 17 日
Yes, for am 8 bit image use 255, for a 16 bit image use 65,535, and for a floating point image, use 1.
MD IS
MD IS 2020 年 5 月 26 日
@Image Analyst
I appreciated your answer 'The PSNR does not tell you which image is "better". It tells you how close your image is to the reference image'.
Which value (low or high) of PSNR tell me about my image is closer to the reference image. I am a little bit confused about the value of PSNR; hence looking for an anwer from you. Thank you.

サインインしてコメントする。

その他の回答 (1 件)

VISHNU MENON
VISHNU MENON 2019 年 1 月 29 日
can we have reference image as bmp format whereas other image as jpg format and perform the psnr. should both be of same format?
  1 件のコメント
Image Analyst
Image Analyst 2019 年 1 月 29 日
Of course. The format on disk doesn't matter. Once they're read into memory in your program, they're all the same, like an RGB image or a gray scale image, and the disk format doesn't matter.

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by