function snr = CalcSNR(image1,image2);
rhoNum = mean2(image1.*image2)-mean2(image1)*mean2(image2);
rhoDenom = sqrt((mean2(image1.^2)-(mean2(image1))^2)*(mean2(image2.^2)-(mean2(image2))^2));
rho = rhoNum/rhoDenom;
snr = sqrt(rho/(1-rho));