16位图像的信噪比计算
signed int temp;double mse = 0.0 ;
for( y = 0; y < c;y++ )
for( x = 0; x < r;x++ )
{
temp = (signed int)map1-(signed int)map2;
mse += (double)temp*temp;
}
以上计算好一个16位深度图像的均方误差mse之后
信噪比的计算公式是
mse = mse / (1.0*r*c);
double psnr = 10 * log10(65535.0*65535.0/mse);
还是
mse = mse / (1.0*r*c);
double psnr = 10 * log10(255.0*255.0/mse); 呢 ??
页:
[1]