Exemplo n.º 1
0
        public void setDetector(Affdex.Detector detector)
        {
            this.detector = detector;

            detector.setImageListener(this);
            detector.setProcessStatusListener(this);
        }
 public AffectivaSurface(Affdex.Detector detector)
 {
     detector.setImageListener(this);
     detector.setProcessStatusListener(this);
     //InitializeComponent();
     rwLock = new ReaderWriterLock();
     this.DoubleBuffered = true;
     //this.FormBorderStyle = FormBorderStyle.FixedSingle;
     SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw, true);
 }
Exemplo n.º 3
0
 public ProcessVideo(Affdex.Detector detector)
 {
     System.Console.WriteLine("Starting Interface...");
     this.detector = detector;
     detector.setImageListener(this);
     detector.setProcessStatusListener(this);
     InitializeComponent();
     rwLock = new ReaderWriterLock();
     this.DoubleBuffered  = true;
     this.FormBorderStyle = FormBorderStyle.FixedSingle;
     SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw, true);
 }
        public ProcessVideo(Affdex.Detector detector)
        {
            System.Console.WriteLine("Starting Interface...");
            this.detector = detector;
            detector.setImageListener(this);
            detector.setProcessStatusListener(this);
            InitializeComponent();
            rwLock = new ReaderWriterLock();
            this.DoubleBuffered  = true;
            this.FormBorderStyle = FormBorderStyle.FixedSingle;
            SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw, true);

            //Line added by Hifza
            //Affdex log contains full log from last session of emotion game
            //Affdex results are sent to emotion game code to process data in chunks
            //System.IO.File.WriteAllText(@"C:\Users\artmed\Desktop\sangwonlee\Affdex_Outputs\Affdex_Log.txt", String.Empty);
            //System.IO.File.WriteAllText(@"C:\Users\artmed\Documents\sangwonlee\Affdex_Outputs\Affdex_Results.txt", String.Empty);
        }
Exemplo n.º 5
0
        private void startWebCamProsessing()
        {
            try
            {
                const int cameraId      = 1;
                const int numberOfFaces = 1;
                const int cameraFPS     = 15;
                const int processFPS    = 15;

                Detector = new Affdex.CameraDetector(cameraId, cameraFPS, processFPS, numberOfFaces, Affdex.FaceDetectorMode.LARGE_FACES);
                Detector.setClassifierPath("C:\\Program Files\\Affectiva\\AffdexSDK\\data");

                Detector.setDetectAllEmotions(true);
                Detector.setDetectGender(true);

                Detector.setImageListener(this);

                Detector.start();
            }
            catch (Affdex.AffdexException ex) {
                MessageBox.Show("Ocurrió un error al inicializar el analizador: " + ex.Message);
            }
        }
Exemplo n.º 6
0
 public Form1(Affdex.Detector detector)
 {
     detector.setImageListener(this);
     InitializeComponent();
 }