Issue with Canon EOS M50

General information about Neurotechnology and its software

Issue with Canon EOS M50

Postby da9el » Sep 13, 2019 09:19

I"m trying to capture a still image from Canon EOS M50, the picture is taken but never I do not get the callback when using NBiometricClient. If I use NBiometricDevice, the callback happens.

When running with NBIometricClient, I"m running an asynch task that isn"t completed, with NBiometricDevice there is no task running.

Code is rougly like

Code: Select all
            BiometricClient = new NBiometricClient
            {
                BiometricTypes = NBiometricType.Face,
                UseDeviceManager = true,
                FacesCheckIcaoCompliance = true
            };
            BiometricClient.Initialize();

            DeviceManager = new NDeviceManager
            {
                DeviceTypes = NDeviceType.Camera,
                AutoPlug = true
            };

            DeviceManager.Initialize();
            automatedCamera = (NCamera)DeviceManager.Devices[1];
            automatedCamera.StillCaptured += Device_StillCaptured;
            BiometricClient.FacesTemplateSize = NTemplateSize.Small;
            BiometricClient.FaceCaptureDevice = automatedCamera;
            faceView.ShowAge = true;
            rec = new Rectangle(0, 0, faceView.Width, faceView.Height);

            face = new NFace
            {
                CaptureOptions = NBiometricCaptureOptions.Stream
            };

            subject = new NSubject();
            subject.Faces.Add(face);
            faceView.Face = face;

            NBiometricTask task = BiometricClient.CreateTask(NBiometricOperations.Capture | NBiometricOperations.Segment | NBiometricOperations.CreateTemplate, subject);
            try
            {
                NBiometricTask performTask = await BiometricClient.PerformTaskAsync(task);
                OnCapturingCompleted(performTask);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }


Then in a button I just call
Code: Select all
NGui.InvokeAsync(delegate {
   automatedCamera.CaptureStill();
});


Device_StillCaptured just have a breakpoint inside.

If I run this with only using the Devicemanager and not the biometricclient. Then the stillcapture event returns fine.

Any help in what I"m doing wrong would be much appriciated.
da9el
 
Posts: 3
Joined: Sep 13, 2019 08:55

Re: Issue with Canon EOS M50

Postby da9el » Sep 17, 2019 13:01

I"ve reproduced this inside your SimpleFaceSampleCS demo.

Where I change the following code inside CaptureIcaoCompliantImages.cs

From:
Code: Select all
private void BtnForceClick(object sender, EventArgs e)
{
   _biometricClient.Force();
}


To:
Code: Select all
private void BtnForceClick(object sender, EventArgs e)
{
   _biometricClient.FaceCaptureDevice.StillCaptured += FaceCaptureDevice_StillCaptured;
   _biometricClient.FaceCaptureDevice.CaptureStill();
}

private void FaceCaptureDevice_StillCaptured(object sender, NCameraStillCapturedEventArgs e)
{
   Console.WriteLine("Callback!");
}


I run the code and press "Force" button, there is no callback to FaceCaptureDevice_StillCaptured
da9el
 
Posts: 3
Joined: Sep 13, 2019 08:55

Re: Issue with Canon EOS M50

Postby da9el » Sep 18, 2019 12:10

Solved it by keeping devices seperate from biometric client, thus getting the stillcapture.
da9el
 
Posts: 3
Joined: Sep 13, 2019 08:55


Return to Public

Who is online

Users browsing this forum: No registered users and 6 guests