Manage Face Information

If you want to access by face, you should add face picture and link the face picture with the card for getting the access permissions, and then apply face information to access control device.

  • Make sure you have called NET_DVR_Init to initialize the development resources.

  • Make sure you have called NET_DVR_Login_V40 to log in to device.

  • Make sure the card information linked with the face picture is applied, refer to Manage Card Information for details.

Figure 1 Programming Flow of Managing Face Information

  1. Call NET_DVR_GetDeviceAbility, specify the capability type (dwAbilityType) to "ACS_ABILITY" (macro definition value: 0x801), and set the condition buffer (pCondBuffer) to the message XML_Desc_AcsAbility for getting access control capability to check if managing face information is supported by device.

    The access control capability is returned in the message XML_AcsAbility by the output buffer (pOutBuffer).

    If the node <FaceParam> is returned in the message, it indicates that managing face information is supported by device, and you can perform the following steps.

    Otherwise, managing face information is not supported, please end this task.

  2. Perform the following operation(s) to get or apply face information.
    Option Description

    Get Face Information

    Call NET_DVR_StartRemoteConfig with NET_DVR_GET_FACE_PARAM_CFG (command No.: 2507) and set the input buffer (lpInBuffer) to NET_DVR_FACE_PARAM_COND for setting up persistent connection and setting callback function (fRemoteConfigCallback).

    Note:

    The face information is returned in the structure NET_DVR_FACE_PARAM_CFG by the output buffer (lpBuffer) of callback function.

    Apply Face Information

    1. Call NET_DVR_StartRemoteConfig with NET_DVR_SET_FACE_PARAM_CFG (command No.: 2508) and set input buffer (lpInBuffer) to NET_DVR_FACE_PARAM_COND for setting up persistent connection and setting callback function (fRemoteConfigCallback).

    2. Call NET_DVR_SendRemoteConfig, specify data type (dwDataType) to "ENUM_ACS_INTELLIGENT_IDENTITY_DATA", and set sending buffer (pSendBuf) to NET_DVR_FACE_PARAM_CFG for applying the face information.

      Note:

      The applying status is returned by the output buffer (lpBuffer) of callback function.

  3. Call NET_DVR_StopRemoteConfig to disconnect the persistent connection.

Call NET_DVR_Logout and NET_DVR_Cleanup to log out and release the resource.