MATLAB Answers


How to compute P.S.N.R value for the below set of images?

Asked by Sandeep V on 12 May 2015
Latest activity Commented on by Sandeep V on 13 May 2015
I would request anybody to provide me with code to compute the PSNR value for the below pair of images. I want to compare output1.png with o.png, o2.png with output2.png? Please help?


Sign in to comment.

1 Answers

Answer by Thomas Koelen on 12 May 2015
 Accepted Answer

If you have the image processing toolbox you can use the function:
peaksnr = psnr(A,ref)
where A is your output1 and ref is o.


Thanks it is working and I am getting psnr as 28.241
Does this suggest that the second image(output1.png) is better than the first image(o.png)?
Of course not. psnr is a measure of how close two images are to each other, not an overall assessment of which image is "better".
OK then what does this 28.241 suggest? Can you please explain?

Sign in to comment.

Translated by