Ship flow detection can calculate the amount of ships passing through a predefined area, and triggers an alarm when the ship crosses the predefined line. It is widely applied to river monitoring under severe weather conditions, such as heavy rain, heavy fog, and so on.
Make sure you have called NET_DVR_Init to initialize the development environment.
Make sure you have called NET_DVR_Login_V40 to log in to the device.
The thermal capability is returned in the message XML_ThermalCap by lpOutBuffer.
If supports, the node <isSupportShipsDetectionWithScene> is returned in the message and its value is "true", and then you can perform the following steps.
Otherwise, ship detection by scene is not supported by device, please end this task.
The ship detection capability is returned in the message JSON_shipsDetectionCap by lpOutBuffer.
The basic configuration capability of ship detection is returned in the message JSON_basicParamCap by lpOutBuffer.
The basic parameters of ship detection are returned in the message JSON_basicParam by lpOutBuffer.
The scene configuration capability is returned in the message JSON_ShipsDetectionSceneCap by lpOutBuffer.
The parameters of a or all scene(s) are returned in the message JSON_ShipsDetectionScene or JSON_ShipsDetectionSceneList by lpOutBuffer.
Option | Description |
---|---|
Switch Scene |
Call NET_DVR_STDXMLConfig to transmit the request URI: PUT /ISAPI/Thermal/channels/<ID>/shipsDetection/<SID>/goto?format=json |
Scene Auto-Switch |
|
Capture Ratio |
|
Advanced Configuration |
|
The function mode capability is returned in the message JSON_Cap_functionMode by lpOutBuffer.
The function mode is returned in the message JSON_functionMode by lpOutBuffer.
The rule configuration capability of ship flow detection is returned in the message JSON_ShipFlowDetectionRuleListCap by lpOutBuffer.
The rules of a or all ship flow detection(s) are returned in the message JSON_ShipFlowDetectionRule or JSON_ShipFlowDetectionRuleList by lpOutBuffer.
Before setting arming schedule, you can transmit this URI by GET method to get default or configured arming schedule for reference.
Before setting linkage action, you can transmit this URI by GET method to get default or configured linkage actions for reference.
To receive the alarm via platform, the linkage action must be set to "center".
Option | Description |
---|---|
Get Ship Statistics by Scene |
Call NET_DVR_STDXMLConfig to transmit the request URI: GET /ISAPI/Thermal/channels/<ID>/shipsDetection/<SID>/shipsDetectionCount?format=json |
Clear Ship Statistics by Scene |
Call NET_DVR_STDXMLConfig to transmit the request URI: PUT /ISAPI/Thermal/channels/<ID>/shipsDetection/<SID>/resetCount?format=json |
Receive Alarm in Arming or Listening Mode |
Perform the flow of Receive Alarm/Event in Arming Mode or Receive Alarm/Event in Listening Mode and set lCommand in the registered alarm callback function (MSGCallBack) to "COMM_ALARM_SHIPSDETECTION" (command No.: 0x4521). Note:
The ship flow detection alarm information is returned in the structure NET_DVR_SHIPSDETECTION_ALARM by pAlarmInfo of alarm callback function. |
Call NET_DVR_Logout and NET_DVR_Cleanup to log out and release the resources.