PSNR for RGB images
Version 1.2.0.0 (166 KB) by
Youssef Khmou
PSNR for 2 RGB signals, (Peak Signal to Noise Ratio ) evaluated in dB.
The function, PSNR_RGB( X,Y) computes the PSNR for two RGB images using the formula :
MSE(X,Y)=SUM(1,n)SUM(1,m)SUM(1,p) [X(i,j,k)-Y(i,j,k)]²
d= max(max(X),max(Y))|
PSNR(X,Y)=10.log( d.^2 / MSE)
with p=3, as three channels red, green and blue,
The code can be altered for gray scale image sequences , or Volume of pixels M(n,m,p) ( p > 3 ) .
Some results are in the pdf file " PSNR_RGB.pdf " for discussion .
Cite As
Youssef Khmou (2026). PSNR for RGB images (https://uk.mathworks.com/matlabcentral/fileexchange/37691-psnr-for-rgb-images), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2007a
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
- Image Processing and Computer Vision > Computer Vision Toolbox > Recognition, Object Detection, and Semantic Segmentation > Image Category Classification >
Find more on Image Category Classification in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.