public ImageMatching() { InitializeComponent(); opencvwrapper = new OpenCVWrapper(); thinningopencvwrapper = new ThinningOpenCVWrapper(); ProcessedImagePictureEdit.ContextMenu = new ContextMenu(); //ArduinoSerialPort.PortName = "COM4"; //ArduinoSerialPort.BaudRate = 9600; }
public ImageProcessing() { InitializeComponent(); opencvwrapper = new OpenCVWrapper(); thinningopencvwrapper = new ThinningOpenCVWrapper(); if (File.Exists(@"D:\Eighth Semester\HandVeinPattern\RuntimeDirectory\ResultImage.jpg")) { try { File.Delete(@"D:\Eighth Semester\HandVeinPattern\RuntimeDirectory\ResultImage.jpg"); } catch (IOException exception) { MessageBox.Show(exception.Message); } } if (File.Exists(@"D:\Eighth Semester\HandVeinPattern\RuntimeDirectory\AdaptiveThreshold.jpg")) { try { File.Delete(@"D:\Eighth Semester\HandVeinPattern\RuntimeDirectory\AdaptiveThreshold.jpg"); } catch (IOException exception) { MessageBox.Show(exception.Message); } } if (File.Exists(@"D:\Eighth Semester\HandVeinPattern\RuntimeDirectory\MultipliedImage.jpg")) { try { File.Delete(@"D:\Eighth Semester\HandVeinPattern\RuntimeDirectory\MultipliedImage.jpg"); } catch (IOException exception) { MessageBox.Show(exception.Message); } } if (File.Exists(@"D:\Eighth Semester\HandVeinPattern\RuntimeDirectory\ThinnedImage.jpg")) { try { File.Delete(@"D:\Eighth Semester\HandVeinPattern\RuntimeDirectory\ThinnedImage.jpg"); } catch (IOException exception) { MessageBox.Show(exception.Message); } } if (Directory.Exists(@"D:\Eighth Semester\HandVeinPattern\RuntimeDirectory")) { try { Directory.Delete(@"D:\Eighth Semester\HandVeinPattern\RuntimeDirectory"); } catch (IOException exception) { MessageBox.Show(exception.Message); } } if (AutoProcessBarToggleSwitchItem.Checked == true) { PreProcessingRibbonPageGroup.Enabled = false; ThresholdingRibbonPageGroup.Enabled = false; WrapperProcessingRibbonPageGroup.Enabled = false; PostProcessingRibbonPageGroup.Enabled = false; SegmentationRibbonPageGroup.Enabled = false; FeaturesExtractionRibbonPageGroup.Enabled = false; ProcessBarButtonItem.Enabled = true; } else { PreProcessingRibbonPageGroup.Enabled = true; ThresholdingRibbonPageGroup.Enabled = true; WrapperProcessingRibbonPageGroup.Enabled = true; PostProcessingRibbonPageGroup.Enabled = true; SegmentationRibbonPageGroup.Enabled = true; FeaturesExtractionRibbonPageGroup.Enabled = true; ProcessBarButtonItem.Enabled = false; } }