Пример #1
0
        private void bttnHistoEq_Click(object sender, EventArgs e)
        {
            Histogram3 hist = new Histogram3(red, green, blue, Path.GetFileName(imgDat.FileName));

            red   = hist.HistogramEqualization(red);
            green = hist.HistogramEqualization(green);
            blue  = hist.HistogramEqualization(blue);
            imw.DrawImageRGB(imgDat, red, green, blue);
        }
Пример #2
0
        private void bttnShowHisto_Click(object sender, EventArgs e) // activates histogram drawing from files in giwer format
        {
            Histogram3 hist = new Histogram3(red, green, blue, Path.GetFileName(imgDat.FileName));

            if (hist.ShowDialog() == DialogResult.OK)
            {
                red   = hist.HistogramEqualization(red, hist.RIntMin, hist.RIntMax);
                green = hist.HistogramEqualization(green, hist.GIntMin, hist.GIntMax);
                blue  = hist.HistogramEqualization(blue, hist.BIntMin, hist.BIntMax);
                imw.DrawImageRGB(imgDat, red, green, blue);
            }
        }
Пример #3
0
        private void bttnHisto_Click(object sender, EventArgs e)
        {
            Bitmap        bmp  = new Bitmap(imgDat.Ncols, imgDat.Nrows);
            Histogram3    hist = new Histogram3(currentBand, System.IO.Path.GetFileName(imgDat.FileName));
            GeoImageTools gmt  = new GeoImageTools();

            if (hist.ShowDialog() == DialogResult.OK)
            {
                GeoMultiBandMethods gm = new GeoMultiBandMethods();
                currentBand = hist.HistogramEqualization(currentBand, hist.IntMin, hist.IntMax);
                if (imgDat.FileType == GeoImageData.fTypes.GWH)
                {
                    iw.DrawImage(imgDat, currentBand, colPalette);
                    //iw.InitImage(gmt.convertOneBandBytesto8bitBitmap(currentBand, imgDat.Ncols, imgDat.Nrows, colPalette));
                    //Bitmap bm = gm.createRGB_gwr(imgDat, currentBand, currentBand, currentBand);
                    //iw.loadImage(bm);
                }
                if (imgDat.FileType == GeoImageData.fTypes.BIL)
                {
                    Bitmap bm = gm.createRGB_gwr(imgDat, currentBand, currentBand, currentBand);
                    //iw.loadImage(bm);
                }
            }
        }