public UOPPanel(Bitmap image, Image_Panel caller)
        {
            InitializeComponent();

            this.caller = caller;

            originalImage = image;

            BasicImageOpertions = new BasicImageOpertions(originalImage);

            BasicImageOpertions.ToGreyScale();

            secondaryImage = (Bitmap)originalImage.Clone();

            this.pctbImage.Image = secondaryImage;

            hist = new ImageHistogram((Bitmap)pctbImage.Image);

            hist.CreateChart(this.chHisto);

            this.pctbUOP.Image = new Bitmap(256, 256);

            grafika = Graphics.FromImage(pctbUOP.Image);

            LUT   = new int[256];
            linia = new Krzywa();
            RysujLinie();
        }
        public ImageHistogram(Bitmap Source, Form caller)
        {
            this.Source = Source;
            this.bitmap = (Bitmap)Source.Clone();

            this.caller = (Image_Panel)caller;
        }
示例#3
0
        public TwoSharpeningMasks(Bitmap inputImage, Image_Panel caller)
        {
            InitializeComponent();

            this.orignal = inputImage;
            this.output  = (Bitmap)inputImage.Clone();
            this.caller  = (Image_Panel)caller;

            this.pctbInput.Image  = (Bitmap)orignal.Clone();
            this.pctbOutput.Image = output;

            Matrices = new List <NumericUpDown>()
            {
                nud1_1, nud2_1, nud3_1,
                nud4_1, nud5_1, nud6_1,
                nud7_1, nud8_1, nud9_1,

                nud1_2, nud2_2, nud3_2,
                nud4_2, nud5_2, nud6_2,
                nud7_2, nud8_2, nud9_2
            };

            fiveByFive = new NumericUpDown[5, 5] {
                { nud1_3, nud2_3, nud3_3, nud4_3, nud5_3 },
                { nud6_3, nud7_3, nud8_3, nud9_3, nud10_3 },
                { nud11_3, nud12_3, nud13_3, nud14_3, nud15_3 },
                { nud16_3, nud17_3, nud18_3, nud19_3, nud20_3 },
                { nud21_3, nud22_3, nud23_3, nud24_3, nud25_3 },
            };
        }
        public LogicalFiltrationForm(Bitmap inputImage, Form caller)
        {
            InitializeComponent();

            this.orignalImage = (Bitmap)inputImage.Clone();
            this.output       = (Bitmap)inputImage.Clone();

            this.caller = (Image_Panel)caller;

            this.pctbInput.Image  = orignalImage;
            this.pctbOutput.Image = orignalImage;
        }
        private void imageToolStripMenuItem_Click(object sender, EventArgs e)
        {
            bmp      = FileM.OpenFile();
            fileName = FileM.fileName;

            if (bmp != null)
            {
                Image_Panel Image_panel = new Image_Panel(bmp, fileName);
                Image_panel.MdiParent = this;
                //Image_panel.SetImage(bmp);
                Image_panel.Show();
            }
        }
示例#6
0
        public MedianBlurPanel(Bitmap inputImage, Form caller)
        {
            InitializeComponent();

            this.orignal = inputImage;
            this.output  = (Bitmap)inputImage.Clone();
            this.caller  = (Image_Panel)caller;

            this.pctbInput.Image  = (Bitmap)orignal.Clone();
            this.pctbOutput.Image = output;

            outlierMethod     = 1;
            chbIgnore.Checked = true;

            PerformBlur();
        }
        public KernelOpperationsForm(Bitmap inputImage, Form caller)
        {
            InitializeComponent();

            this.orignal = inputImage;
            this.output  = (Bitmap)inputImage.Clone();
            this.caller  = (Image_Panel)caller;

            this.pctbInput.Image  = (Bitmap)orignal.Clone();
            this.pctbOutput.Image = output;

            type = 1;
            this.chbProportional.Checked = true;


            outlierMethod          = 1;
            this.chbIgnore.Checked = true;
        }
        public TwoArgsPanel(Form[] forms)
        {
            InitializeComponent();

            this.forms = forms;

            foreach (Form form in forms)
            {
                Image_Panel imageForm = (Image_Panel)form;
                if (!bitmaps.ContainsKey(imageForm.imageName))
                {
                    bitmaps.Add(imageForm.imageName, imageForm.originalImage);
                    cmbFirstImage.Items.Add(imageForm.imageName);
                    cmbSecondImage.Items.Add(imageForm.imageName);
                }
            }
            cmbFirstImage.Sorted  = true;
            cmbSecondImage.Sorted = true;
        }
        public BeforeAfterPanel(Bitmap bitmap, Operacje operacja, Image_Panel caller)
        {
            InitializeComponent();

            this.Origbitmap = bitmap;
            newBitmap       = (Bitmap)bitmap.Clone();

            basicImage = new BasicImageOpertions(this.newBitmap);
            basicImage.ImageFinished += OnImageFinished;

            this.pctbInput.Image = Origbitmap;
            this.operacja        = operacja;

            this.caller = caller;

            switch (operacja)
            {
            case Operacje.Progowanie:
                tbArgument.Minimum = 0;
                tbArgument.Maximum = 255;
                tbArgument.Value   = 127;
                this.Text          = "Progowanie";
                basicImage.Threshold(tbArgument.Value);
                break;

            case Operacje.ProgowanieZZachowaniem:
                tbArgument.Minimum = 0;
                tbArgument.Maximum = 255;
                tbArgument.Value   = 127;
                this.Text          = "Progowanie";
                basicImage.ThresholdWithRetention(tbArgument.Value);
                break;

            case Operacje.Rozciaganie:
                this.tbSecondArgument.Enabled = true;
                this.tbSecondArgument.Visible = true;
                this.lbValue2.Visible         = true;

                tbArgument.Minimum = 0;
                tbArgument.Maximum = 255;
                tbArgument.Value   = 127;

                tbSecondArgument.Minimum = 0;
                tbSecondArgument.Maximum = 255;
                tbSecondArgument.Value   = 127;

                this.Text = "Rozciaganie";
                basicImage.Stretching(tbArgument.Value, tbSecondArgument.Value);
                break;

            case Operacje.Jasnosc:
                tbArgument.Minimum = -255;
                tbArgument.Maximum = 255;
                tbArgument.Value   = 0;
                this.Text          = "Jasność";
                basicImage.Brightness(tbArgument.Value);
                break;

            case Operacje.Redukcja:
                tbArgument.Minimum = 2;
                tbArgument.Maximum = 255;
                tbArgument.Value   = 127;
                this.Text          = "Redukcja";
                basicImage.Reduction(tbArgument.Value);
                break;
            }

            this.lbValue.Text  = tbArgument.Value.ToString();
            this.lbValue2.Text = tbSecondArgument.Value.ToString();
        }