private void grisToolStripMenuItem_Click(object sender, EventArgs e) { if (radioButton1.Checked) { pictureBox1.Image = ImageProcessingService.ConvertBitmapToGrayscale(new Bitmap(pictureBox1.Image)); } else if (radioButton2.Checked) { pictureBox2.Image = ImageProcessingService.ConvertBitmapToGrayscale(new Bitmap(pictureBox2.Image));; } }
public Form1() { InitializeComponent(); int[][] elt = ImageProcessingService.GetEltHex(2); for (int i = 0; i < elt.Length; i++) { for (int j = 0; i < elt.Length; j++) { Console.Write(elt[i][j] + " "); } Console.WriteLine(); } }
private void seuillageToolStripMenuItem_Click(object sender, EventArgs e) { ThreshPopup pop = new ThreshPopup(); pop.ShowDialog(this); if (OK) { if (radioButton1.Checked) { pictureBox1.Image = ImageProcessingService.Threshhold(new Bitmap(pictureBox1.Image), threshold); } else if (radioButton2.Checked) { pictureBox1.Image = ImageProcessingService.Threshhold(new Bitmap(pictureBox2.Image), threshold); } else { pictureBox1.Image = ImageProcessingService.Threshhold(new Bitmap(pictureBox3.Image), threshold); } } }