Exemple #1
0
        public void Start()
        {
            if (!_doTracking)
            {
                _doTracking = true;
                switch (_settings.DetectionMode)
                {
                case 1:
                    _doFace  = true;
                    _doBadge = false;
                    break;

                case 2:
                    _doFace  = false;
                    _doBadge = true;
                    break;

                case 3:
                    _doFace  = true;
                    _doBadge = true;
                    break;
                }
                _faces            = new DetectedValues(_settings.MinFaceCount, _settings.MinFaceSharpness);
                _badges           = new DetectedValues(_settings.MinBadgeCount, _settings.MinBadgeSharpness);
                _recognizedTexts  = new List <OcrResults>();
                _recognizedFaces  = new List <Face>();
                Application.Idle -= ShowCameraScreen;
                Application.Idle += PerformRecognition;
            }
        }
Exemple #2
0
        public void Stop()
        {
            if (_doTracking)
            {
                _doTracking       = false;
                _doFace           = false;
                _doBadge          = false;
                Application.Idle -= PerformRecognition;

                _faces            = new DetectedValues(_settings.MinFaceCount, _settings.MinFaceSharpness);
                _badges           = new DetectedValues(_settings.MinBadgeCount, _settings.MinBadgeSharpness);
                _recognizedTexts  = new List <OcrResults>();
                _recognizedFaces  = new List <Face>();
                Application.Idle += ShowCameraScreen;
            }
        }
Exemple #3
0
 private void button_test_async_Click(object sender, EventArgs e)
 {
     _badges           = new DetectedValues(100, 0);
     Application.Idle += DetectBadgeAsync;
 }
Exemple #4
0
 private void button_test_face_Click(object sender, EventArgs e)
 {
     _faces            = new DetectedValues(100, 0);
     Application.Idle += DetectFace;
 }