Ejemplo n.º 1
0
        private void additionalParamsBtn_Click(object sender, EventArgs e)
        {
            ExtraParamsForm epf = new ExtraParamsForm();

            epf.Params = _params;
            if (epf.ShowDialog() == DialogResult.OK)
            {
                _params = epf.Params;
            }
        }
Ejemplo n.º 2
0
        private void okBtn_Click(object sender, EventArgs e)
        {
            if (_params == null)
            {
                _params = new ExtraParams();
            }

            _params.Delay = delayTrackbar.Value;

            if (facePlusPlusRadioBtn.Checked)
            {
                _params.FaceRecognition = FaceRecognitionMethod.FacePlusPlus;
            }
            else if (haarCascadeRadioBtn.Checked)
            {
                _params.FaceRecognition = FaceRecognitionMethod.HaarCascade;
            }
            else
            {
                _params.FaceRecognition = FaceRecognitionMethod.PreservedFacesData;
            }

            if (swtRadioBtn.Checked)
            {
                _params.BibArea = BibAreaDetectionMethod.SWT;
            }
            else if (edgesRadioBtn.Checked)
            {
                _params.BibArea = BibAreaDetectionMethod.Edges;
            }
            else
            {
                _params.BibArea = BibAreaDetectionMethod.Both;
            }

            if (neuralRadioBtn.Checked)
            {
                _params.DigitsRecognition = DigitsRecognitionMethod.Neural;
            }
            else if (tesseractRadioBtn.Checked)
            {
                _params.DigitsRecognition = DigitsRecognitionMethod.Tesseract;
            }
            else
            {
                _params.DigitsRecognition = DigitsRecognitionMethod.Both;
            }

            if (stepDetectionAndRecognitionRadioBtn.Checked)
            {
                _params.DetectionSteps = DetectionSteps.DetectionAndRecognition;
            }
            else if (stepFacialRadioBtn.Checked)
            {
                _params.DetectionSteps = DetectionSteps.FacialUnresolved;
            }
            else
            {
                _params.DetectionSteps = DetectionSteps.Both;
            }

            DialogResult = DialogResult.OK;
            Close();
        }