Error Initilaizing Camera

General information about Neurotechnology and its software

Error Initilaizing Camera

Postby gtoledo » Dec 01, 2017 17:23


I'm trying to do face recognition on different machines. On most of them everything works fine, but on several Windows 10 Pro Machines i'm having an error when we try to begin the camera capture. This is the error i get on the eventviewer

Nombre de la aplicación con errores: TestDeviceManager.exe, versión:, marca de tiempo: 0x5a2065a7
Nombre del módulo con errores: Windows.Media.dll, versión: 10.0.16299.64, marca de tiempo: 0xd02a0cd6
Código de excepción: 0xc0000005
Desplazamiento de errores: 0x0038a8dd
Identificador del proceso con errores: 0x2598
Hora de inicio de la aplicación con errores: 0x01d36ac6f992c778
Ruta de acceso de la aplicación con errores: C:\Users\USER\Desktop\DeviceTeste\TestDeviceManager.exe
Ruta de acceso del módulo con errores: C:\Windows\System32\Windows.Media.dll
Identificador del informe: cd0e4d48-c18f-4ed3-8c44-be71628fc172
Nombre completo del paquete con errores:
Identificador de aplicación relativa del paquete con errores:

The code where it happens is the following:

Code: Select all
 private void ConfigurarEjecutarExtraccion()
           _biometricClient = new NBiometricClient
                BiometricTypes = NBiometricType.Face,
                UseDeviceManager = true
            Trace.WriteLine("Inicializar Camara");
            _biometricClient.FaceCaptureDevice = camera;

                _biometricClient.FacesConfidenceThreshold = parametrosExtraccion.FaceConfidenceThreshold;
                _biometricClient.FacesDetectAllFeaturePoints = parametrosExtraccion.DetectAllFeaturePoints;
                _biometricClient.FacesDetectBaseFeaturePoints = parametrosExtraccion.DetectAllFeaturePoints;
                _biometricClient.FacesMaximalRoll = parametrosExtraccion.MaximaInclinacionCabezaLados;
                _biometricClient.FacesMaximalYaw = parametrosExtraccion.MaximoAnguloGiroCabeza;
                _biometricClient.FacesMinimalInterOcularDistance = parametrosExtraccion.DistanciaMinimaEntreOjos;
                _biometricClient.FacesQualityThreshold = parametrosExtraccion.FaceQualityThreshold;
                _biometricClient.FacesTemplateSize = parametrosExtraccion.SizeOfTemplate == TemplateSize.Compact ? NTemplateSize.Compact :
                    parametrosExtraccion.SizeOfTemplate == TemplateSize.Small ? NTemplateSize.Small :
                    parametrosExtraccion.SizeOfTemplate == TemplateSize.Medium ? NTemplateSize.Medium : NTemplateSize.Large;
                _biometricClient.FacesLivenessMode = parametrosExtraccion.LivenessCheckMode == FaceExtractionParameters.LivenessMode.None ? NLivenessMode.None :
                    parametrosExtraccion.LivenessCheckMode == FaceExtractionParameters.LivenessMode.Active ? NLivenessMode.Active :
                    parametrosExtraccion.LivenessCheckMode == FaceExtractionParameters.LivenessMode.Passive ? NLivenessMode.Passive :
                    parametrosExtraccion.LivenessCheckMode == FaceExtractionParameters.LivenessMode.PassiveAndActive ? NLivenessMode.PassiveAndActive : NLivenessMode.Simple;

                _biometricClient.FacesDetermineGender = parametrosExtraccion.DeterminarGenero;
                _biometricClient.FacesRecognizeEmotion = parametrosExtraccion.ReconocerEmociones;
                _biometricClient.FacesRecognizeExpression = parametrosExtraccion.ReconocerExpresiones;
                _biometricClient.FacesDetectProperties = parametrosExtraccion.DetectarPropiedades;

                var face = new NFace
                    CaptureOptions = NBiometricCaptureOptions.Manual | NBiometricCaptureOptions.Stream
                _subject = new NSubject();
                if (parametrosExtraccion.LivenessCheckMode != FaceExtractionParameters.LivenessMode.None)
                    _subject.IsMultipleSubjects = false;
                    _subject.IsMultipleSubjects = true;
                facesView.Face = face;

                _biometricClient.UseDeviceManager = true;
                //The Following line is where the error appears
                _biometricClient.BeginCapture(_subject, OnCapturingCompleted, null);
            catch (ArgumentException ex)
                Trace.WriteLine ($"Argument Exception {ex}");
                if (OnCameraCaptureCompleted != null)
                    OnCameraCaptureCompleted(ExtractionStatus.Error, null);
            catch (Exception ex)
                Trace.WriteLine($"Exception {ex}");

The error automatically closes the application. It doesn't get to the catch section. The camera works fine on other windows applications.

Can you please help me to solve this issue. It works fine on most Windows 10 machines, but there are a couple of them that have this issue?
Posts: 3
Joined: Nov 08, 2017 02:31

Re: Error Initilaizing Camera

Postby MartynasV » Dec 05, 2017 13:46


First, make sure that you have latest SDK version(revision:171427 version:10 release date:2017/10/25) downloaded.
Then extract SDK from zip package and run "SDK\Bin\Win32_x86\SimpleFacesSampleCS.exe", go to "Enroll from camera" tab and try to capture. Also make sure that no other program is using camera, because other programs can block access to camera.

What cameras you are using?
Please provide SDK revision number(can be found in SDK root directory, in Revision.txt file).
Martynas V
Posts: 264
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Re: Error Initilaizing Camera

Postby gtoledo » Dec 05, 2017 18:50


I'm using a logitech c920

I was using the version 9 of your SDK. With version 10 seems to work fine so far.

Posts: 3
Joined: Nov 08, 2017 02:31

Return to Public

Who is online

Users browsing this forum: No registered users and 4 guests