View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
PSNR for RGB images

4.0 | 1 rating Rate this file 19 Downloads (last 30 days) File Size: 166 KB File ID: #37691 Version: 1.2
image thumbnail

PSNR for RGB images


Youssef Khmou (view profile)


01 Aug 2012 (Updated )

PSNR for 2 RGB signals, (Peak Signal to Noise Ratio ) evaluated in dB.

| Watch this File

File Information

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 .


Psnr and Tspsa inspired this file.

MATLAB release MATLAB 7.4 (R2007a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
11 Jul 2014 vu

vu (view profile)

sorry log or log10?

Comment only
20 Mar 2014 chen

chen (view profile)

??? Function 'log' is not defined for values of class 'uint8'.

add double

28 Aug 2012 1.2

Screenshot added.

Contact us