ZKTECO - SDK - SDANDALONE - ENROLL ONLINE

I cannot enroll face via C# application. I can enroll directly in the device and I can access the enrolled face using the function GetUserFaceStr. I could do fingerprint enrollment from c# application. But device not responding to face enrollment. I'm using dll from standalone+sdk-6.3.1.37-doc-2.1.0-demo-1.1.15.In the demo application, I cannot find any code for enrolling face. In the SDK changelog.txt file, its mentioned 2017-07-13: 1.StartEnrollEx support face online registration.

But the function StartEnrollEx takes FingerID as a parameter. Any help would be appreciated. Thanks in advance

Upvotes: 2

Views: 3079

Answers (2)

Umair Rasheed
Umair Rasheed

Reputation: 448

public bool StartEnroll_face(string sIp = "192.168.1.201", int iPort = 4370, int iMachineNumber = 1, string userid = "", int fingureindex = 0)
    {
        //Create Standalone SDK class dynamicly.
        zkemkeeper.CZKEM axCZKEM1 = new zkemkeeper.CZKEM();
        axCZKEM1.Connect_Net(sIp, iPort);

        int idwErrorCode = 0;

        string sUserID = userid;
        int iFingerIndex = fingureindex;
        // if finger index is 111 then it will save image on device
        int iFlag = 0;

        axCZKEM1.CancelOperation();
        axCZKEM1.DelUserFace(iMachineNumber, sUserID, iFingerIndex);
        axCZKEM1.RefreshData(1);//the data in the device should be refreshed
        if (axCZKEM1.StartEnrollEx(sUserID, iFingerIndex, iFlag))
        {
            MessageBox.Show("Start to Enroll a new User,UserID=" + sUserID + " Face ID=" + iFingerIndex.ToString() + " Flag=" + iFlag.ToString(), "Start");
            iCanSaveTmp = 1;
            axCZKEM1.StartIdentify();//After enrolling templates,you should let the device into the 1:N verification condition
            axCZKEM1.RefreshData(1);//the data in the device should be refreshed
            startenroll_retult = true;
        }
        else
        {
            axCZKEM1.GetLastError(ref idwErrorCode);
            MessageBox.Show("Operation failed,ErrorCode=" + idwErrorCode.ToString(), "Error");
            startenroll_retult = false;
        }
        axCZKEM1.Disconnect();
        return startenroll_retult;
    }

Now Call the Function

 if (StartEnroll_face("192.168.1.201", 4370, 1, txt_id_memb.Text,111))
        {
            // finger index 111 means register face of user
            MessageBox.Show("Face Registered!");
            
        }

Upvotes: 1

Ravanan
Ravanan

Reputation: 586

They support only badge/card enrollment and fingerprint enrollment through the SDK. For the Face enrollment, while trying with zkteco.com' support, they suggested to use the menu options for the face/palm enrollments haven't answer directly if the face enrollment SDK is there are not. So, we can assume that either it is not available or it has some issue.

Upvotes: 0

Related Questions