-
Hi! The "official" definition given on Wikipedia the calculation of PSNR and the implementation in this package differ a bit. What is the reason for this? Why is the first part of the subtraction in the last line left out? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Good catch! Initially we only supported tensors in [0, 1] range and left part of log10(MAX_i) were equal to zero for MAX_i = 1.0. upd: We scale tensors to [0, 1] range in this line, so left part in equation is always equal to zero. Implementation is correct. |
Beta Was this translation helpful? Give feedback.
-
Good point! I've overlooked that line. |
Beta Was this translation helpful? Give feedback.
Good catch! Initially we only supported tensors in [0, 1] range and left part of log10(MAX_i) were equal to zero for MAX_i = 1.0.
We added support for arbitrary ranged tensors later on, but didn't change that part of PSNR implementation.
I'll open a bug reportupd: We scale tensors to [0, 1] range in this line, so left part in equation is always equal to zero. Implementation is correct.