How to calculate peak signal-to-noise ratio (PSNR) for RGB color image in Matlab?
조회 수: 11 (최근 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 ?
댓글 수: 0
채택된 답변
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!