[英]Multiplicative Noise to Additive Noise via Logarithmic Transformation
In this paper , logarithmic transformation is offered to convert multiplicative noise in an image to additive noise before applying other filters.在本文中,提供对数变换以在应用其他滤波器之前将图像中的乘性噪声转换为加性噪声。
logR(x,y) = log[O(x,y)×M(x,y)] = log{O(x,y)} + log{M(x,y)} = L(x,y) + S(x,y) logR(x,y) = log[O(x,y)×M(x,y)] = log{O(x,y)} + log{M(x,y)} = L(x,y) + S(x,y)
where F(x,y), L(x,y) and S(x,y) are the logarithms of R(x,y), O(x,y), and M(x,y), respectively.其中 F(x,y)、L(x,y) 和 S(x,y) 分别是 R(x,y)、O(x,y) 和 M(x,y) 的对数。
However, I am confused about whether they just meant applying log transformation to the speckled image like below:但是,我对它们是否只是意味着将日志转换应用于斑点图像感到困惑,如下所示:
img_log = (np.log(img+1)/(np.log(1+np.max(img))))*255 img_log = (np.log(img+1)/(np.log(1+np.max(img))))*255
Thanks in advance.提前致谢。
log(img+1)
is not the same as log(img)
. log(img+1)
与log(img)
不同。 Follow the equation you got.按照你得到的等式。 If a pixel is 0, then log(img)
will be -infinity
for that pixel.如果一个像素为 0,那么log(img)
将是该像素的-infinity
。 This is OK:还行吧:
0 * noise = 0
==> -infinity + log(noise) = -infinity
0 * noise = 0
==> -infinity + log(noise) = -infinity
If you add 1, you break the concept.如果你加 1,你就打破了这个概念。
Also, no, you don't need to scale the result of the logarithm.此外,不,您不需要缩放对数的结果。 log(img)
should be a floating-point image, don't try to do complex arithmetic with integers. log(img)
应该是浮点图像,不要尝试用整数进行复杂的算术运算。 After filtering and back-transformation through exp(.)
, you should have an image that is in the 0-255 range again, and can be converted to uint8, displayed, and/or saved like a regular image.通过exp(.)
进行过滤和反向转换后,您应该再次拥有一个在 0-255 范围内的图像,并且可以像普通图像一样转换为 uint8、显示和/或保存。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.