How can I calculate the PSNR of two images in matlab? The images are obtained as intermediate results. How can I use these images to calculate the PSNR value
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
D Joseph
le 17 Août 2015
Commenté : D Joseph
le 20 Août 2015
How can I calculate the PSNR of two images in matlab? The images are obtained as intermediate results. How can I use these images to calculate the PSNR value
Réponse acceptée
Walter Roberson
le 18 Août 2015
Yes, PSNR can be negative. It is 10 * log10() of a ratio, so if the ratio is less than 1 then log10() is negative and so the PSNR would be negative.
3 commentaires
Walter Roberson
le 18 Août 2015
nI and I would have to be double() for that to work -- or rather, they could not be uint8() or any other unsigned class.
I = double(YourImage);
for K = 1 : 20
nI = I + randn(size(I)) * 1.2345*K;
ps(K) = 10*log10(255*255/mean2((nI-I).^2));
end
plot(ps);
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Computer Vision with Simulink dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!