예제 #1
0
파일: Lap.cs 프로젝트: sishui198/RSDIP-A
        private void FillData()
        {
            var ori = _img.GetPicData();

            for (int b = 0; b < _img.BandsCount; b++)
            {
                var data = _data[b].ConvedData;
                for (int i = 0; i < _img.Lines; i++)
                {
                    for (int j = 0; j < _img.Samples; j++)
                    {
                        Lapla[b, i, j] = (byte)(data[i, j] + ori[b, i, j]);
                    }
                }
            }
        }
예제 #2
0
        private void CalcX()
        {
            // 卷积核书P169
            double[,] kernel =
            {
                { -1, 0, 1 },
                { -2, 0, 2 },
                { -1, 0, 1 }
            };

            _dataX = new Conv[_img.BandsCount];
            for (int i = 0; i < _img.BandsCount; i++)
            {
                _dataX[i] = new Conv(_img.GetPicData(i + 1), kernel);
            }
        }
예제 #3
0
 private void Calc()
 {
     _data = new Conv[_img.BandsCount];
     for (int i = 0; i < _img.BandsCount; i++)
     {
         _data[i] = new Conv(_img.GetPicData(i + 1), this._kernel);
     }
 }
예제 #4
0
        /// <summary>
        /// 梯度倒数加权-3*3
        /// </summary>
        public Grad(RsImage r)
        {
            this._img     = r;
            this._oriData = r.GetPicData();

            GradData = new byte[r.BandsCount, r.Lines, r.Samples];
            ScanHoleImg();
        }
예제 #5
0
파일: Grad.cs 프로젝트: XXZZQQ/RSDIP-A
        /// <summary>
        /// 梯度倒数加权-3*3
        /// </summary>
        public Grad(RsImage r)
        {
            this._img = r;
            this._oriData = r.GetPicData();

            GradData = new byte[r.BandsCount, r.Lines, r.Samples];
            ScanHoleImg();
        }
예제 #6
0
파일: HSI.xaml.cs 프로젝트: XXZZQQ/RSDIP-A
        /// <summary>
        /// 显示图像-RGB
        /// </summary>
        /// <param name="ig">图像</param>
        public HSI(RsImage ig)
        {
            InitializeComponent();

            InitMousePan();
            InitComboBox(ig.BandsCount);

            this._img = ig.GetPicData();
        }
예제 #7
0
        public ImageStats(RsImage p)
        {
            _bands   = p.BandsCount;
            _lines   = p.Lines;
            _samples = p.Samples;
            _picData = p.GetPicData();

            CalcStats();
        }
예제 #8
0
파일: KT.xaml.cs 프로젝트: XXZZQQ/RSDIP-A
        /// <summary>
        /// 显示图像-RGB
        /// </summary>
        /// <param name="ig">图像</param>
        public KT(RsImage ig)
        {
            InitializeComponent();

            InitMousePan();
            InitCombo1();

            this._img = ig.GetPicData();
        }
예제 #9
0
        public ImageStats(RsImage p)
        {
            _bands = p.BandsCount;
            _lines = p.Lines;
            _samples = p.Samples;
            _picData = p.GetPicData();

            CalcStats();
        }
예제 #10
0
파일: Median.cs 프로젝트: XXZZQQ/RSDIP-A
        /// <summary>
        /// 中值滤波
        /// </summary>
        /// <param name="r">图像</param>
        /// <param name="x">行大小</param>
        /// <param name="y">列大小</param>
        public Median(RsImage r, int x, int y)
        {
            this._img = r.GetPicData();
            this._sizeX = x;
            this._sizeY = y;
            this.MedianData = new byte[r.BandsCount, r.Lines, r.Samples];

            CheckSize(x, y);
            CalcMedian();
        }
예제 #11
0
        /// <summary>
        /// 中值滤波
        /// </summary>
        /// <param name="r">图像</param>
        /// <param name="x">行大小</param>
        /// <param name="y">列大小</param>
        public Median(RsImage r, int x, int y)
        {
            this._img       = r.GetPicData();
            this._sizeX     = x;
            this._sizeY     = y;
            this.MedianData = new byte[r.BandsCount, r.Lines, r.Samples];

            CheckSize(x, y);
            CalcMedian();
        }
예제 #12
0
파일: Robert.cs 프로젝트: sishui198/RSDIP-A
        public Robert(RsImage img)
        {
            this._img       = img;
            this._oriData   = img.GetPicData();
            this.RobertData = new byte[img.BandsCount, img.Lines, img.Samples];
            this._robA      = new double[img.BandsCount, img.Lines, img.Samples];
            this._robB      = new double[img.BandsCount, img.Lines, img.Samples];

            ConvForEven();
            FillData();
        }
예제 #13
0
파일: Robert.cs 프로젝트: XXZZQQ/RSDIP-A
        public Robert(RsImage img)
        {
            this._img = img;
            this._oriData = img.GetPicData();
            this.RobertData = new byte[img.BandsCount, img.Lines, img.Samples];
            this._robA = new double[img.BandsCount, img.Lines, img.Samples];
            this._robB = new double[img.BandsCount, img.Lines, img.Samples];

            ConvForEven();
            FillData();
        }
예제 #14
0
        /// <summary>
        /// 极差纹理
        /// </summary>
        /// <param name="ig">图像</param>
        public RangeFilt(RsImage ig)
        {
            InitializeComponent();

            this._img = ig.GetPicData();
            this._final = new byte[_img.GetLength(0)][,];
            for (int i = 0; i < this._img.GetLength(0); i++)
            {
                _final[i] = new RS_Lib.RangeFilt(_img, i).JCWL;
            }

            InitMousePan();
            InitCombo1();
            LayerChoice.SelectedIndex = 0;
        }
예제 #15
0
        private void CalcMean()
        {
            // 卷积核书P160
            double[,] kernel =
            {
                { 0.125, 0.125, 0.125 },
                { 0.125,     0, 0.125 },
                { 0.125, 0.125, 0.125 }
            };

            _data = new Conv[_img.BandsCount];
            for (int i = 0; i < _img.BandsCount; i++)
            {
                _data[i] = new Conv(_img.GetPicData(i + 1), kernel);
            }
        }
예제 #16
0
 /// <summary>
 /// 构造图像转换器函数
 /// </summary>
 /// <param name="d">图像数据</param>
 /// <param name="t">转换格式(1-bsq,2-bip,3-bil</param>
 public PicConvert(RsImage d, int t)
 {
     this._data = d.GetPicData();
     this._convType = t;
     this.Convert();
 }
예제 #17
0
 /// <summary>
 /// 构造图像转换器函数
 /// </summary>
 /// <param name="d">图像数据</param>
 /// <param name="t">转换格式(1-bsq,2-bip,3-bil</param>
 public PicConvert(RsImage d, int t)
 {
     this._data     = d.GetPicData();
     this._convType = t;
     this.Convert();
 }