フィルターのクリア

How can I measure PSNR or MSE for 100 images and save the result to excel file?

2 ビュー (過去 30 日間)
Abdullah
Abdullah 2016 年 3 月 3 日
編集済み: Stalin Samuel 2016 年 3 月 5 日
How can I measure PSNR or MSE for 100 images and save the result to excel file? I can do it for one image each time but it take so long to finish the 100 images.

回答 (1 件)

Stalin Samuel
Stalin Samuel 2016 年 3 月 3 日
% Example code
list = dir('*.jpg') %list of images in the directory
for i = 1:length(list)
I = imread(list(i).name);
A = imnoise(I,'salt & pepper', 0.02);
[peaksnr, snr] = psnr(A, I);
MSE=mean2((A-I).^2);
data(i,:) = [peaksnr MSE];
end
xlswrite('mmse.xlsx',data);
  2 件のコメント
Abdullah
Abdullah 2016 年 3 月 3 日
i got this error "Undefined function or variable 'data'"
Stalin Samuel
Stalin Samuel 2016 年 3 月 3 日
編集済み: Stalin Samuel 2016 年 3 月 5 日
I am not getting any error.And the data was saved in the excel file successfully.Once again cross check your code .Also verify the working directory.

サインインしてコメントする。

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by