我如何在低通过滤中加速反向ffft?

发布于 2025-01-25 12:16:55 字数 377 浏览 1 评论 0原文

我已经使用二维FFT进行了一个低通滤波器进行图像分析。 它只是由3个步骤组成, (1)原始图像的FFT, (2)将高频组件(>截止频率)替换为傅立叶平面上的零,并且 (3)逆FFT以重建过滤的图像。 它正常工作。但是,现在我需要加快过滤器的大型图像。

我想知道是否可以利用傅立叶平面上的非零组件数量有限来加快过滤器。 例如,当截止频率是傅立叶平面大小的1/10时,我仅在2D傅立叶平面的1%中才有非零区域。 如果我们将99%区域的其余部分截断,并将逆FFT应用于1%的区域,则可以获得使用10次 - 隔离采样的低通滤波图像。 此逆FFT速度要快得多,但是我想拥有一个与原始图像相同的采样点的过滤图像。

现在,我的问题是是否有一种使用样品采样恢复过滤图像的方法。 如果我误解了一些事情,我很乐意指出它。谢谢。

I have made a low-pass-filter for image analysis using 2-dimensional FFT.
It simply consists of 3 steps,
(1) FFT of an original image,
(2) replace high-frequency components (> cut-off frequency) by zero on the Fourier plane, and
(3) inverse-FFT to reconstruct a filtered image.
It works correctly. However, now I need to speed-up the filter for large-size images.

I am wondering if it is possible to speed up the filter by taking advantage of the limited number of nonzero components on the Fourier plane.
For example, when the cut-off frequency is 1/10 of the size of the Fourier plane, I have non-zero region only in 1% of the 2D Fourier plane.
If we truncate the rest of 99% region and apply the inverse FFT to the 1% region, we can obtain a low-pass-filtered image with a 10-times-sparse sampling.
This inverse-FFT is much faster, but I want to have a filtered image with the same sampling points as the original image.

Now, my question is whether there is a method to recover the filtered-image with the sample sampling.
If I misunderstand something, I would be happy to have it pointed out. Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

凉城 2025-02-01 12:16:55

sinc interpolation> sinc interpolation 来自您描述的子采样图像。问题在于,在空间域中实现SINC插值非常昂贵,最好是在频域中实现,因此这无助于加快过滤。正如伊夫(Yves)所建议的,一个更好的想法是使用更有效的插值(例如双子)来获得大致相同的结果。

但是,如果可以的话,我建议首先避免使用FFT。 NXN 2D FFT的成本O(n²log n)。您可以通过在空间域中应用IIR(递归)过滤器来快速O(N²)低通滤波。参见例如对于高斯过滤的几个简单的快速近似。

Sinc interpolation (aka Whittaker–Shannon interpolation) would exactly recover the filtered image from the subsampled image that you describe. The problem is that implementing sinc interpolation in the spatial domain is expensive, and is preferably instead implemented in back the frequency domain, so this doesn't help speed up the filtering. As Yves suggested, a better idea is to use a more efficient interpolation like bicubic for approximately the same results.

But if approximate is Ok, I suggest to avoid the FFT in the first place. An NxN 2D FFT costs O(N² log N). You can get fast O(N²) lowpass filtering by applying IIR (recursive) filters in the spatial domain. See for instance the "Box" and "Alvarez–Mazorra" methods in A Survey of Gaussian Convolution Algorithms for a couple simple fast approximations of Gaussian filtering.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文