Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        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();
        }