I use Neurotec SDK to develop an application by C# (window form application)
Function is:
- create subject
- create face and assign to a faceview.
- capture a face and identify via Neuro Server.
When i run, sometime it throw Access violation exception and crash (Cannot try/catch this exception).
This is my code
- Code: Select all
//create client
NBiometricClient _biometricClient = new NBiometricClient { BiometricTypes = NBiometricType.Face, UseDeviceManager = true };
NClusterBiometricConnection nClusterBiometricConnection = new NClusterBiometricConnection(ConfigureObject.SERVER_IP, ConfigureObject.CLIENT_PORT, ConfigureObject.ADMIN_PORT);
_biometricClient.RemoteConnections.Add(nClusterBiometricConnection);
_biometricClient.Initialize();
//create subject
NSubject _subject = new NSubject();
NFace _face = new NFace { CaptureOptions = NBiometricCaptureOptions.Stream };
facesView.Face = _face;
_subject.Faces.Add(_face);
var status = _biometricClient.Capture(_subject); //It crash here.
if (status == NBiometricStatus.Ok) {
NBiometricStatus status2 = _biometricClient.Identify(_subject);
}
- The code run under BackgroundWorker.
- I use visual sudio 2017, build under x86, .Net Framework 4.6.1
- Lastest neuro sdk.
Please give to me some suggest.
Thanks