private void RecognizePlateButton_Click(object sender, RoutedEventArgs e)
        {
            var bitmapImage           = Model.Image as BitmapImage;
            Image <Bgr, Byte> imageCV = new Image <Bgr, byte>(bitmapImage.ToBitmap());
            Mat         mat           = imageCV.Mat;
            PlateWindow plateWindow   = new PlateWindow(Model, mat, _initializeNetwork, _settings);

            plateWindow.Show();
        }
        void CamNewFrame(object sender, NewFrameEventArgs eventArgs)
        {
            try
            {
                System.Drawing.Image img = (Bitmap)eventArgs.Frame.Clone();
                if (_plateWindow.IsRecognise)
                {
                    System.Timers.Timer aTimer = new System.Timers.Timer();
                    aTimer.Elapsed += new ElapsedEventHandler(OnTimedEvent);
                    aTimer.Interval = 8000;
                    aTimer.Enabled  = true;
                }
                if (i % _frequency == 0 && i != 0 && !_plateWindow.IsRecognise)
                {
                    i = 0;
                    Image <Bgr, Byte> imageCV = new Image <Bgr, byte>((Bitmap)img);
                    Mat mat = imageCV.Mat;
                    Application.Current.Dispatcher.Invoke((Action) delegate
                    {
                        _plateWindow = new PlateWindow(_model, mat, _initializeNeutralNetwork, _settings);
                    });
                }
                i++;
                MemoryStream ms = new MemoryStream();
                img.Save(ms, ImageFormat.Bmp);
                ms.Seek(0, SeekOrigin.Begin);
                BitmapImage bi = new BitmapImage();
                bi.BeginInit();
                bi.StreamSource = ms;
                bi.EndInit();

                bi.Freeze();
                Dispatcher.BeginInvoke(new ThreadStart(delegate
                {
                    frameHolder.Source = bi;
                }));
            }
            catch (Exception ex)
            {
            }
        }