PSNR的计算

2010-01-22 22:11
PSNR(Peak Signalto Noise Ratio):峰值信噪比

峰值信噪比(PSNR),一种评价图像的客观标准。它具有局限性,PSNR是 “PeakSignaltoNoiseRatio”的缩写。peak的中文意思是顶点。而radio的意思是比率或比列的。整个意思就是到达噪音比率的顶 点信号,psnr是一般是用于最大值信号和背景噪音之间的一个工程项目。通常在经过影像压缩之后,输出的影像通常都会有某种程度与原始影像不一样。为了衡 量经过处理后的影像品质,我们通常会参考PSNR值来认定某个处理程序够不够令人满意。它是原图像与处理图像之间均方误差相对于(2^n-1)^2的对数 值(信号最大值的平方,n是每个采样值的比特数),它的单位是dB。公式如下:

PSNR
PSNR+10*log10((2^n-1)^2/MSE)


PSNR=10*log10((2^n-1)^2/MSE)
其中,MSE是原图像与处理图像之间均方误差。公式中的符号采用了MATLAB的用法。
Peak就是指8bits表示法的最大值255。MSE指MeanSquareError,I(角标n)指原始影像第n个pixel值,P(角标n)指经处理后的影像第n个pixel值。PSNR的单位为dB。所以PSNR值越大,就代表失真越少。

PSNR是最普遍,最广泛使用的评鉴画质的客观量测法,不过许多实验结果都显 示,PSNR的分数无法和人眼看到的视觉品质完全一致,有可能PSNR较高者看起来反而比PSNR较低者差。这是因为人眼的视觉对于误差的敏感度并不是绝 对的,其感知结果会受到许多因素的影响而产生变化(例如:人眼对空间频率较低的对比差异敏感度较高,人眼对亮度对比差异的敏感度较色度高,人眼对一个区域 的感知结果会受到其周围邻近区域的影响)。

The phrase peak signal-to-noise ratio, often abbreviated PSNR, is an engineering term for the ratio between the maximum possible power of a signal and the power of corrupting noise that affects the fidelity of its representation. Because many signals have a very wide dynamic range, PSNR is usually expressed in terms of the logarithmic decibel scale.

The PSNR is most commonly used as a measure of quality of reconstruction in image compression etc. It is most easily defined via the mean squared error (MSE) which for two m×n monochrome images I and K where one of the images is considered a noisy approximation of the other is defined as:

\mathit{MSE} = \frac{1}{mn}\sum_{i=0}^{m-1}\sum_{j=0}^{n-1} ||I(i,j) - K(i,j)||^2

The PSNR is defined as:

\mathit{PSNR} = 10 \cdot \log_{10} \left( \frac{\mathit{MAX}_I^2}{\mathit{MSE}} \right)  = 20 \cdot \log_{10} \left( \frac{\mathit{MAX}_I}{\sqrt{\mathit{MSE}}} \right)

Here, MAXI is the maximum pixel value of the image. When the pixels are represented using 8 bits per sample, this is 255. More generally, when samples are represented using linear PCM with B bits per sample, MAXI is

2B − 1.

For color images with three RGB values per pixel, the definition of PSNR is the same except the MSE is the sum over all squared value differences divided by image size and by three.

Typical values for the PSNR in image compression are between 30 and 40 dB.

峰值信噪比(经常缩写为PSNR)是一个表示信号最大可能功率和影响它的表示精度的破坏性噪声功率的比值的工程术语。由于许多信号都有非常宽的动态范围,峰值信噪比常用对数分贝单位来表示。

峰值信噪比经常用作图像压缩等领域中信号重建质量的测量方法,它常简单地通过均方差MSE)进行定义。两个m×n单色图像IK,如果一个为另外一个的噪声近似,那么它们的的均方差定义为:

\mathit{MSE} = \frac{1}{mn}\sum_{i=0}^{m-1}\sum_{j=0}^{n-1} ||I(i,j) - K(i,j)||^2

峰值信噪比定义为:

\mathit{PSNR} = 10 \cdot \log_{10} \left( \frac{\mathit{MAX}_I^2}{\mathit{MSE}} \right)  = 20 \cdot \log_{10} \left( \frac{\mathit{MAX}_I}{\sqrt{\mathit{MSE}}} \right)

其中,MAXI是表示图像点颜色的最大数值,如果每个采样点用 8 位表示,那么就是 255。更为通用的表示是,如果每个采样点用 B 位线脉冲编码调制表示,那幺 MAXI 就是

2B − 1.

对于每点有RGB三个值的彩色图像来说峰值信噪比的定义类似,只是均方差是所有方差之和除以图像尺寸再除以 3。

图像压缩中典型的峰值信噪比值在 30 到 40dB 之间

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值