At present, we are docking testing the functions of different AI devices. In this paper, WE will share the process of CHANNEL or library distribution control of DAhua AI devices.

Definition Description:

Channel as the object of control, that is, a channel can control one or more face library. Take the library as the object to control, that is, a face library can control one or more channels.

Both ways are for the face library layout control.

Process steps

Step 1 Call CLIENT_Init to complete the SDK initialization process. Step 2 After the initialization is successful, call CLIENT_LoginEx2 to log in to the device. Step 3 Select different face library control modes

  • Monitor on the library choose library as the object, called CLIENT_FaceRecognitionPutDisposition to monitor business after use of library, call CLIENT_FaceRecognitionDelDisposition to withdraw control library
  • Channel control If a channel is selected, call CLIENT_SetGroupInfoForChannel to control the channel

Step 4 After the service is used, call CLIENT_Logout to log out of the device. Step 5 After the SDK function is used, call CLIENT_Cleanup to release SDK resources

Pay attention to

Channel as the object or to the library as the object of control are face database control. Channel as the object of control, you can deploy multiple face libraries to a channel. A human face library can be deployed on multiple channels when the library is deployed as an object. CLIENT_SetGroupInfoForChannel Interface CLIENT_SetGroupInfoForChannel interface CLIENT_SetGroupInfoForChannel interface CLIENT_SetGroupInfoForChannel interface CLIENT_SetGroupInfoForChannel interface CLIENT_SetGroupInfoForChannel interface CLIENT_SetGroupInfoForChannel Interface CLIENT_SetGroupInfoForChannel Interface CLIENT_SetGroupInfoForChannel Interface With the latest control configuration. The control withdrawal operation is to move the empty configuration down. From control, on the library interface CLIENT_FaceRecognitionDelDisposition to parts of the face has deployed channel make removal, such as: Face library has been deployed in three channels, when the withdrawal of its deployment channel of two channels withdrawal, the remaining channel remains unchanged.

Reference code

// Enter parameters NET_IN_SET_GROUPINFO_FOR_CHANNEL stInChannelDeploy = {sizeof(NET_IN_SET_GROUPINFO_FOR_CHANNEL)}; stInChannelDeploy.nChannelID = 0; stInChannelDeploy.nGroupIdNum = 2; / / the number of need in the channel configuration face library strncpy (stInChannelDeploy. SzGroupId [0], strGroupId1, DH_COMMON_STRING_64-1); / / of face library ID copy strncpy (stInChannelDeploy. SzGroupId [1], strGroupId2, DH_COMMON_STRING_64-1); StInChannelDeploy. NSimilaryNum = 2; / / similarity threshold number, the same as the number of sets of personnel stInChannelDeploy. NSimilary [0] = 85; / / the first face to face library similarity threshold stInChannelDeploy. NSimilary [1] = 90; NET_OUT_SET_GROUPINFO_FOR_CHANNEL stOutChannelDeploy = {NET_OUT_SET_GROUPINFO_FOR_CHANNEL sizeof(NET_OUT_SET_GROUPINFO_FOR_CHANNEL)}; BOOL bRet = CLIENT_SetGroupInfoForChannel(lLoginHandle, &stInChannelDeploy, &stOutChannelDeploy); if (flase == bRet) { printf("CLIENT_SetGroupInfoForChannel: failed! Error code: %x.\n", CLIENT_GetLastError()); } // If (NULL! = lRealHandle) { memset(stInChannelDeploy, 0, sizeof(NET_IN_SET_GROUPINFO_FOR_CHANNEL)); memset(stOutChannelDeploy, 0, sizeof(NET_OUT_SET_GROUPINFO_FOR_CHANNEL)); stInChannelDeploy.dwSize = sizeof(NET_IN_SET_GROUPINFO_FOR_CHANNEL); stOutChannelDeploy.dwSize = sizeof(NET_OUT_SET_GROUPINFO_FOR_CHANNEL); CLIENT_SetGroupInfoForChannel(lLoginHandle, &stInChannelDeploy, &stOutChannelDeploy); }Copy the code