How to measure quality of an image?
4 次查看(过去 30 天)
显示 更早的评论
I need to find quality of an image before and after pre-processing.
For this, i need to calculate PSNR (Peak Signal to Noise Ratio), MSE (Mean Square Error),MAXERR (Maximum Squared Error) and L2RAT (Ratio of Squared Norms)
X = imread('africasculpt.jpg');
Xapp = X;
Xapp(X<=100) = 1;
[psnr,mse,maxerr,L2rat] = measerr (X,Xapp)
figure;
subplot(1,2,1); image(X);
subplot(1,2,2); image(Xapp);
This is the program that i got in Help menu in matlab.
However it is showing an error. Can anyone help me in this......
4 个评论
Image Analyst
2014-6-2
That is not the full error message! Geoff asked you for the error message and instead you snipped out a small part of it. Importantly, you forgot to include the actual error message - you only included the line numbers. So while we know something went wrong with those lines of code, we don't know what. Please copy and paste ALL THE RED TEXT, not just part of it, if you want help.
采纳的回答
Image Analyst
2014-5-31
编辑:Image Analyst
2014-5-31
There are psnr() and ssim() functions for image quality in the Image Processing Toolbox. If you don't have a recent version, I have some code you can use in older versions in the attached file.
5 个评论
nithya b
2020-8-24
my first question is whether quality of image can be identifed for single image? first one i want to get quality of image before preprocessing (aquired from sensor) and second one is after pre-processing.
my second doubt is when calculating psnr value it is asking for two images as input image one is destImg and the other is original image. i have two images one is the output of median filter of my input fingerprint image and then mean filter of input fingerprint image. So here i want to know which output gives better psnr. so i gave as psnr(medianfilteroutput, meanfilteroutput). got psnr value of 24.69. is this correct way of finding psnr value? if correct shall i assume this psnr is for medianfilter?
if it is wrong how to find correct psnr of a method's output? how to compare two methods' output?
Image Analyst
2020-8-24
There are quality metrics that don't use a reference:

更多回答(2 个)
remos remos
2015-1-9
in the same subject I work on the mosaic of images with two different method So I have two different results. Visually a method from the two gives good result I want to compare the quality of both results and conclude one that gives good results and I don't know how to use your code to get that
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!