why I am getting Inf as result of PSNR?

18 次查看(过去 30 天)
I used PSNR to compare between the extracted watermark(wex.jpg) and the original watermark (msg.jpg) the result is Inf could any one help me to know why and fix the result please ? the images are uploaded I used default psnr

采纳的回答

Image Analyst
Image Analyst 2017-12-12
Since the definition is
PSNR=10log10(peakval^2/MSE)
and the MSE is zero if the two images are identical, then why does that surprise you? YOu know that one over zero is infinity, right? And that log of infinity is also infinity? What do you think it should be?
  4 个评论
Manar
Manar 2023-2-7
Hi Eliza,
Did you find how to represent (Inf) as value?
I need it for my research purpose.
Thank you
Walter Roberson
Walter Roberson 2023-2-7
percentage_identical = mean2(Image1 == Image2) * 100
However, you have to think about whether this is what you want if you are comparing color images. If you have two images, and the red and green panes are identical between the two images, but the blue plane differs for some locations, then are you okay with "red identical" and "blue identical" count as +2 out of a possible +3 available for that pixel? Or do you want to say that the pixel should not be considered at all identical if any of the color panes are different?
percentage_identical = mean2(all(Image1 == Image2,3)) * 100

请先登录,再进行评论。

更多回答(0 个)

标签

Community Treasure Hunt

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

Start Hunting!

Translated by