How to calculate peak signal-to-noise ratio (PSNR) for RGB color image in Matlab?
13 views (last 30 days)
Show older comments
ghada sandoub
on 14 Feb 2021
Commented: ghada sandoub
on 15 Feb 2021
I made a project on image enhancement and I want to measure the PSNR for the enhanced RGB color image. I have also the reference RGB color image. I know there is a function in Matlab (psnr()). however I want to know if I can use this function to calculate the PSNR for the whole RGB color image i.e. use the following instruction in Matlab :
PSNR= psnr(A,Ref); % A is the enhanced RGB color image and REF is the reference RGB color image.
My question is : Is this instruction produces the correct PSNR value for the enhanced RGB color image or I have to calculate the PSNR for each channel separately ?
0 Comments
Accepted Answer
Image Analyst
on 15 Feb 2021
The help does not specify that it must be a 2-D gray scale image so I assume it would work for an RGB image, which makes sense since it's just an element-by-element comparison so as long as the dimensions of both the test image and reference image match, it should work.
More Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!