Table of Contents
Peak Signal-to-Noise Ratio (PSNR) is a widely used metric for assessing the quality of compressed or reconstructed images. It compares the original image with the processed image to quantify the level of distortion or noise introduced during processing. PSNR is expressed in decibels (dB), with higher values indicating better image quality.
Understanding PSNR
PSNR is calculated based on the Mean Squared Error (MSE) between the original and the processed image. The formula for PSNR is:
PSNR = 10 * log10 (MAX2 / MSE)
Where MAX is the maximum possible pixel value of the image. For 8-bit images, MAX is 255.
Calculating PSNR Step-by-Step
To compute PSNR, follow these steps:
- Calculate the MSE by averaging the squared differences between corresponding pixels of the original and processed images.
- Determine the maximum pixel value (e.g., 255 for 8-bit images).
- Apply the PSNR formula using the MSE and MAX value.
Practical Considerations
While PSNR is simple to compute and widely used, it does not always correlate perfectly with perceived image quality. Factors such as human visual perception are not directly accounted for in PSNR calculations. Therefore, it is often used alongside other metrics like Structural Similarity Index (SSIM).