// load button private void loadPic_Click(object sender, EventArgs e) { string file_path = null; OpenFileDialog ofd = new OpenFileDialog(); ofd.InitialDirectory = @"C:\Users\A\Desktop\Image"; if (ofd.ShowDialog() == DialogResult.OK) { file_path = ofd.FileName; // 선택된 파일의 풀 경로를 저장. Toggle_stop(); compare_stop(); } else { return; } Mat selected_pic; selected_pic = Cv2.ImRead(@file_path); Bitmap pic_bitmap = OpenCvSharp.Extensions.BitmapConverter.ToBitmap(selected_pic); pictureBox.BackgroundImageLayout = ImageLayout.Stretch; pictureBox.BackgroundImage = pic_bitmap; state = Picbox_state.ORIGINAL; data.Set_Orgpic(pic_bitmap); data.Set_Aplpic(null); output.Show(); origin.Show(); th_data.Initialize(); }
private void init_Click(object sender, EventArgs e) { data.Initialize(); Initialize_txt(); }