Exemplo n.º 1
0
        private void ProcessSmooth(int h, int l, int o, int m)
        {
            var cho = _image[_fChoose.ChoosedFile];

            byte[,,] res = null;
            string type = "";

            switch (m)
            {
            case 0:
                res  = new RS_Lib.Mean(cho).MeanFilter;
                type = "-均值滤波";
                break;

            case 1:
                res  = new RS_Lib.Median(cho, h, l).MedianData;
                type = "-中位数滤波";
                break;

            case 2:
                res  = new RS_Lib.GaussLow(cho, h, l, o).GaussLowData;
                type = "-高斯低通滤波";
                break;

            case 3:
                res  = new RS_Lib.Grad(cho).GradData;
                type = "-梯度倒数加权滤波";
                break;
            }

            AddNewPic(res, cho.FileName + type, false);
        }
Exemplo n.º 2
0
 private void Form1_Load(object sender, EventArgs e)
 {
     RS_Lib.GaussLow r = new GaussLow(null, 5, 5, 1);
 }
Exemplo n.º 3
0
        private void ProcessSmooth(int h, int l, int o, int m)
        {
            var cho = _image[_fChoose.ChoosedFile];

            byte[,,] res = null;
            string type = "";
            switch (m)
            {
                case 0:
                    res = new RS_Lib.Mean(cho).MeanFilter;
                    type = "-均值滤波";
                    break;

                case 1:
                    res = new RS_Lib.Median(cho, h, l).MedianData;
                    type = "-中位数滤波";
                    break;

                case 2:
                    res = new RS_Lib.GaussLow(cho, h, l, o).GaussLowData;
                    type = "-高斯低通滤波";
                    break;

                case 3:
                    res = new RS_Lib.Grad(cho).GradData;
                    type = "-梯度倒数加权滤波";
                    break;
            }
            
            AddNewPic(res, cho.FileName + type, false);
        }