Example #1
0
 private void Btn_decode_Click(object sender, RoutedEventArgs e)
 {
     PreviewRoutine.StopPreview();
     if (GV.mDecoderEngine == DecoderEngine.Zxing)
     {
         ZxingDecoder.StartDecodeRoutine();
     }
     else if (GV.mDecoderEngine == DecoderEngine.Cortex)
     {
         CortexDecoder.Decode(GV.imgOriginal.ToBitmap());
         lbl_barcodeDetectResult.Content = CortexDecoder.ResultString;
     }
 }
Example #2
0
        public MainWindow()
        {
            //Static MainWindow
            mMainWindow = this;
            //Windows.main = this;
            DataContext = BindMngr;

            loadingScreen.Show();
            InitializeComponent();

            mTrainingWindow = new TrainingWindow();

            // Setup background worker
            PreviewRoutine.previewSetup();
            ConnectRoutine.connectionSetup();
            ImageResizing.ImageResizingSetup();
            ResNet.CNTK_ResNetSetup();
            ZxingDecoder.DecoderSetup();
            mTrainingWindow.TrainModelRoutineSetup();

            OCR.OCRSetup(OCRMode.NUMBERS);

            // Create Directories
            GV.ML_Folders[(int)MLFolders.MLRoot]           = Environment.CurrentDirectory + MLFolders.MLRoot.GetDescription();
            GV.ML_Folders[(int)MLFolders.ML_CNTK]          = Environment.CurrentDirectory + MLFolders.ML_CNTK.GetDescription();
            GV.ML_Folders[(int)MLFolders.ML_CNTK_model]    = Environment.CurrentDirectory + MLFolders.ML_CNTK_model.GetDescription();
            GV.ML_Folders[(int)MLFolders.ML_YOLO]          = Environment.CurrentDirectory + MLFolders.ML_YOLO.GetDescription();
            GV.ML_Folders[(int)MLFolders.ML_YOLO_backup]   = Environment.CurrentDirectory + MLFolders.ML_YOLO_backup.GetDescription();
            GV.ML_Folders[(int)MLFolders.ML_YOLO_model]    = Environment.CurrentDirectory + MLFolders.ML_YOLO_model.GetDescription();
            GV.ML_Folders[(int)MLFolders.ML_YOLO_data]     = Environment.CurrentDirectory + MLFolders.ML_YOLO_data.GetDescription();
            GV.ML_Folders[(int)MLFolders.ML_YOLO_data_img] = Environment.CurrentDirectory + MLFolders.ML_YOLO_data_img.GetDescription();

            foreach (string str in GV.ML_Folders)
            {
                if (str != null && !Directory.Exists(str))
                {
                    Directory.CreateDirectory(str);
                }
            }
        }