i am getting the error "Undefined function 'psnr' for input arguments of type 'uint8'" in executing the code below

5 ビュー (過去 30 日間)
tina jain
tina jain 2015 年 2 月 28 日
回答済み: SRI 2015 年 2 月 28 日
ref = imread('pout.tif'); A = imnoise(ref,'salt & pepper', 0.02);
[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);

回答 (1 件)

SRI
SRI 2015 年 2 月 28 日
HI Tina There is no inbuilt function for psnr, we want to implement with the eqaution and the datatype of the two image in the psnr should be same as double or uint8..
if one is in uint8 and another is in double means it will not work

Community Treasure Hunt

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

Start Hunting!

Translated by