File Exchange

image thumbnail

Image Error Measurements

version (123 KB) by Michael Chan
Measures the differences between 2 images, and measurement of image quality.


Updated 23 Nov 2010

View License

main executing reference usage: usage_errorMeasurementsOfImages.m
The objective is to measure the differences between 2 images, and measurement of image quality.
1. Mean squared error, MSE
2. Root Mean squared error, RMSE
3. Peak signal to signal noise ratio, PSNR
4. Mean absolute error, MAE
5. Signal to signal noise ratio, SNR
6. Universal Image Quality Index
7. Enhancement Measurement Error, EME
8. Pearson Correlation Coefficient

Sample output:
PSNR = +13.81915 dB
MSE = 108.53790
RMSE = 10.41815
Universal Image Quality Index = 0.16077
EME (original image) = 14.50599
EME (noisy image) = 8.48040
PearsonCorrelationCoefficient (originalImage vs noisyImage) = 30959.27033
PearsonCorrelationCoefficient (originalImage vs originalImage) = 50624.00000
SNR = -10.28091 dB
MAE = 19.82882

Caveat: For reference purposes.

The author also recommends:

The author appreciates suggestions and errata. Please do not hesitate to send suggestions and feedback for improvement for the framework construction to the email provided.


Thank you.

Michael Chan JT

Comments and Ratings (13)

Anna Wateta

Anu Garg


Ilhame (view profile)

Hello Michael Chan,
Do you have the matlab code for AMBE ?
Thank you

Akash Dange

Thank you very much sir. Can I get matlab code for mean angle similarity,mean angle magnitude similarity,total edge difference ,total corner difference


I have calculated PSNR for some image that I enhanced.Now,I need to plot a graph of PSNR vs Bitrate(Kbps).How can I calculate the bitrate of a jpeg/tif/bmp image?

Yen Hanning


Michael Chan

Hi Shashi,
The utilities works with image of MxN (where M != N) as well.

Try insert these lines as a test starting from line 23 in usage sample code (usage_errorMeasurementsOfImages.m) :

M = 225; N = 150;
IMG = imresize(IMG, [M N], 'bicubic');

I hope this is clear. You may wish to email me for further inquires, as it is easier to trace the comments in my inbox. I hope it helps.
Thank you.


Shashi (view profile)

Can you please send the code for its implementation in case the size of image is M by N.

Peter ?


Sean (view profile)

Very comprehensive.

MATLAB Release Compatibility
Created with R2010a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.

Learn About Live Editor