还记得带有所有旋钮的立体声放大器吗? 低音旋钮控制发送到扬声器的低通滤波器信号量,高音旋钮控制来自高通滤波器的信号量。
Bass and Treble controlsBass and Treble controlsBass and Treble controlsBass and Treble controls低音和高音控制
播放凹槽里有灰尘的唱片会给音乐添加很多嘶嘶声、爆裂声和爆裂声。 调低高音可以使体验更好一些。 某种粉尘产生的脉冲噪声含有大量高频成分。杜比噪声抑制对盒式磁带进行一些复杂的过滤以提高信噪比;最终的结果是在录音时调高高音,在播放时调低高音,从而减少磁带的嘶嘶声。
FFT(快速傅里叶变换)将信号从时域(如来自唱片凹槽的数据)转换为频域(如较新的音频设备上的频率舞动条形图)。
Audio Bar Graph from ClementineAudio Bar Graph from ClementineAudio Bar Graph from ClementineAudio Bar Graph from ClementineClementine 的音频条形图
对于图像的 2D FFT,条形图的等效项如下所示:
图片来源:康蒂萨斯·迪米特里奥斯(查看全尺寸彩色图像。)
source imagesource imagesource imagesource image源图像
FFT of sourceFFT of sourceFFT of sourceFFT of source源的 FFT
源的 FFT 图像在中心显示强(亮白色)低频分量,在边缘显示较小(深灰色)高频分量。 FFT 的第二次应用可以将第二图像转换回第一图像。
添加一些噪声,FFT 显示更多高频(远离中心的亮点):
Lots of noise added to sourceLots of noise added to sourceLots of noise added to sourceLots of noise added to source源中添加了大量噪音
FFT of noisy imageFFT of noisy imageFFT of noisy imageFFT of noisy image噪声图像的 FFT
那么,如果所有最外面的高频点都被删除会发生什么呢? 增加的噪音会消失吗? 所有这些图片都是将黑色编码为 0、将白色编码为 1、将其间编码为灰色的数据,因此我们可以像这样使用掩码,并将 FFT 数据与掩码按元素相乘,然后反转 FFT 得到低通图像:
Brick wall filter lets no high frequency throughBrick wall filter lets no high frequency throughBrick wall filter lets no high frequency throughBrick wall filter lets no high frequency through砖墙滤波器不允许高频通过
Brick wall result, notice white stripe down pant legBrick wall result, notice white stripe down pant legBrick wall result, notice white stripe down pant legBrick wall result, notice white stripe down pant leg砖墙结果,注意裤腿上有白色条纹
这确实消除了微小的随机点,但现在有一个振铃伪像每当出现明暗边缘时;注意裤腿上的白色条纹和最近的建筑物壁架上的黑色条纹。
也许有更好的过滤器。 我父亲对滤波器很着迷,滤波器是用电容器、电感器和电阻器构建的,也许还使用了运算放大器。 我记得他谈到巴特沃斯和切比雪夫滤波器并试图解释通带的平坦度以及不同的频率如何在滤波器中延迟不同的量。 这些名字听起来仍然像我十二岁时一样酷。 我找到了这个保罗·伯克文章,这就是这篇博文的开头,并且这套课堂笔记作者:Dave Marshall,描述如何使用 2D 巴特沃斯滤波器。 它看起来好多了:
The Butterworth filter fades awayThe Butterworth filter fades awayThe Butterworth filter fades awayThe Butterworth filter fades away巴特沃斯滤波器消失
And the reconstituted image has less ringingAnd the reconstituted image has less ringingAnd the reconstituted image has less ringingAnd the reconstituted image has less ringing重建后的图像振铃较少
附加的 JSL 使该 GUI 带有滑块。
Sliders to experiment with filtersSliders to experiment with filtersSliders to experiment with filtersSliders to experiment with filters用于试验过滤器的滑块
很酷。 我迫不及待地想在其他照片上尝试这个。 感谢您提供示例脚本。