Ejemplo n.º 1
0
        public ImageProcessor(FormMain mainForm, LoginService loginService, GesturesService gesturesService, TrainingBox trainBox, CursorSimulator cursorSimulator)
        {
            try
            {
                this.cursorSimulator = cursorSimulator;
                this.webCam = new Capture(); //Inicializa la camara
                this.mainForm = mainForm;
                this.loginService = loginService;
                this.gesturesService = gesturesService;
                this.trainBox = trainBox;

                this.clickTimer = new Stopwatch();
                this.mouthTimer = new Stopwatch();
                this.speechProcessor = new SpeechProcessor();
                this.eyeDetector = new EyeDetector();
                this.faceDetector = new FaceDetector(this.eyeDetector);
                this.cursorLoopProcessor = new CursorLoopProcessor(this.cursorSimulator);
                this.cursorActionProcessor = new CursorActionProcessor();
                this.deactivateActionProcessor = new DeactivateActionProcessor(this.speechProcessor, this.cursorLoopProcessor);

                this.activateSpeechAction = new ActivateSpeechAction();

                Application.Idle += new EventHandler(this.cursorLoopProcessor.Pool);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public CursorActionProcessor()
        {
            this.cursorSimulator = new CursorSimulator();

            this.cursorActions = new List<ClickAction>()
            {
                new RigthClickAction(this.cursorSimulator.SimulateRightClick),
                new LeftClickAction(this.cursorSimulator.SimulateClick),
                new LeftDoubleClickAction(this.cursorSimulator.SimulateDoubleClick)
            };
        }
Ejemplo n.º 3
0
 public MainProcessor()
 {
     this.leftArrow = new LeftArrow();
     this.rightArrow = new RightArrow();
     this.loginService = new LoginService(this);
     this.gesturesService = new GesturesService(this.loginService);
     this.trainBox = new TrainingBox();
     this.mainForm = new FormMain(this, this.loginService, this.gesturesService, this.trainBox);
     this.cursorSimulator = new CursorSimulator();
     this.imageProcessor = new ImageProcessor(this.mainForm, this.loginService, this.gesturesService, this.trainBox, this.cursorSimulator);
     this.ActivateEventLooper();
     this.ShowForm();
 }
Ejemplo n.º 4
0
 public CursorLoopProcessor(CursorSimulator mouseSimulator)
 {
     this.mouseSimulator = mouseSimulator;
     this.timer = new Stopwatch();
     this.pixelsToAdd = 1;
 }