public MainWindow() { _cardDetector = new AForgeCardDetector(); DataContext = this; InitializeComponent(); AForgeCaptureDeviceFactory captureDeviceFactory = new AForgeCaptureDeviceFactory(); _captureDevice = captureDeviceFactory.First(); if (_captureDevice == null) return; _captureDevice.Frames .Sample(TimeSpan.FromSeconds(1 / 30)) .Select(Process) .ObserveOn(Webcam) .Subscribe(Display); _captureDevice.Start(); }
public MainWindow() { _cardDetector = new AForgeCardDetector(); DataContext = this; InitializeComponent(); AForgeCaptureDeviceFactory captureDeviceFactory = new AForgeCaptureDeviceFactory(); _captureDevice = captureDeviceFactory.First(); if (_captureDevice == null) { return; } _captureDevice.Frames .Sample(TimeSpan.FromSeconds(1 / 30)) .Select(Process) .ObserveOn(Webcam) .Subscribe(Display); _captureDevice.Start(); }