在 matlab 中求图像的逆对数变换
我几乎一整天都在寻找这个。对数变换的一般形式是
s = clog(1+r)
其中
c = 0.1
相反的是逆对数变换(书)。对数逆变换是什么?是
s = exp(r)
吗?
无法获得正确的输出。
I have been searching for this almost all day. The general form of the log transformation is
s = clog(1+r)
where
c = 0.1
The opposite is inverse log transformation(book). What will be the inverse log transformation? Is it
s = exp(r)
?
Could not get right output.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
这适用于逆对数变换
This works for inverse log transformation
如果
Log()
是 自然对数。如果您的Log()
使用不同的基数(基数 2、基数 10、任何其他任意基数),那么您将需要使用不同的基数来代替e
在Exp()
中。更新
尝试
10^(x/0.1)-1
。x/0.1
撤消0.1 *
操作,10^
撤消log()
和- 1
撤消+1
。Exp()
will only be an inverse ofLog()
ifLog()
is the natural logarithm. If yourLog()
is using a different base (base 2, base 10, any other arbitrary base), then you will need to use the different base in place ofe
inExp()
.Update
Try
10^(x/0.1)-1
.x/0.1
undoes the0.1 *
operation,10^
undoes thelog()
, and-1
undoes the+1
.我认为您定义了 c 将结果图像标准化为有效(可见)范围。那么
c
的有理值可以是:其中
L
是灰度级数。因此s
将是:或
那么反转转换将是:
或
这是
L=256
的转换输出:应用此转换到我们需要做的图像一些类型转换:
I think you defined
c
to normalize the resulting image to a valid (visible) range. Then a rational value forc
could be:where
L
is the number of gray levels. Sos
would be:or
Then the inverted transformation would be:
or
This is the transformation output for
L=256
:To apply this transformation to an image we need to do some typecasting:
您可以使用幂律变换来执行此操作,因为在幂律变换中,您可以移动曲线以执行对数变换或执行逆对数变换,这会影响高级别像素,但不会影响低级别像素。您可以使用此
You can use power law transform to do this as in power law transform you can shift the curve so as to perform log transform or to perform inverse log transform which effects high level pixels but not low level pixels..You may use this