Exemple #1
0
        public Form1(IOCREngine ocrEngine, IBlobDetector blobDetector)
        {
            InitializeComponent();

            windowCapture = new WindowCaptureStream
                            (
                webBrowser1.Handle,
                new Rectangle(0, 0, webBrowser1.Width, webBrowser1.Height)
                            );
            windowCapture.NewFrame += NewFrame;

            this.ocrEngine = ocrEngine;
            this.ocrEngine.RecognizedText += RecognizedText;

            this.blobDetector = blobDetector;
            this.blobDetector.DetectedBlobs += DetectedBlobs;
        }
Exemple #2
0
        public Form1(IOcrProcessor ocrProcessor, IBlobCounter blobProcessor)
        {
            InitializeComponent();

            var wndRect = new Rectangle(0, 0,
                                        webBrowser1.ClientRectangle.Width, webBrowser1.ClientRectangle.Height);

            windowCapture = new WindowCaptureStream(webBrowser1.Handle, wndRect);

            windowCapture.FrameInterval = 250;
            windowCapture.NewFrame     += NewFrame;

            this.ocrProcessor = ocrProcessor;
            this.ocrProcessor.RecognizedText += RecognizedText;

            this.blobProcessor             = blobProcessor;
            this.blobProcessor.BlobsFound += FoundBlobs;
        }
Exemple #3
0
 public void OpenVideoSource(WindowCaptureStream source)
 {
     mainForm.Invoke((Action)(() => mainForm.OpenVideoSource(source)));
 }