Skip to content
This SDK only works with devices released within the past 3 years. We regularly optimize and update the SDK to ensure compatibility and performance. We do not guarantee compatibility or provide technical support for devices older than 3 years.

# NET_SDK_FaceMatchOperate

### Interface Definition

C++C#

    1
    2
    3
    4
    5
    6
    7
    8
    BOOL NET_SDK_FaceMatchOperate(
        LONG lUserID,
        DWORD dwCommand,
        LPVOID lpInBuffer,
        DWORD dwInBufferSize,
        LPVOID lpOutBuffer,
        DWORD dwOutBufferSize,
        LPDWORD lpBytesReturned);

    1
    2
    3
    4
    5
    6
    7
    8
    public static extern bool NET_SDK_FaceMatchOperate(
        Int32 lUserID,
        int dwCommand,
        IntPtr lpInBuffer,
        UInt32 dwInBufferSize,
        IntPtr lpOutBuffer,
        UInt32 dwOutBufferSize,
        ref uint lpBytesReturned);

### Function Description

Face comparison related operations. Including: whether face comparison is supported, face target group management, face target management, comparison alarm configuration, and obtaining target data.

### Parameter Description

Parameters | Type | Remark
--- | --- | ---
lUserIDin | LONG | User ID, the return value of `NET_SDK_Login` or `NET_SDK_LoginEx`.
dwCommandin | DWORD | Command type, refer to `NET_SDK_FACE_MATCH_OPERATE_TYPE`.
lpInBufferin | LPVOID | Pointer to the buffer where data is sent.
dwInBufferSizein | DWORD | The length of the buffer for sending data (in bytes).
lpOutBufferout | LPVOID | Pointer to the buffer where data is received.
dwOutBufferSizein | DWORD | The length of the receive data buffer in bytes.
lpBytesReturnedout | LPDWORD | Pointer to the actual received data length, no greater than dwOutBufferSize.

### Return Value

- Type：BOOL

- Remark：Returns TRUE if successful, FALSE if failed.

### Remarks

Different acquisition functions correspond to different structures and command numbers, as shown in the following table:

Note

IPC only supports commands: NET_SDK_GET_FACE_MATCH_SUPPORT, NET_SDK_ADD_FACE_IPC, NET_SDK_DEL_FACE_IPC, NET_SDK_EDIT_FACE_IPC, NET_SDK_GET_FACE_IPC_LIST.

dwCommand macro definition | dwCommand corresponding value | dwCommand meaning | Send data | Receive data
--- | --- | --- | --- | ---
NET_SDK_GET_FACE_MATCH_SUPPORT | 0x01 | Support face matching | NULL | DWORD
NET_SDK_GET_FACE_INFO_GROUP_LIST | 0x02 | Get target group list | NULL | `NET_SDK_FACE_INFO_GROUP_ITEM`*num
NET_SDK_ADD_FACE_INFO_GROUP | 0x03 | Add target group | `NET_SDK_FACE_INFO_GROUP_ADD` | NULL
NET_SDK_SET_FACE_INFO_GROUP | 0x04 | Edit target group | `NET_SDK_FACE_INFO_GROUP_ITEM` | NULL
NET_SDK_DEL_FACE_INFO_GROUP | 0x05 | Delete target group | `NET_SDK_FACE_INFO_GROUP_DEL` | NULL
NET_SDK_GET_FACE_INFO_LIST | 0x06 | Get target list | `NET_SDK_FACE_INFO_LIST_GET` | `NET_SDK_FACE_INFO_LIST`
NET_SDK_ADD_FACE_INFO | 0x07 | Add target | `NET_SDK_FACE_INFO_ADD` | NULL
NET_SDK_SET_FACE_INFO | 0x08 | Edit target | `NET_SDK_FACE_INFO_EDIT` | NULL
NET_SDK_DEL_FACE_INFO | 0x09 | Delete target | `NET_SDK_FACE_INFO_DEL` | NULL
NET_SDK_GET_FACE_MATCH_ALARM | 0x0A | Get matching alarm linkage | NULL | `NET_SDK_FACE_MATCH_ALARM`
NET_SDK_SET_FACE_MATCH_ALARM | 0x0B | Set matching alarm linkage | `NET_SDK_FACE_MATCH_ALARM` | NULL
NET_SDK_GET_FACE_INFO_IMG | 0x0C | Get target data | `NET_SDK_FACE_INFO_IMG_GET` | `NET_SDK_FACE_INFO_IMG_DATA`
NET_SDK_SEARCH_IMAGE_BY_IMG | 0x0D | Search by image | `NET_SDK_SEARCH_IMAGE_BY_IMAGE` | `NET_SDK_SEARCH_IMAGE_BY_IMAGE_LIST`
NET_SDK_SEARCH_CH_SNAP_FACE_IMG_LIST | 0x0E | Query channel face list | `NET_SDK_CH_SNAP_FACE_IMG_LIST_SEARCH` | `NET_SDK_CH_SNAP_FACE_IMG_LIST`
NET_SDK_SEARCH_CH_SNAP_FACE_IMG | 0x0F | Query channel face image data | `NET_SDK_FACE_IMG_INFO_CH` | `NET_SDK_FACE_INFO_IMG_DATA`
NET_SDK_ADD_FACE_IPC | 0x10 | IPC add face | `NET_SDK_IVE_FACE_MATCH_ADD_ALBUM_INFO` + face image | `NET_SDK_NET_REPLY_RESULT`
NET_SDK_DEL_FACE_IPC | 0x11 | IPC delete face | `NET_SDK_IVE_FACE_MATCH_DELE_ALBUM_INFO` | `NET_SDK_NET_REPLY_RESULT`
NET_SDK_EDIT_FACE_IPC | 0x12 | IPC edit face | `NET_SDK_IVE_FACE_MATCH_MODIFY_ALBUM_INFO` + face image (not transmitted if not modified) | `NET_SDK_NET_REPLY_RESULT`
NET_SDK_GET_FACE_IPC_LIST | 0x13 | IPC get face list | `NET_SDK_IVE_FACE_MATCH_QUERY_ALBUM_INFO` | total (int32: total number of matches to query criteria) + num (int3, number of result entries returned this time) + `NET_SDK_IVE_FACE_MATCH_QUERY_ALBUM_REPLY_INFO`*num
NET_SDK_COPY_FACE_INFO | 0x14 | Copy face information | `NET_SDK_FACE_INFO_COPY` | NULL
NET_SDK_SEARCH_IMAGE_BY_IMG_V2 | 0x15 | Search by image V2 | `NET_SDK_SEARCH_IMAGE_BY_IMAGE_V2` | `NET_SDK_CH_SNAP_FACE_IMG_LIST`
NET_SDK_SEARCH_SMART_TARGET_LIST | 0x16 | Search target list | `NET_SDK_SEARCH_SMART_TARGET` | `NET_SDK_SMART_TARGET_SNAP_IMG_LIST`
NET_SDK_SEARCH_SMART_TARGET_IMG | 0x17 | Search target image | `NET_SDK_SMART_TARGET_SNAP_IMG` | `NET_SDK_FACE_INFO_IMG_DATA`
NET_SDK_GET_FACE_IMG_STATISTIC_V2 | 0x18 | Get face image statistics v2 | `NET_SDK_FACE_IMG_STATISTIC_V2` | `NET_SDK_FACE_IMG_STATISTIC_RESULT_LIST`
NET_SDK_GET_FACE_INFO | 0x19 | Get face information | `NET_SDK_FACE_INFO_LIST_GET` | `NET_SDK_FACE_INFO_LIST`

Error Code