OpenCV C++实现频域 巴特沃斯低通滤波

88 篇文章 84 订阅 ¥69.90 ¥99.00

巴特沃思低通滤波器


n级巴特沃思低通滤波器(BLPF)定义如下:

D0为截至频率距原点的距离,D(u,v)是点(u,v)距 原点的距离

不同于ILPF,BLPF变换函数在通带与被滤除的频率 之间没有明显的截断

当D(u,v)=D0时,H(u,v)=0.5(最大值是1,当 D(u,v)=0)

应用:可用于平滑处理,如图像由于量化不足产生虚假轮 廓时,常可用低通滤波进行平滑以改进图像质量。通常, BLPF的平滑效果好于ILPF(振铃现象)

代码:

butterWorthLowPaassFilter.hpp

#pragma once
#include "opencv2/core/core.hpp"
#include "opencv2/imgproc/imgproc.hpp"
using namespace std;
using namespace cv;

//*****************制作巴特沃斯
  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
ButterWorth巴特沃斯滤波64B位 C++库,支持高通、低通、带通、带阻滤波。需要32位库请私信。 提供C#调用方法: public static class ButterFilter { [DllImport("V_Filter.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] public extern static void DeleteFilter(IntPtr filter); [DllImport("V_Filter.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] public extern static double FilterProcess(IntPtr filter, double data); [DllImport("V_Filter.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] public extern static IntPtr CreateHighPass(double sampleRate, double order, double cutoffFrequency); [DllImport("V_Filter.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] public extern static IntPtr CreateLowPass(double sampleRate, double order, double cutoffFrequency); [DllImport("V_Filter.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] public extern static IntPtr CreateBandPass(double sampleRate, double order, double centerFrequency, double bandWidth); [DllImport("V_Filter.dll", CharSet = CharSet.Ansi, CallingConvention = CallingConvention.Cdecl)] public extern static IntPtr CreateBandStop(double sampleRate, double order, double centerFrequency, double bandWidth); } 初始化滤波器: lowpassFilter= ButterFilter.CreateLowPass(sampleRate, order, endFreq); highpassFilter= ButterFilter.CreateHighPass(sampleRate, order, endFreq); bandstopFilter= ButterFilter.CreateBandStop(sampleRate, order,beginFreq, endFreq - beginFreq); bandPassFilter= ButterFilter.CreateBandPass(sampleRate, order,beginFreq, endFreq - beginFreq); 数据滤波: value = ButterFilter.FilterProcess(highpassFilter, value);

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

thequitesunshine007

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值