i am executing the code given in the matlab documentation and getting the error'Undefined function 'psnr' for input arguments of type 'double'.
2 ビュー (過去 30 日間)
古いコメントを表示
is psnr is not inbuilt in matlab?
ref = imread('lena256.bmp');
ref=double(ref(:,:,1));
A = imnoise(ref,'salt & pepper', 0.02);
%Calculate the PSNR.
[peaksnr, snr] = psnr(A, ref);
fprintf('\n The Peak-SNR value is %0.4f', peaksnr);
fprintf('\n The SNR value is %0.4f \n', snr);
0 件のコメント
回答 (1 件)
Meghana Dinesh
2015 年 3 月 16 日
編集済み: Meghana Dinesh
2015 年 3 月 16 日
As far as I know, only A should be of type double. Also, check if you have the necessary toolbox and the right version of MATLAB where psnr is included.
Regards,
Meghana.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!