private void trackBar1_ValueChanged(object sender, EventArgs e) { if (Layers.CurrentLayer != null) { effects.Binarization(trackBar1.Value); form.pictureBox.Refresh(); chart_Histogram.Series[0].Points.Clear(); chart_Histogram.Series[0].Points.DataBindY(h.GetHistogramm(HistogramType.Brightness)); } value_textBox.Text = trackBar1.Value.ToString(); }
public BinarizationForm(Form1 form) { InitializeComponent(); this.form = form; if (Layers.CurrentLayer != null) { effects = new PLL.Effects(Layers.CurrentLayer.Foreground); effects.Binarization(trackBar1.Value); form.pictureBox.Refresh(); value_textBox.Text = trackBar1.Value.ToString(); form.pictureBox.Refresh(); h = new Histogramm(Layers.CurrentLayer.Foreground); chart_Histogram.Series[0].Points.DataBindY(h.GetHistogramm(HistogramType.Brightness)); } }