Peak signal to noise ratio is known as PSNR. It is the most popular technique to make a comparison between images or signals. We can get quantitive compression values by PSNR.

The PSNR value is mostly dependent on the MSE we discussed before. To avoid unnecessarily huge numbers, the log-based calculation is employed as the noise difference could be huge. So the equation is –

Here, is the maximum possible value. In the case of an 8-bit grayscale image, the value would be 255.

#### Why the value is 255?

Now, the question is why the value is 255? is there any rule or it’s just an arbitrary number?

First of all, it’s not an arbitrary value, it has a rule. The rule is . Here, n is the number of bits that are considered. In the case of an 8-bit image, the value is 255. If we work on a 16-bit image then the value would be 65535.