示例#1
0
 public MainWindow(RsImage p)
 {
     InitializeComponent();
     this._image = p;
     this.textOpenLoc.Text = p.GetFilePath();
     SetRadioVisibility(p.Interleave);
 }
示例#2
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();
        }
示例#3
0
文件: Lap.cs 项目: XXZZQQ/RSDIP-A
        /// <summary>
        /// 均值滤波
        /// </summary>
        /// <param name="r"></param>
        public Lap(RsImage r)
        {
            this._img = r;
            this.Lapla = new byte[r.BandsCount, r.Lines, r.Samples];

            CalcMean();
            FillData();
        }
示例#4
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();
        }
示例#5
0
文件: Mean.cs 项目: XXZZQQ/RSDIP-A
        /// <summary>
        /// 均值滤波
        /// </summary>
        /// <param name="r"></param>
        public Mean(RsImage r)
        {
            this._img = r;
            this.MeanFilter = new byte[r.BandsCount, r.Lines, r.Samples];

            CalcMean();
            FillData();
        }
示例#6
0
        public CalcOIF(RsImage img)
        {
            _imgBands = img.BandsCount;
            _stats    = new ImageStats(img);
            ResultOIF = new List <string[]>();

            CalcOif();
        }
示例#7
0
文件: CalcOIF.cs 项目: XXZZQQ/XZQ
        public CalcOIF(RsImage img)
        {
            _imgBands = img.BandsCount;
            _stats = new ImageStats(img);
            ResultOIF=new List<string[]>();

            CalcOif();
        }
示例#8
0
        /// <summary>
        /// 均值滤波
        /// </summary>
        /// <param name="r"></param>
        public Mean(RsImage r)
        {
            this._img       = r;
            this.MeanFilter = new byte[r.BandsCount, r.Lines, r.Samples];

            CalcMean();
            FillData();
        }
示例#9
0
文件: Lap.cs 项目: sishui198/RSDIP-A
        /// <summary>
        /// 均值滤波
        /// </summary>
        /// <param name="r"></param>
        public Lap(RsImage r)
        {
            this._img  = r;
            this.Lapla = new byte[r.BandsCount, r.Lines, r.Samples];

            CalcMean();
            FillData();
        }
示例#10
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();
        }
示例#11
0
        public ImageStats(RsImage p)
        {
            _bands = p.BandsCount;
            _lines = p.Lines;
            _samples = p.Samples;
            _picData = p.GetPicData();

            CalcStats();
        }
示例#12
0
        public ImageStats(RsImage p)
        {
            _bands   = p.BandsCount;
            _lines   = p.Lines;
            _samples = p.Samples;
            _picData = p.GetPicData();

            CalcStats();
        }
示例#13
0
        /// <summary>
        /// 显示图像-RGB
        /// </summary>
        /// <param name="ig">图像</param>
        public HSI(RsImage ig)
        {
            InitializeComponent();

            InitMousePan();
            InitComboBox(ig.BandsCount);

            this._img = ig.GetPicData();
        }
示例#14
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();
        }
示例#15
0
        /// <summary>
        /// Sobel
        /// </summary>
        /// <param name="r"></param>
        public Sobel(RsImage r)
        {
            this._img      = r;
            this.SobelData = new byte[r.BandsCount, r.Lines, r.Samples];

            CalcX();
            CalcY();

            FillData();
        }
示例#16
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();
        }
示例#17
0
文件: Sobel.cs 项目: XXZZQQ/RSDIP-A
        /// <summary>
        /// Sobel
        /// </summary>
        /// <param name="r"></param>
        public Sobel(RsImage r)
        {
            this._img = r;
            this.SobelData = new byte[r.BandsCount, r.Lines, r.Samples];

            CalcX();
            CalcY();

            FillData();
        }
示例#18
0
        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();
        }
示例#19
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();
        }
示例#20
0
 public Histogram(RsImage p,byte type)
 {
     InitializeComponent();
     _image = p;
     _type = type;
     var bandName = new string[p.BandsCount];
     for (int i = 0; i < p.BandsCount; i++)
     {
         bandName[i] = "Band " + (i + 1);
     }
     bandList.DataSource = bandName;
 }
示例#21
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;
        }
示例#22
0
        /// <summary>
        /// 高斯低通
        /// </summary>
        /// <param name="r">图像</param>
        /// <param name="x">卷积行</param>
        /// <param name="y">卷积列</param>
        /// <param name="o">方差</param>
        public GaussLow(RsImage r, int x, int y, int o)
        {
            this._img = r;
            CheckSize(x, y, o);

            this._o = o;
            this._x = x;
            this._y = y;

            MakeKernel();

            GaussLowData = new byte[r.BandsCount, r.Lines, r.Samples];

            Calc();
            FillData();
        }
示例#23
0
        /// <summary>
        /// 高斯低通
        /// </summary>
        /// <param name="r">图像</param>
        /// <param name="x">卷积行</param>
        /// <param name="y">卷积列</param>
        /// <param name="o">方差</param>
        public GaussLow(RsImage r, int x,int y,int o)
        {
            this._img = r;
            CheckSize(x, y, o);

            this._o = o;
            this._x = x;
            this._y = y;
            
            MakeKernel();

            GaussLowData = new byte[r.BandsCount, r.Lines, r.Samples];

            Calc();
            FillData();
        }
示例#24
0
文件: MergeBSQPic.cs 项目: XXZZQQ/XZQ
        private void OpenFiles()
        {
            _numOfFiles  = _fileNames.GetLength(0);
            _mergeImages = new RsImage[_numOfFiles];

            for (int i = 0; i < _numOfFiles; i++)
            {
                _mergeImages[i] = new RsImage(_fileNames[i]);
                if (_mergeImages[i].Lines != _mergeImages[0].Lines |
                    _mergeImages[i].Samples != _mergeImages[0].Samples |
                    _mergeImages[i].Interleave != "bsq")
                {
                    _mergeImages = null;
                    return;
                }
                if (_mergeImages[i].GetPicData() == null)
                {
                    _mergeImages = null;
                    return;
                }
            }
        }
示例#25
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();
 }
示例#26
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();
 }
示例#27
0
        private void HistoMatch(RsImage a, RsImage b)
        {
            var w = new RS_Diag.HistoMatch(a, b);
            if (w.ShowDialog() != System.Windows.Forms.DialogResult.OK) return;

            var data = w.MatchedData;
            byte[,,] res = new byte[1, data.GetLength(0), data.GetLength(1)];

            for (int i = 0; i < data.GetLength(0); i++)
            {
                for (int j = 0; j < data.GetLength(1); j++)
                {
                    res[0, i, j] = data[i, j];
                }
            }

            AddNewPic(res, a.FileName + "-直方图规定化结果", false);
        }
示例#28
0
        /// <summary>
        /// 直方图规定化
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ButtonUniHistogram_Click(object sender, RoutedEventArgs e)
        {
            if (!CheckImage()) return;

            var cho = _image[_fChoose.ChoosedFile];

            OpenFileDialog ofd = new OpenFileDialog
            {
                Title = "选择目标直方图",
                Filter = "ENVI遥感数据头文件(*.HDR)|*.HDR;*.hdr"
            };
            if (ofd.ShowDialog() != true) return;
            
            try
            {
                RS_Lib.RsImage img = new RsImage(ofd.FileName);
                HistoMatch(cho, img);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "TonyZ", MessageBoxButton.OK, MessageBoxImage.Error);
                return;
            }
        }
示例#29
0
        private void OpenFiles()
        {
            _numOfFiles = _fileNames.GetLength(0);
            _mergeImages = new RsImage[_numOfFiles];

            for (int i = 0; i < _numOfFiles; i++)
            {
                _mergeImages[i] = new RsImage(_fileNames[i]);
                if (_mergeImages[i].Lines != _mergeImages[0].Lines |
                    _mergeImages[i].Samples != _mergeImages[0].Samples |
                    _mergeImages[i].Interleave != "bsq")
                {
                    _mergeImages = null;
                    return;
                }
                if (_mergeImages[i].GetPicData() == null)
                {
                    _mergeImages = null;
                    return;
                }
            }
        }