How does psnr calculate the PSNR of PNG color images?

6 views (last 30 days)
In my case, both input images are in PNG format, which (I expect to) consist of RGB values. The output is one PSNR value for each image.
Does it make sense to use psnr for PNG, or should I first make a conversion to YUV, and use psnr separately for the components?

Answers (1)

KSSV
KSSV on 3 Aug 2021
You can check how psnr is calculated from this file exchange: https://in.mathworks.com/matlabcentral/fileexchange/135-psnr.
You can use RGB image to calculate psnr.
  1 Comment
Seppo Valli
Seppo Valli on 3 Aug 2021
Thank you for the quick answer.
I would prefer getting separate PSNR values for luminance and chrominance components (as being coded separately by my software, and affecting to the perceived quality differently). Even getting only the value for luminance is better compared to averaging over components.
Is there any other way for this than to make a conversion (e.g.) to YUV, and use psnr separately for the components?
I am doupting that when using psnr for PNG images, the PSNR is calculated and averaged over RGB values. Is it so?

Sign in to comment.

Products


Release

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!