Exemple #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            bool success = false;

            switch (SeparationOption_Combo.SelectedIndex)
            {
            case 0:
                success = ImageControl.ToYCbCr(ref GObjects);
                break;

            case 1:
                success = ImageControl.ToHSV(ref GObjects);
                break;

            case 2:
                ColorSpace cs = new ColorSpace(new doublePoint((double)RedX_numeric.Value, (double)RedY_numeric.Value), new doublePoint((double)GreenX_numeric.Value, (double)GreenY_numeric.Value), new doublePoint((double)BlueX_numeric.Value, (double)BlueY_numeric.Value), (double)Gamma_numeric.Value, "");
                success = ImageControl.ToLAB(ref GObjects, cs, new doublePoint((double)WhiteX_numeric.Value, (double)WhiteY_numeric.Value));
                break;
            }
            if (success)
            {
                Ch1_PictureBox.Image = GObjects.Chanel1.Bitmap;
                Ch2_PictureBox.Image = GObjects.Chanel2.Bitmap;
                Ch3_PictureBox.Image = GObjects.Chanel3.Bitmap;
                Ch1_PictureBox.Refresh();
                Ch2_PictureBox.Refresh();
                Ch3_PictureBox.Refresh();
            }
        }
Exemple #2
0
 private void Add_Pic_button_Click(object sender, EventArgs e)
 {
     if (ImageControl.AddImage(ref GObjects, Ch1_PictureBox.Width, Ch1_PictureBox.Height, Main_PictureBox.Width, Main_PictureBox.Height))
     {
         Ch1_PictureBox.Image  = Ch2_PictureBox.Image = Ch3_PictureBox.Image = null;
         Main_PictureBox.Image = GObjects.MainPictureOnView.Bitmap;
     }
 }
Exemple #3
0
 public Form1()
 {
     GObjects = new GlobalObjects();
     InitializeComponent();
     GObjects.finished = true;
     SeparationOption_Combo.SelectedIndex = 0;
     Illuminant_Combo.Items.AddRange(GObjects.IlluminnatsNames);
     ColorSpace_Combo.Items.AddRange(GObjects.ColorSpaceNames);
     ColorSpace_Combo.SelectedIndex = 0;
     GObjects.sRGB2XYZs             = ImageControl.TransformationMatrix(GObjects.ColorSpaceValues[0], GObjects.IlluminantsValues[5]);
     GObjects.XYZ2sRGB = MatrixCalculations.MatrixInverse(GObjects.sRGB2XYZs);
     //spytac o LAB
 }
Exemple #4
0
        private void Download_Pic_button_Click(object sender, EventArgs e)
        {
            Button button = (Button)sender;

            switch (button.Name)
            {
            case "Download_ch1Pic_button":
                ImageControl.SaveImage(Ch1_PictureBox.Image);
                break;

            case "Download_ch2Pic_button":
                ImageControl.SaveImage(Ch2_PictureBox.Image);
                break;

            case "Download_ch3Pic_button":
                ImageControl.SaveImage(Ch2_PictureBox.Image);
                break;

            default:
                ImageControl.SaveImage(Main_PictureBox.Image);
                break;
            }
        }
Exemple #5
0
 private void button4_Click(object sender, EventArgs e)
 {
     ImageControl.CreateBase(ref GObjects, Ch1_PictureBox.Width, Ch1_PictureBox.Height, Main_PictureBox.Width, Main_PictureBox.Height);
     Main_PictureBox.Image = GObjects.MainPictureOnView.Bitmap;
 }