I would like to know which formula of PSNR is used in tf.image.psnr( a, b, max_val, name=None )
I found these PSNR formulae
PSNR(f,g)=10 log_10(〖255〗^2/MSE(f,g) )
but I do not understand which kind of formula is used in tf.image.psnr function. Thanks in advance if you could explain me.
According to the function signature, you have to specify the
The formulas you’ve shown are identical if
max_val = 255, which is usually the maximum possible value per pixel per channel.
Sometimes you know that the image has been converted and the values lie in range 0 to 1. In such case, you specify
max_val to be 1.
According to sources, the formula is a bit different:
(20 * log(max_val) / log(10)) - ((10 / log(10)) * log(mse))
Your explanation saves me! Thank you so much.