why I am getting Inf as result of PSNR?
18 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Eliza
el 12 de Dic. de 2017
Comentada: Walter Roberson
el 7 de Feb. de 2023
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
0 comentarios
Respuesta aceptada
Image Analyst
el 12 de Dic. de 2017
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 comentarios
Manar
el 7 de Feb. de 2023
Hi Eliza,
Did you find how to represent (Inf) as value?
I need it for my research purpose.
Thank you
Walter Roberson
el 7 de Feb. de 2023
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
Más respuestas (0)
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!