During people counting, the number of entered or exited children can be
counted according to the height feature which differs from that of adult for more accurate
statistics. The children counting results can also be shown on the people counting
report.
Figure 1 Programming Flow of
Enabling Counting Children
-
Call NET_DVR_STDXMLConfig to pass through the request URL: GET
/ISAPI/System/Video/inputs/channels/<ID>/counting/capabilities for getting people counting capability to check
if counting children is supported.
The people counting capability is returned in the message XML_CountingCap by lpOutputParam.
If supports, the node <ChildFilter> is returned, and then you can perform the
following steps; otherwise, it indicates that counting children is not
supported, please end this task.
- Optional:
Call NET_DVR_STDXMLConfig to pass through the request URL: GET
/ISAPI/System/Video/inputs/channels/<ID>/counting for getting default or configured people
(including children) counting parameters for reference.
The people (including children) counting parameters are returned in the
message XML_Counting by lpOutputParam.
-
Call NET_DVR_STDXMLConfig to pass through the request URL: PUT
/ISAPI/System/Video/inputs/channels/<ID>/counting and set lpInputParam to XML_Counting (set <enabled> of <ChildFilter> in message to "true") for enabling counting
children.
-
Set lCommand of alarm/event callback function MSGCallBack to "COMM_ALARM_PDC" (command No.: 0x1103) for automatically
uploading children counting data by the structure NET_DVR_PDC_ALRAM_INFO in arming mode (refer to Receive Alarm/Event in Arming Mode for details) or listening mode (refer to Receive Alarm/Event in Listening Mode for details) when counting children is enabled.
- Optional:
Search and get children counting report.
-
Call NET_DVR_STDXMLConfig to pass through the request URL: GET
/ISAPI/System/Video/inputs/channels/<ID>/counting/search/capabilities for getting people counting report
capability to check if children counting report is supported.
The people counting report capability is returned in the
message XML_CountingSearchCap by lpOutputParam.
If supports, the node <isSupportChild> is returned and its value is
"true", and then you can perform the following step; otherwise, it
indicates that children counting report is not supported, please end
this task.
-
Call NET_DVR_StartRemoteConfig with NET_DVR_GET_PDC_RESULT (command No.: 5089) and
set lpInBuffer to NET_DVR_PDC_QUERY_COND for setting up persistent connection, enabling
children counting data search, and setting callback function to receive
search result.
The children counting data and report are returned in
the structure NET_DVR_PDC_RESULT by the configured callback
function.
- Optional:
Call NET_DVR_GetRemoteConfigState to get persistent connection status.
-
Call NET_DVR_StopRemoteConfig to stop children counting data search and disconnect
the persistent connection.
Call NET_DVR_Logout and NET_DVR_Cleanup to log out from device and release the resources.