我发现第一张图像之前做了滤波处理,傅里叶逆变换回来,就有亮线了。
- * 使用带通滤波器过滤低频(灰度平坦区域)
- * 生成带通滤波器
- Sigma1 := 6.0
- Sigma2 := 1.0
- gen_gauss_filter (Gauss1, Sigma1, Sigma1, 0.0, 'none', 'dc_center', Width, Height)
- gen_gauss_filter (Gauss2, Sigma2, Sigma2, 0.0, 'none', 'dc_center', Width, Height)
- sub_image (Gauss1, Gauss2, Filter, 1, 0)
- * 频谱通过带通滤波器滤波,逆变换回到时域
- fft_generic (ImageFiltered1, ImageFFT2, 'to_freq', -1, 'none', 'dc_center', 'complex')
- convol_fft (ImageFFT2, Filter, ImageConvol2)
- fft_generic (ImageConvol2, FFTImage, 'from_freq', 1, 'n', 'dc_center', 'real')
复制代码
这个滤波器使用有什么问题吗 |