Пример #1
0
        public Dictionary <String, List <Point> > GetNoise(TFilterType FilterType, int N = 1024, int PeriodsCount = 2)
        {
            var tempSets = new Dictionary <String, List <Point> >();

            if (noise == null)
            {
                noise = GetNoisePoints(B_1, B_1 / B_2_COEF, N, PeriodsCount);
            }

            tempSets.Add("Noise", noise);

            switch (FilterType)
            {
            case TFilterType.None:
                break;

            case TFilterType.SlidingAverage:
                tempSets.Add("Sliding Average Filter", Restorer.DoSlidingAverageFilter(noise, Sli_K));
                break;

            case TFilterType.Mediana:
                tempSets.Add("Mediana Filter", Restorer.DoMedianFilter(noise, N, Med_K));
                break;

            case TFilterType.Parabolic:
                tempSets.Add("Parabolic Smoothing", Restorer.DoParabolicSmoothing(noise));
                break;

            default:
                break;
            }

            return(tempSets);
        }
Пример #2
0
        public Dictionary <String, List <Point> > GetAmplSpectre(TFilterType FilterType, int N = 1024, int PeriodsCount = 2)
        {
            var tempSets = new Dictionary <String, List <Point> >();

            if (noise == null)
            {
                noise = GetNoisePoints(B_1, B_1 / B_2_COEF, N, PeriodsCount);
            }

            tempSets.Add("Noise Amplitude Spectre", FurieSpectres.GetAmplSpectre(noise, N));

            switch (FilterType)
            {
            case TFilterType.None:
                break;

            case TFilterType.SlidingAverage:
                var SAfiltered = Restorer.DoSlidingAverageFilter(noise, Sli_K);
                tempSets.Add("Sliding Average Filter Amplitude Spectre", FurieSpectres.GetAmplSpectre(SAfiltered, SAfiltered.Count));
                break;

            case TFilterType.Mediana:
                var Mfiltered = Restorer.DoMedianFilter(noise, N, Med_K);
                tempSets.Add("Mediana Filter Amplitude Spectre", FurieSpectres.GetAmplSpectre(Mfiltered, Mfiltered.Count));
                break;

            case TFilterType.Parabolic:
                var Pfiltered = Restorer.DoParabolicSmoothing(noise);
                tempSets.Add("Parabolic Smoothing Amplitude Spectre", FurieSpectres.GetAmplSpectre(Pfiltered, Pfiltered.Count));
                break;

            default:
                break;
            }

            return(tempSets);
        }