private void button6_Click(object sender, EventArgs e) { var openFileDialog1 = new OpenFileDialog { Filter = @"Bmp(*.bmp)|*.bmp" }; if (openFileDialog1.ShowDialog() != DialogResult.OK) { return; } var fileName = openFileDialog1.FileName; try { var inputImage = new Image <Bgr, byte>(fileName); _picturesForm.Show(); _picturesForm.GetInputPicture(inputImage); ImageMethods.AnalisePicture(inputImage); } catch (Exception exception) { MessageBox.Show(exception.Message); } button6.Text = fileName; }