How to calculate peak signal-to-noise ratio (PSNR) for RGB color image in Matlab?

13 次查看(过去 30 天)
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 ?

采纳的回答

Image Analyst
Image Analyst 2021-2-15
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.

更多回答(0 个)

标签

Community Treasure Hunt

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

Start Hunting!

Translated by