Beispiel #1
0
        static void Main(string[] args)
        {
            Affdex.Detector detector = new Affdex.CameraDetector(0, 30, 30, 3, Affdex.FaceDetectorMode.LARGE_FACES);
            Form1           feed     = new Form1(detector);

            detector.setClassifierPath("E:\\Ufpel\\TCC\\APIs\\AffdexSDK\\data");
            detector.setDetectAllEmotions(true);
            detector.setDetectAllEmojis(true);
            detector.start();
            feed.ShowDialog();
            detector.stop();
        }
        private void StopCameraProcessing()
        {
            try
            {
                if ((mCameraDetector != null) && (mCameraDetector.isRunning()))
                {
                    mCameraDetector.stop();
                    mCameraDetector.Dispose();
                    mCameraDetector = null;
                }

                // Enable/Disable buttons on start
                btnStartCamera.IsEnabled    = true;
                btnResetCamera.IsEnabled    =
                    btnStopCamera.IsEnabled = false;
            }
            catch (Exception ex)
            {
                String message = String.IsNullOrEmpty(ex.Message) ? "AffdexMe error encountered." : ex.Message;
                ShowExceptionAndShutDown(message);
            }
        }