calculating PSNR
13 次查看(过去 30 天)
显示 更早的评论
I have two images original image and compressed image,please tell how to calculate mean square error and psnr
0 个评论
采纳的回答
Image Analyst
2012-3-21
Did you see the formula at http://en.wikipedia.org/wiki/PSNR? Of course you can just subtract the images and use the sum() function instead of the loops, which I know you know how to do. Just make sure you use .^2 instead of ^2 because you want an element-by-element squaring. Give it a try - it's just one line of code.
3 个评论
Image Analyst
2012-3-21
Looks like it should be as long as origImg & compImg are floating point images and not uint8 or uint16. I was thinking of something like
MSE = mean2((single(image1) - single(image2)).^2);
更多回答(1 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!