计算逆滤波器 [英] Calculating Inverse Filter

查看:231
本文介绍了计算逆滤波器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人有一个想法如何计算二维滤波器的逆?



假设我有一个3x3滤波器:

0 1 0

1 1 1

0 1 0

我想找到它的逆。
使用DFT很容易。
但是让我们说我想通过卷积来做到这一点。
现在,这就是问题,Matlab的象征性不是我的专长。
假设有一个3X3逆滤波器,这意味着两者的卷积将导致:

0 0 0

0 1 0

0 0 0

问题是创建一个正确的方程组,并解决它。
使用符号做这件事很容易,但我做不到。



有什么想法?
谢谢。




我不确定有一个逆滤波器,因为它的DTFT中有零。此外,有人应该让乳胶在这个论坛的方式MathOverflow有。

解决方案

令h [n]是一维滤波器的有限脉冲响应。这是什么意思关于它的逆滤波器?证明:对于所有的ω,设H(ω)G(ω)= 1,其中H是h [n]的DTFT, G是g [n]的DTFT。如果h [n]是FIR,那么g [n]必须是IIR。

当然,有一些方法可以近似逆IIR用FIR滤波器进行滤波。基本方法是自适应滤波,例如最小均方(LMS)算法。或者只是截断IIR滤波器。不过,您仍然需要担心稳定性。



实际上,您的具体问题可能没有理想的解决方案。特别是,如果这是在图像处理中,并且您尝试使用FIR锐化滤波器来反转FIR模糊滤波器。编辑:让y [n] = b0 x [n-0 ] + b1×[n-1] + ... + bN×[nN]。让这个等式表征正向系统,其中y是输出,x是输入。根据定义,脉冲响应是当输入是脉冲时的输出:h [n] = b0 d [n-0] + b1 d [n-1] + ... + bN d [n-N]。这个脉冲响应具有有限的长度N + 1。

现在,考虑逆系统,其中x是输出,y是输入。然后用递归方程d [n] = b0 h [n] + b1 h [n-1] + ... + bN h [n-N]来描述脉冲响应。等价地,b0 h [n] = d [n] - b1 h [n-1] - ... - bN h [n-N]。

不失一般性,假设b0和bN都是非零的。对于任何m,如果h [m]非零,那么h [m + N]也是非零的。由于这个系统有反馈,它的脉冲响应是无限长的。 QED。



因果关系并不重要。延迟的倒数是前进,反之亦然。延迟或提前都不会改变脉冲响应的有限性。左移或右移无限脉冲响应;它仍然是无限的。

编辑2:为了澄清,这个证明与我的原始证明无关。一个在频域,另一个在时域。

Does anyone has an idea how to calculate the Inverse of a 2-D filter?

Let's say I have a 3x3 filter:
0 1 0
1 1 1
0 1 0
I want to find it's inverse. It's easy to do using DFT. But let's say I want to do it by convolution. Now, that's the problem, Matlab symbolic isn't my specialty. Assuming there's a 3X3 Inverse Filter it means convolution of the two will result in:
0 0 0
0 1 0
0 0 0
The problem is to create the right set of equations for that and solving it. Doing it with symbols is easy to think yet I couldn't do it.

Any ideas? Thanks.

P.S. I'm not sure there an Inverse Filter for this one as it has zeros in its DTFT.

Moreover, someone should allow Latex in this forum the way MathOverflow has.

解决方案

Let h[n] be the finite impulse response of a 1D filter. What does that imply about its inverse filter? The inverse cannot possibly be FIR.

Proof: Let H(omega) G(omega) = 1 for all omega, where H is the DTFT of h[n], and G is the DTFT of g[n]. If h[n] is FIR, then g[n] must be IIR.

Of course, there are ways to approximate the inverse IIR filter with an FIR filter. A basic method is adaptive filtering, e.g., Least Mean Squares (LMS) algorithm. Or just truncate the IIR filter. You still need to worry about stability, though.

For practical purposes, there probably is no desirable solution to your specific question. Especially if, for example, this is in image processing and you are trying to inverse an FIR blur filter with FIR sharpening filter. The final image will not look that good, period, unless your sharpening filter is really, really large.

EDIT: Let y[n] = b0 x[n-0] + b1 x[n-1] + ... + bN x[n-N]. Let this equation characterize the forward system, where y is the output and x is the input. By definition, the impulse response is the output when the input is an impulse: h[n] = b0 d[n-0] + b1 d[n-1] + ... + bN d[n-N]. This impulse response has finite length N+1.

Now, consider the inverse system where x is the output and y is the input. Then the impulse response is described by the recurrence equation d[n] = b0 h[n] + b1 h[n-1] + ... + bN h[n-N]. Equivalently, b0 h[n] = d[n] - b1 h[n-1] - ... - bN h[n-N].

Without loss of generality, assume that b0 and bN are both nonzero. For any m, if h[m] is nonzero, then h[m+N] is also nonzero. Because this system has feedback, its impulse response is infinitely long. QED.

Causality does not matter. The inverse of a delay is an advance, and vice versa. Neither a delay or an advance alter the finiteness of an impulse response. Shift an infinite impulse response left or right; it is still infinite.

EDIT 2: For clarification, this proof is not related to my original "proof". One was in frequency domain, the other in time domain.

这篇关于计算逆滤波器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆