public LinearOperations(ImageWindow imageWindow) { InitializeComponent(); this.imageWindow = imageWindow; foreach (NumericUpDown numericUpDown in numericUpDownPanel.Controls) { numericUpDown.Minimum = -20; numericUpDown.Maximum = 20; } imageMethodsComboBox.Items.Add("Wygładzanie K=1/9"); imageMethodsComboBox.Items.Add("Wygładzanie K=1/10"); imageMethodsComboBox.Items.Add("Wygładzanie K=1/16"); imageMethodsComboBox.Items.Add("Wyostrzanie Maska 1"); imageMethodsComboBox.Items.Add("Wyostrzanie Maska 2"); imageMethodsComboBox.Items.Add("Wyostrzanie Maska 3"); imageMethodsComboBox.Items.Add("Wyostrzanie Maska 4"); imageMethodsComboBox.Items.Add("Wyostrzanie Maska 5"); imageMethodsComboBox.Items.Add("Detekcja Krawędzi Maska 1"); imageMethodsComboBox.Items.Add("Detekcja Krawędzi Maska 2"); imageMethodsComboBox.Items.Add("Detekcja Krawędzi Maska 3"); imageMethodsComboBox.SelectedIndex = 0; scalingMethodsComboBox.Items.Add("Metoda Proporcjonalna"); scalingMethodsComboBox.Items.Add("Metoda Trójwartościowa"); scalingMethodsComboBox.Items.Add("Metoda Obcinająca"); scalingMethodsComboBox.SelectedIndex = 0; pictureBox1.Image = (Image)this.imageWindow.getImage().Clone(); maxBMPValue = HistogramOperations.MaxBmpLevel(pictureBox1.Image); minBMPValue = HistogramOperations.MinBmpLevel(pictureBox1.Image); //minBMPValue = 0; HistogramOperations.drawHistogram(chart1, pictureBox1.Image, maxBMPValue); }
public GradientWindow(ImageWindow imageWindow) { InitializeComponent(); this.imageWindow = imageWindow; pictureBox1.Image = (Image)imageWindow.getImage().Clone(); maxBMPLevel = HistogramOperations.MaxBmpLevel(pictureBox1.Image); minBMPLevel = HistogramOperations.MinBmpLevel(pictureBox1.Image); HistogramOperations.drawHistogram(chart1, pictureBox1.Image, maxBMPLevel); masksComboBox.Items.Add("Maska Robertsa"); masksComboBox.Items.Add("Maska Sobela"); masksComboBox.Items.Add("Maski Prewitta"); masksComboBox.Items.Add("Maski Kirscha"); masksComboBox.SelectedIndex = 0; scalingMethodsComboBox.Items.Add("Metoda Proporcjonalna"); scalingMethodsComboBox.Items.Add("Metoda Trójwartościowa"); scalingMethodsComboBox.Items.Add("Metoda Obcinająca"); scalingMethodsComboBox.SelectedIndex = 0; directionComboBox.Items.Add("N"); directionComboBox.Items.Add("S"); directionComboBox.Visible = false; directionLabel.Visible = false; }