图像处理随笔之峰值信噪比(peak signal to noise ratio)

图像处理随笔之峰值信噪比(peak signal to noise ratio)
the definition from WIKI:an engineering term for the ratio between the maximum power of a signal and the power of corrupting noise that affects the fidelity of its representation.
一个信号的峰值信噪比(psnr)是一个信号的最大功率与可能影响它的表示精度的噪声功率的比值,也就是max powerof the signal /noise
具体公式如下:
这里写图片描述
(这个编辑器真的难用。。。就贴个图吧,latex还没入门)
m,n:图像的尺寸。
MSE:mean squared error 均方根误差
MAXI:图像的最大像素值,在图像处理中我们通常每次采样8比特。因此这个值就是255.
psnr 经常应用于测量图片的重建质量。一个简单的例子就是图片的压缩,假定一个信号为为原始数据,那么它在压缩时产生噪声。那么与产生的噪声相比,psnr此时就就近似了人们对于这种重建质量的一种感知。通常来说更高的psnr就显示了更高的重建质量·。
在有损的的图片压缩中(如JPEGÿ

  • 3
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
对于WPF中的ListBox和ListView控件,修改选中项的前景色可以通过修改控件的样式来实现。以下是一种可能的解决方案: 1. 首先,需要将ListBox或ListView的SelectionMode属性设置为Single或Extended,以便只能选择单个项或多个项。 2. 然后,需要为控件定义一个样式。可以使用以下代码: ``` <Style TargetType="ListBoxItem"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="ListBoxItem"> <Border Name="Border" Padding="2" SnapsToDevicePixels="true"> <ContentPresenter /> </Border> <ControlTemplate.Triggers> <Trigger Property="IsSelected" Value="true"> <Setter TargetName="Border" Property="Background" Value="LightBlue"/> <Setter Property="Foreground" Value="White"/> </Trigger> <Trigger Property="IsEnabled" Value="false"> <Setter Property="Foreground" Value="Gray"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> ``` 这个样式将ListBoxItem的背景色设置为LightBlue,并将前景色设置为白色。当项被选中时,将应用IsSelected触发器,并将前景色设置为白色。当项被禁用时,将应用IsEnabled触发器,并将前景色设置为灰色。 3. 最后,将ListBox或ListView的ItemContainerStyle属性设置为新定义的样式。例如: ``` <ListBox ItemContainerStyle="{StaticResource MyListBoxItemStyle}"> <ListBoxItem>Item 1</ListBoxItem> <ListBoxItem>Item 2</ListBoxItem> <ListBoxItem>Item 3</ListBoxItem> </ListBox> ``` 通过这种方式,就可以自定义ListBox或ListView的选中项前景色了。

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值