示例#1
0
 public FilterProcessor()
 {
     FilterType = FilterType.None;
     BPFilter   = new BandPassFilter();
     HPFilter   = new HighPassFilter();
     LPFilter   = new LowPassFilter();
 }
示例#2
0
 public static LowPassFilter Clone(this LowPassFilter filter)
 {
     return(new LowPassFilter()
     {
         PassbandAttenuationDB = filter.PassbandAttenuationDB,
         StopbandAttenuationDB = filter.StopbandAttenuationDB,
         PassbandFre = filter.PassbandFre,
         StopbandFre = filter.StopbandFre
     });
 }
示例#3
0
 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));
 }