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; } }
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; } }
private void button_test_async_Click(object sender, EventArgs e) { _badges = new DetectedValues(100, 0); Application.Idle += DetectBadgeAsync; }
private void button_test_face_Click(object sender, EventArgs e) { _faces = new DetectedValues(100, 0); Application.Idle += DetectFace; }