function cnrVal = CNR(pic1,pic2);
[pic1LowRow,pic1LowCol,pic1HighRow,pic1HighCol] = FindHighandLow(pic1);
[pic2LowRow,pic2LowCol,pic2HighRow,pic2HighCol] = FindHighandLow(pic2);
meanReg1 = (mean2(pic1(pic1HighRow:pic1HighRow+1,pic1HighCol:pic1HighCol+1))+mean2(pic2(pic2HighRow:pic2HighRow+1,pic2HighCol:pic2HighCol)))/2;
meanReg2 = (mean2(pic1(pic1LowRow:pic1LowRow+1,pic1LowCol:pic1LowCol+1))+mean2(pic2(pic2LowRow:pic2LowRow+1,pic2LowCol:pic2LowCol+1)))/2;
noiseSD = (conv2(pic1,pic1)+conv2(pic2,pic2))/2-conv2(pic1,pic2);
noiseSDmax = sqrt(max(max(noiseSD)));
cnrVal = (meanReg1-meanReg2)/noiseSDmax;

