Signal to Noise Ratio

by

 

The MSE calculated by averaging the squared intensity differences of distorted and reference image

Qualite=snr(ImRef,ImDis)
function Qualite=snr(ImRef,ImDis)
ImRef=double(ImRef);
ImDis=double(ImDis);

if (mean2((ImRef-ImDis).^2)~=0)
    Qualite=10*log10(mean2((ImRef).^2)/mean2((ImRef-ImDis).^2));
else 
    
    Qualite=0;
end;

return


    

Contact us