private void BrightnessContrastForm_Load(object sender, EventArgs e) { try { int width, height; small_current = new TypicalImage(current_image); if (small_current.get_width() > 200 || small_current.get_height() > 200) { if (small_current.get_width() > small_current.get_height()) { width = 200; height = (width * small_current.get_height()) / small_current.get_width(); } else { height = 200; width = (height * small_current.get_width()) / small_current.get_height(); } small_current.resize(width, height); } this.Original.Image = this.small_current.get_bitmap(); this.Adjusted.Image = this.small_current.get_bitmap(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public void brightness_contrast() { BrightnessContrastForm brightness_contrast_form = new BrightnessContrastForm(); brightness_contrast_form.current_image = this.opened_image; brightness_contrast_form.ShowDialog(this); this.opened_image = brightness_contrast_form.current_image; set_new_image(); }
public void smooth() { SmoothForm smoothForm = new SmoothForm(); smoothForm.img = this.opened_image; smoothForm.ShowDialog(this); this.opened_image = smoothForm.img; this.set_new_image(); }
public void bitplane() { BitPlaneForm bitPlaneForm = new BitPlaneForm(); bitPlaneForm.source = this.opened_image; bitPlaneForm.ShowDialog(this); this.opened_image = bitPlaneForm.source; set_new_image(); }
public void gamma_correction() { GammaForm gamma_correction_form = new GammaForm(); gamma_correction_form.current_image = this.opened_image; gamma_correction_form.ShowDialog(this); this.opened_image = gamma_correction_form.current_image; set_new_image(); }
public void custom_filter() { CustomFilterForm customFilter = new CustomFilterForm(); customFilter.img = this.opened_image; customFilter.ShowDialog(this); this.opened_image = customFilter.img; set_new_image(); }
public void transformation() { TransformationsForm trans_form = new TransformationsForm(); trans_form.working_on = this.opened_image; trans_form.ShowDialog(this); this.opened_image = trans_form.working_on; set_new_image(); }
private void buttonOK_Click(object sender, EventArgs e) { try { source = source.bitplane_slicing(Color.FromArgb(R, G, B)); this.Hide(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void buttonOK_Click(object sender, EventArgs e) { try { img = edited; this.Close(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void dropListImage2_SelectedIndexChanged(object sender, EventArgs e) { try { second = new TypicalImage(images_array[dropListImage2.SelectedIndex]); SecondImage.Image = second.get_bitmap(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void buttonOK_Click(object sender, EventArgs e) { try { current_image = current_image.change_gamma(Convert.ToDouble(this.numericGamma.Value)); this.Close(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void dropListImage1_SelectedIndexChanged(object sender, EventArgs e) { try { first = new TypicalImage(images_array[dropListImage1.SelectedIndex]); FirstImage.Image = first.get_bitmap(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void SharpForm_Load(object sender, EventArgs e) { try { Original.Image = img.get_bitmap(); comboBoxpost.SelectedIndex = 0; edited = new TypicalImage(img); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void buttonOK_Click(object sender, EventArgs e) { try { current_image = current_image.change_brightness(Convert.ToInt32(this.numericBrightness.Value)); current_image = current_image.change_contrast(Convert.ToInt32(this.numericContrast.Value)); this.Close(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void meanSmooth_Click(object sender, EventArgs e) { try { bluredimg = img.meanFilter( int.Parse(meanWidth.Text), int.Parse(meanHeight.Text), int.Parse(meanOrigix.Text), int.Parse(meanOriginy.Text) ); pictureBoxResult.Image = bluredimg.get_bitmap(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void buttonOK_Click(object sender, EventArgs e) { try { PictureForm new_picture = new PictureForm(); result.id = TypicalImage.get_an_id(); result.set_file_name("Image" + result.id + "." + first.get_extension()); new_picture.opened_image = result; Program.mainForm.open_this_mdi_picture(new_picture); new_picture.Activate(); this.Close(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void guassianButton_Click(object sender, EventArgs e) { try { if (gaussianSize.Text == "") { bluredimg = img.gaussianFilter2(int.Parse(sigma.Text)); pictureBoxResult.Image = bluredimg.get_bitmap(); } else { bluredimg = img.gaussianFilter1(int.Parse(sigma.Text), int.Parse(gaussianSize.Text)); pictureBoxResult.Image = bluredimg.get_bitmap(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void BitPlaneForm_Load(object sender, EventArgs e) { try { int width, height; image = new TypicalImage(source); if (image.get_width() > 250 || image.get_height() > 250) { if (image.get_width() > image.get_height()) { width = 250; height = (width * image.get_height()) / image.get_width(); } else { height = 250; width = (height * image.get_width()) / image.get_height(); } image.resize(width, height); } this.Original.Image = this.image.get_bitmap(); this.Result.Image = this.image.get_bitmap(); loadData(); int counter = 0; for (int i = 0; i < colors.Count; i++) { for (int j = 0; j < mask.Count; j++) { pictureBox_array[counter].Image = image.bitplane(colors[i], mask[j]).get_bitmap(); counter++; } } actions(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public void sharp() { this.opened_image = this.opened_image.laplacianFilter(); this.set_new_image(); }
public void horizontal_edge() { this.opened_image = this.opened_image.horizontal_sobel_filter(); this.set_new_image(); }
public void vertical_edge() { this.opened_image = this.opened_image.vertical_sobel_filter(); this.set_new_image(); }
public void magnitude_edge() { this.opened_image = this.opened_image.edge_magnitude(); this.set_new_image(); }