public FilterProcessor() { FilterType = FilterType.None; BPFilter = new BandPassFilter(); HPFilter = new HighPassFilter(); LPFilter = new LowPassFilter(); }
public static LowPassFilter Clone(this LowPassFilter filter) { return(new LowPassFilter() { PassbandAttenuationDB = filter.PassbandAttenuationDB, StopbandAttenuationDB = filter.StopbandAttenuationDB, PassbandFre = filter.PassbandFre, StopbandFre = filter.StopbandFre }); }
public static double[] Filter(this LowPassFilter filter, double[] input, int samplePoint, double sampleFre, double rpm = 0) { if (filter.PassbandFre > sampleFre / 2.56) { throw new Exception(string.Format("通带频率必须小于等于采样频率的1/2.56({0})", sampleFre / 2.56)); } return(Algorithm.Instance.LowPassFilter(input, samplePoint, sampleFre, filter.PassbandFre, filter.StopbandFre, filter.PassbandAttenuationDB, filter.StopbandAttenuationDB)); }