Exemplo n.º 1
0
        private void processFrame(int count, WaveFormat format)
        {
            if (!Bypass)
            {
                SignalProcess.Process(new float[][] { leftData, rightData }, count);
            }

            if (LeftOut != null)
            {
                LeftOut.RaiseBufferReady(new RoutingEventArgs
                {
                    Count  = count,
                    Buffer = leftData,
                    Format = format,
                    Index  = 0
                });
            }

            if (RightOut != null)
            {
                RightOut.RaiseBufferReady(new RoutingEventArgs
                {
                    Count  = count,
                    Buffer = rightData,
                    Format = format,
                    Index  = 1
                });
            }

            leftData  = null;
            rightData = null;
        }
Exemplo n.º 2
0
        public App(IThreadingCrossPlatform _IThreading, IDevice _currentDevice, SignalProcess _process = null, IMediaPicker _mediaPicker = null, IImageSupport _imageSupport = null, IFileSupport _fileSupport = null)
        {
            var navPage =
                new NavigationPage(
                    new AuthenticDocPage(_process, _IThreading, _currentDevice, _mediaPicker, _imageSupport, _fileSupport)
            {
                Title = "AuthenticDoc"
            })
            {
                BarBackgroundColor = Color.FromHex("547799")
            };

            MainPage = navPage;
        }
Exemplo n.º 3
0
        private void input_ReceivedData(object sender, RoutingEventArgs e)
        {
            if (!Bypass)
            {
                SignalProcess.Process(new float[][] { e.Buffer }, e.Count);
            }

            if (CentreOut != null)
            {
                CentreOut.RaiseBufferReady(new RoutingEventArgs
                {
                    Buffer = e.Buffer,
                    Count  = e.Count,
                    Format = format,
                    Index  = 0
                });
            }
        }
Exemplo n.º 4
0
        public AuthenticDocPage(SignalProcess _process, IThreadingCrossPlatform _IThreading, IDevice _currentDevice, IMediaPicker _mediaPicker = null, IImageSupport _imageSupport = null, IFileSupport _fileSupport = null)
        {
            string[] testURls = { "http://www.atmospheric-research.com/websops/Scanned%20Documents/Document%20(37).jpg",
                                  "http://www.bcot1.com/test1.bmp" };
            model          = new AuthenticDocModel(_process, _IThreading, _currentDevice, _mediaPicker, _imageSupport, _fileSupport, testURls);
            BindingContext = model;

            InitializeComponent();

            foreach (var sUrl in testURls)
            {
                URLEntryPicker.Items.Add(sUrl);
            }
            URLEntry.Text      = URLEntryPicker.Items[0];
            URLEntry.TextColor = Color.Black;

            //openGLView.HasRenderLoop = true;
            //openGLView.HeightRequest = 300;
            //openGLView.WidthRequest = 300;
            //openGLView.OnDisplay = r =>
            //{
            //    Random rnd = new Random();
            //    OpenTK.Graphics.ES20.GL.ClearColor((float)rnd.NextDouble(), (float)rnd.NextDouble(), (float)rnd.NextDouble(), 0.7f);
            //    GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);

            //};
            //testButton.Clicked += (s, a) => { this.openGLView.Display(); };
            //openGLView.OnDisplay = display;
            //testButton.Clicked += clicked;

            //this.m_cancellationToken = new CancellationTokenSource();
            //Timer is Stopped
            //TimerRunning(this.m_cancellationToken.Token);
            //m_rect = new Rectangle(100, 100, 300, 300);

            //GL.Viewport(100, 100, 500, 500);
            //display(m_rect);
            URLEntryPicker.SelectedIndexChanged += (s, a) => { URLEntry.Text = testURls[URLEntryPicker.SelectedIndex]; };
        }
Exemplo n.º 5
0
 public ProcessingImage(SignalProcess _signalProcess)
 {
     inputImage    = new InputImage(IntPtr.Zero, 0, 0, 0, 0);
     ocrResult     = string.Empty;
     signalProcess = _signalProcess;
 }
Exemplo n.º 6
-2
        public AuthenticDocModel(SignalProcess _process, IThreadingCrossPlatform _IThreading, IDevice _currentDevice, IMediaPicker _mediaPicker, IImageSupport _imageSupport, IFileSupport _fileSupport, string[] _testURls)
        {
            m_IThreading    = _IThreading;
            m_IFileSupport  = _fileSupport;
            m_IImageSupport = _imageSupport;
            m_testURls      = _testURls;

            SetupMedia(_currentDevice, _mediaPicker);

            buttonCameraName = "Camera";

            //urlEntryText = directory;
            TakePictureFromCameraCommand = new RelayCommand(TakePictureFromCameraRelay, param => this.canExecute);
            LoadImageFromFileCommand     = new RelayCommand(LoadImageFromFileCommandRelay, param => this.canExecute);
            LoadImageFromURLCommand      = new RelayCommand(LoadImageFromURLCommandRelay, param => this.canExecute);
            TestButtonCommand            = new RelayCommand(TestButtonCommandRelay, param => this.canExecute);
            ProcessCommand = new RelayCommand(ProcessCommandRelay, param => this.CanExecuteProcess);
            URLEntryPickerChangedCommand = new RelayCommand(urlEntryPickerChangedCommandRelay, param => this.canExecute);
            updateImageEvent            += new EventHandler <ImageSource>((o, s) => { imageSource = s; });
            imageSource = new UriImageSource
            {
                Uri            = new Uri("https://grandprix20.files.wordpress.com/2012/11/317757_423537204379996_1874288384_n-1.png"),
                CachingEnabled = false
            };
            processImage = new ProcessingImage(_process);
        }