You are on page 1of 28

Table of Contents

1 Integration Summary ................................................................................................................ 3


1.1 Common functions ........................................................................................................ 3
1.2 Special functions ........................................................................................................... 3
2 Integration Architecture ............................................................................................................ 3
3 Integration method ................................................................................................................... 4
3.1 SDK ................................................................................................................................ 4
3.2 ISAPI .............................................................................................................................. 4
4 Live view .................................................................................................................................... 4
4.1 Description .................................................................................................................... 4
4.2 WEB interface ................................................................................................................ 4
4.3 Intgration method ......................................................................................................... 5
4.3.1 Live view ............................................................................................................ 5
4.3.2 Recording........................................................................................................... 5
4.3.3 Capture in live view ........................................................................................... 6
4.3.4 Voice control ..................................................................................................... 6
4.3.5 PTZ control ........................................................................................................ 6
5 Playback .................................................................................................................................... 7
5.1 Description .................................................................................................................... 7
5.2 WEB interface ................................................................................................................ 7
5.3 Integration method ....................................................................................................... 8
5.3.1 Playback by time ............................................................................................... 8
5.3.2 Playback by file name ........................................................................................ 8
6 Download .................................................................................................................................. 9
6.1 Description .................................................................................................................... 9
6.2 WEB interface ................................................................................................................ 9
6.3 Integration method ..................................................................................................... 10
6.3.1 Download by time ........................................................................................... 10
6.3.2 Download by file name ................................................................................... 10
7 Event........................................................................................................................................ 11
7.1 Basic event .................................................................................................................. 11
7.2 Smart Event ................................................................................................................. 13
7.2.1 Intrusion detection .......................................................................................... 13
7.2.2 Line Crossing Detection ................................................................................... 15
7.2.3 Region Entrance/Exiting Detection ................................................................. 16
8 Face comparison ..................................................................................................................... 18
8.1 Description .................................................................................................................. 18
8.2 Face compariosn procedure ........................................................................................ 18
8.3 Integration method ..................................................................................................... 18
9 Frequency of people ............................................................................................................... 21
9.1 Description .................................................................................................................. 21
9.2 WEB interface configuration ....................................................................................... 21
9.3 Integration method ..................................................................................................... 22
10 Face capture .................................................................................................................... 23
10.1 Description .................................................................................................................. 23
10.2 WEB interface configuration ....................................................................................... 23
10.3 Integration method ..................................................................................................... 23
11 Vehicle Detection ............................................................................................................ 25
11.1 Description .................................................................................................................. 25
11.2 WEB interface configuration ....................................................................................... 26
11.3 Integration method ..................................................................................................... 26
12 Face picture library .......................................................................................................... 27
12.1 Description .................................................................................................................. 27
12.2 WEB interface .............................................................................................................. 27
12.3 Integration method ..................................................................................................... 27
12.3.1 Face library management ................................................................................ 27
12.3.2 Face library picture management ................................................................... 28
12.3.3 Search the picture ........................................................................................... 28
1 Integration Summary

1.1 Common functions


 Live view
 Playback
 Download
 Event

1.2 Special functions


 Face capture
 Face comparison
 Frequency of people
 Vehicle detection
 Face picture library

2 Integration Architecture

IP Camera WEB broswer

Integration

IP Camera
Third part VMS

IP Camera

Deepinmind NVR
(iDS-9632NXI-I8/4F)
3 Integration method

3.1 SDK
The device network SDK is developed based on private network communication protocol,
and it is designed for the remote connection and configuration of embedded DVR, Encoder,
IPC and the other IP devices.

3.2 ISAPI
ISAPI is a kind of Hikvision protocol, based on HTTP. It is available to all kinds of platforms,
such as console application, web application and so on.

4 Live view

4.1 Description
Live view is common function for the device. It is easy for you to get live view stream from
the device and display on your platform. During the live view process, you can also realize
other function, such as recoding, capture, voice control, etc.

4.2 WEB interface


4.3 Intgration method

Start live view

Voice control
Real-time data callback and
recording

Capture in live view


PTZ control

Stop live view

4.3.1Live view
1) SDK Integration
SDK interface Description
NET_DVR_RealPlay_V40 Start live view
NET_DVR_StopRealPlay Stop live view

2) ISAPI integration
Please use RTSP URL below to get live view stream.
URL:rtsp://<address>:<port>/Streaming/Channels/<id>(?parm1=value1&parm2-
=value2…)

Remark: There are many channels in the device. For the SDK integration, the starting
channel number starts from N, while for ISAPI integration, the starting number starts from 1. So
please choose the one you want for the control.

4.3.2Recording
1) SDK integration
SDK interface Description
NET_DVR_SaveRealData Video file in PS package format
NET_DVR_SaveRealData_V30 PS package format or 3GPP package format is
selectable
2) ISAPI integration
ISAPI doesn’t support recording function.

4.3.3Capture in live view


1) SDK integration
SDK interface Description
NET_DVR_SetCapturePictureMode Set capture mode, BMP or JPEG
NET_DVR_CapturePictureBlock_New Blocking capture and the data will be stored
in the cache
NET_DVR_CapturePictureBlock Blocking capture and directly saved as file
NET_DVR_CapturePicture non-blocking capture and directly saved as
file

2) ISAPI integration
Call URL below to get a snapshot from a specified channel.
ISAPI command: /ISAPI/Streaming/channels/<ID>/picture

4.3.4Voice control
For video and audio stream, call the voice control API to turn on or off the audio, and adjust volume.
1) SDK integration

SDK interface Description


NET_DVR_OpenSound Open sound under exclusive sound card mode
NET_DVR_CloseSound Close sound under exclusive sound card mode
NET_DVR_OpenSoundShare Open sound under shared sound card mode
NET_DVR_CloseSoundShare Close sound on share sound card mode
NET_DVR_Volume Adjust playing volume

2) ISAPI integration
Call URL below to control the voice from a specified channel.
ISAPI command: /ISAPI/System/TwoWayAudio/channels/ID

4.3.5 PTZ control


1) SDK integration

SDK interface Description


NET_DVR_PTZControl Control PTZ
NET_DVR_PTZPreset Control PTZ preset
NET_DVR_PTZCruise Control PTZ patrol
NET_DVR_TransPTZ Set transparent PTZ control
NET_DVR_PTZTrack Realize PTZ pattern operation

Remark: For more detailed information, please refer to the SDK manual.

2) ISAPI integration
Please refer to HIKVISION ISAPI_2.0-PTZ Service.pdf for the ISAPI integration.

5 Playback

5.1 Description
This section explains how to view the remotely recorded video files stored in the network
disks (NAS) or memory cards.

5.2 WEB interface


5.3 Integration method

Search video files

Playback by time Playback by file name

Start play back

Stop play back

5.3.1Playback by time
1) SDK integration
Step1: Call NET_DVR_PlayBackByTime_V40 to start playback according to the time
period with videos in the specified time range.
Step2: Call NET_DVR_PlayBackControl_V40 (command: NET_DVR_PLAYSTART) to
control the start of playback.

2) ISAPI integration
Please use URL below for the integration.
rtsp://<address>:<port>/Streaming/tracks/<id>(?parm1=value1&parm2-=value2…)

5.3.2Playback by file name


1) SDK integration

Step1: Call related APIs to obtain file name.


Step2: Call NET_DVR_PlayBackByName to start playback by file name.
Step3: Call NET_DVR_PlayBackControl_V40 (command: NET_DVR_PLAYSTART) to
control the start of playback.

2) ISAPI integration
ISAPI doesn’t support playback by file name.
6 Download

6.1 Description

This section explains how to download the remotely recorded video files stored in the
network disks (NAS) or memory cards.

6.2 WEB interface


6.3 Integration method

Search video files

Download by time Download by file name

Start downloading

Stop downloading

6.3.1Download by time
1) SDK integration
Step1: Call NET_DVR_GetFileByTime_V40 to start downloading according to the time
period with videos in the specified time range.
Step2: Call NET_DVR_PlayBackControl_V40 (command: NET_DVR_PLAYSTART) to
control the start of download.

2) ISAPI integration
ISAPI doesn’t support download by time

Remark: When download by time, the user can specify the start time and end time without
calling API to search video files. The progress between 0 to 100 is not supported, and
progress configuration is also not supported.

6.3.2 Download by file name


1) SDK integration
Step1: Call related APIs to obtain file name.
Step2: Call NET_DVR_GetFileByName to start downloading by file name.
Step3: Call NET_DVR_PlayBackControl_V40 (command: NET_DVR_PLAYSTART) to
control the start of download.
2) ISAPI integration
Step1: Call URL /ISAPI/ContentMgmt/search/ to search video files via specificed time.
Step2: Call URL /ISAPI/ContentMgmt/download to start download by playbackURI.
Eg. playbackURI: rtsp://10.7.64.104/Streaming/tracks/101?starttime=2018-12-10 00:00:00Z&endtime=2018-12-10

17:14:54Z&name=00000000508000000&size=924151628

7 Event

7.1 Basic event


1) Description
Basic events exist in common devices , including Motion, Video Tampering , Video Loss,
Alarm Input, Alarm Output and Exception. Motion will be taken for example. It detects the
moving objects in the configured surveillance area, and triggers the certain action as a
respond to detection. In order to detect the moving objects accurately and reduce the false
alarm rate, normal configuration and expert configuration are selectable for different motion
detection environment.

2) WEB interface configuration


Configure Area Setting
Configure Arming Schedule

Configure Linkage Method

3) Integration method
SDK integration
Call NET_DVR_SetDVRMessageCallBack_V31 to set alarm callback function for receiving
and handling alarm information.
Command: COMM_ALARM_V30
Main Structure: NET_DVR_ALARMINFO_V30
Main field
Main field Remark
dwAlarmType Alarm type: 0- semaphore alarm, 1- hard
disk full, 2- video lost, 3- motion detection,
etc
dwAlarmInputNumber Alarm input port, valid when alarm type is
0 or 23
byAlarmOutputNumber The triggered alarm output port
byAlarmRelateChannel Recording channel triggered by alarm: 0-
not triggered, 1- triggered.
byChannel Alarming channel, it is valid when alarm
type is 2, 3, 6, 9, 10 or 11
byDiskNumber Alarming hard disk, it is valid when alarm
type is 1, 4, or 5

ISAPI integration
URL: GET /ISAPI/Event/notification/alertStream
Note: A connection is established with the device when this URL is called, and stays open
to constantly receive event notifications. If Heartbeat/Network timed out, platform should
call this URL to reconnect.
Main field in the returned data
Main field Remark
ipAddress IP Address. Eg. 10.7.68.11
portNo Port no. Eg. 80
dynChannelID Channel number. Eg.7
dateTime The event time
eventType VMD
eventDescription Motion alarm

7.2 Smart Event


Smart events including intrusion detection, line crossing detection, Region Entrance
detection, etc. It depends on the camera support.

7.2.1Intrusion detection

1) Description
Intrusion detection function detects people, vehicle or other objects which enter and loiter
in a pre-defined virtual region, and some certain linked actions can be taken when the
alarm is triggered.

2) WEB interface configuration

3) Integration method
SDK integration
Call NET_DVR_SetDVRMessageCallBack_V31 to set alarm callback function for
receiving and handling alarm information.
Command: COMM_ALARM_RULE
Main Structure : NET_VCA_RULE_INFO
Main field: dwEventType (VCA_INTRUSION)

ISAPI integration
URL: GET /ISAPI/Event/notification/alertStream
Note: A connection is established with the device when this URL is called, and stays open
to constantly receive event notifications. If Heartbeat/Network timed out, platform should
call this URL to reconnect.
Main field in the returned data
Main field Remark
dynChannelID Channel number
dateTime The event time
eventType Eg. fielddetection
eventDescription Eg. fielddetection alarm
detectionPictureTransType The trans type of detection pictures,eg.url
detectionPicturesNumber The number of detection pictures.Eg.1
bkgUrl The background URL
URLCertificationType The certification type of URL. Eg. digest

7.2.2Line Crossing Detection

1) Description
Line crossing detection function detects people, vehicle or other objects which cross a pre-
defined virtual line, and some certain actions can be taken when the alarm is triggered.

2) WEB interface configuration

3) Integration method
SDK integration
Call NET_DVR_SetDVRMessageCallBack_V31 to set alarm callback function for
receiving and handling alarm information.
Command: COMM_ALARM_RULE
Main Structure : NET_VCA_RULE_INFO
Main field: dwEventType (VCA_TRAVERSE_PLANE)

ISAPI integration
URL: GET /ISAPI/Event/notification/alertStream
Note: A connection is established with the device when this URL is called, and stays open
to constantly receive event notifications. If Heartbeat/Network timed out, platform should
call this URL to reconnect.
Main field in the returned data
Main field Remark
dynChannelID Channel number
dateTime The event time
eventType Eg. linedetection
eventDescription Eg. linedetection alarm
detectionPictureTransType The trans type of detection pictures,eg.url
detectionPicturesNumber The number of detection pictures.Eg.1
bkgUrl The background URL
URLCertificationType The certification type of URL. Eg. digest

7.2.3Region Entrance/Exiting Detection

1) Description
Region entrance detection function detects people, vehicle or other objects which enter a
pre-defined virtual region from the outside place. Region exiting detection function detects
people, vehicle or other objects which exit from a pre-defined virtual region. Some
certain actions can be taken when the alarm is triggered.

2) WEB interface configuration


3) Integration method
SDK integration
Call NET_DVR_SetDVRMessageCallBack_V31 to set alarm callback function for
receiving and handling alarm information.
Command: COMM_ALARM_RULE
Main Structure : NET_VCA_RULE_INFO
Main field: dwEventType (VCA_ENTER_AREA, VCA_EXIT_AREA)

ISAPI integration
URL: GET /ISAPI/Event/notification/alertStream
Note: A connection is established with the device when this URL is called, and stays open
to constantly receive event notifications. If Heartbeat/Network timed out, platform should
call this URL to reconnect.
Main field in the returned data
Main field Remark
dynChannelID Channel number
dateTime The event time
eventType Eg. regionEntrance
eventDescription Eg. regionEntrance alarm
regionID Region ID. Eg. 1
detectionPictureTransType The trans type of detection pictures,eg.url
detectionPicturesNumber The number of detection pictures.Eg.1
bkgUrl The background URL
URLCertificationType The certification type of URL. Eg. digest
8 Face comparison

8.1 Description
Face comparison function is to compare and analyze the pictures captured by camera and
pictures stored in the face picture library of device. If the similarity exceeds the configured
threshold, the captured face picture, person attributes (gender, age, wearing glass or not))
and the matched face picture, person information (name, gender, ID type, ID No., birth date
and additional information) in library will be returned.

8.2 Face compariosn procedure

8.3 Integration method


SDK integration
Call NET_DVR_SetDVRMessageCallBack_V31 to set alarm callback function for
receiving and handling alarm information.
Command: COMM_SNAP_MATCH_ALARM
Main Structure : NET_VCA_FACESNAP_MATCH_ALARM
Main field
Main field Remark
fSimilarity Similarity, range:[0.001,1]

struSnapInfo Face capture information


struBlackListInfo Blacklist information
sStorageIP IP address of storage server.
wStoragePort Port number of storage server
byMatchPicNum Matched picture number
byPicTransType Picture transfer type
dwSnapPicLen Captured picture size

ISAPI integration
URL: GET /ISAPI/Event/notification/alertStream
Note: A connection is established with the device when this URL is called, and stays open
to constantly receive event notifications. If Heartbeat/Network timed out, platform should
call this URL to reconnect.
Main field in the returned data
Main field Remark
channelID Channel number
dateTime The event time
eventType Eg. alarmResult
eventDescription Eg. alarmResult
alarmResult
URLCertificationType URL certification type.Eg.digest

Example of ISAPI event


{
"ipAddress": "10639103",
"portNo": 80,
"protocol": "HTTP",
"channelID": 2,
"dateTime": "2017-10-20T11:12:16+08:00",
"activePostCount": 65,
"eventType": "alarmResult",
"eventState": "active",
"eventDescription": "alarmResult",
"alarmResult": [{
"targetAttrs": {
"deviceChannel": 2,
"deviceName": "Network Video Recorder",
"faceTime": "2017-10-20T11:12:16+08:00",
"face_picurl":
"http://10639103:80/picture/Streaming/tracks/203/?name=ch0002_000000001200126572
54400452524&size=452524"
},
"faces": [{
"faceRect": {
"height": 0.165000,
"width": 0.093000,
"x": 0.400000,
"y": 0.577000
},
"age": {
"ageGroup": "young"
},
"gender": {
"value": "male"
},
"glass": {
"value": "yes"
},
"identify": [{
"maxsimilarity": 0.970000,
"candidate": [{
"blacklist_id": "tg",
"human_data": [{
"bkg_picurl":
"http://10639103:80/FDLib?FDID=529FB9EAC2A04041A603E18F300CD3A5&pId=F4F6
65D6A18E41308CE9934DCDDD766F&size=22332",
"face_rect": {
"height": 0.165000,
"width": 0.093000,
"x": 0.400000,
"y": 0.577000
},
"similarity": 0.970000
}],
"reserve_field": {
"name": "111",
"gender": "male",
"bornTime": "2000-01-04",
"city": "530800",
"certificateType": "officerID",
"certificateNumber": "333333333333333333",
"phoneNumber": "88888888888888888888"
},
"similarity": 0.970000,
"listType": "blackList",
"extendData": [{
"extendID": 1,
"enable": true,
"name": "111",
"value": "sdfasaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}, {
"extendID": 2,
"enable": true,
"name": "222",
"value": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}, {
"extendID": 3,
"enable": true,
"name": "333",
"value": "12345678901234567890123456789012$"
}, {
"extendID": 4,
"enable": true,
"name": "444",
"value": "fff"
}]
}]
}],
"URL":
"http://10639103:80/picture/Streaming/tracks/203/?name=ch0002_000000001200126513
15200058760&size=58760"
}]
}],
"URLCertificationType": "digest"
}

9 Frequency of people

9.1 Description
If someone appears frequently in a specified time and the occurrence number reaches the
set value, it will trigger the alarm.

9.2 WEB interface configuration


9.3 Integration method
SDK integration
Call NET_DVR_SetDVRMessageCallBack_V31 to set alarm callback function for
receiving and handling alarm information.
Command: COMM_HFPD_ALARM

ISAPI integration
URL: GET /ISAPI/Event/notification/alertStream
Note: A connection is established with the device when this URL is called, and stays open
to constantly receive event notifications. If Heartbeat/Network timed out, platform should
call this URL to reconnect.

Main field in the returned data (SDK & ISAPI)


Main field Remark
channelID Channel number
dateTime The event time
eventType Eg. HFPD
eventDescription Eg. High frequency personnel detection
faceCapture Face capture result
URLCertificationType URL certification type.Eg.digest
10 Face capture

10.1 Description
After face capture configuration , if someone appears in the image, the camera will capture the
face and upload to the Notify Surveillance center.

10.2 WEB interface configuration


Via WEB interface , you can configure the arming schedule, linkage method, rule and draw
shield region.

10.3 Integration method


SDK integration
Call NET_DVR_SetDVRMessageCallBack_V31 to set alarm callback function for
receiving and handling alarm information.
Command: COMM_UPLOAD_FACESNAP_RESULT
Main Structure : NET_VCA_FACESNAP_RESULT
Main field
Main field Remark
dwFacePicID The human face image ID,is used for
drawing patrol at the time of the face
tracking
dwFaceScore Human face score: range [0~100]

struTargetInfo Alarm object information


struDevInfo The information of front-end device
dwFacePicLen The length of the human face image, 0-No
image,>0- With image
byUploadEventDataType Uploading mode of face picture data: 0-
Binary data, 1-URL
struFeature Human attribute
fStayDuration Scene dwell duration, unit: s.

ISAPI integration
URL: GET /ISAPI/Event/notification/alertStream
Note: A connection is established with the device when this URL is called, and stays open
to constantly receive event notifications. If Heartbeat/Network timed out, platform should
call this URL to reconnect.
Main field in the returned data
Main field Remark
channelID Channel number
dateTime The event time
eventType Eg. faceCapture
eventDescription Eg. faceCapture
captureLibResult Capture result
URLCertificationType URL certification type. Eg.digest

Example of ISAPI event


{
"ipAddress": "10.16.96.31",
"portNo": 80,
"protocol": "HTTP",
"macAddress": "18:68:cb:86:1c:5e",
"channelID": 1,
"dateTime": "2018-04-24T16:56:43+08:00",
"activePostCount": 1,
"eventType": "faceCapture",
"eventState": "active",
"eventDescription": "faceCapture",
"captureLibResult": [{
"targetAttrs": {
"deviceChannel": 1,
"deviceName": "DeepinMind",
"faceTime": "2018-04-24T16:56:43+08:00",
"bkgUrl":
"http://10.16.96.31:80/picture/Streaming/tracks/103/?name=ch0001_0200000071210005073920030325
6&size=303256"
},
"faces": [{
"faceId": 1,
"faceRect": {
"height": 0.254261,
"width": 0.139844,
"x": 0.551562,
"y": 0.372159
},
"age": {
"ageGroup": "unknown"
},
"gender": {
"value": "unknown"
},
"glass": {
"value": "unknown"
},
"URL":
"http://10.16.96.31:80/picture/Streaming/tracks/103/?name=ch0001_0200000071210004951040001151
2&size=11512"
}]
}],
"URLCertificationType": "digest"
}

11 Vehicle Detection

11.1 Description
In the vehicle detection configuration interface, you can enable the function to capture the
picture of every passed vehicle and the corresponding license plate number, detect the
vehicle type and vehicle color, notify the surveillance center of the alarm signal, upload
the captured picture to FTP server, etc.
11.2 WEB interface configuration

11.3 Integration method


SDK integration
Call NET_DVR_SetDVRMessageCallBack_V31 to set alarm callback function for receiving
and handling alarm information.
Command: COMM_ITS_PLATE_RESULT
Main Structure: NET_ITS_PLATE_RESULT
Main field
Main field Remark
byVehicleType Vehicle type: 0- is unknown, 1- bus, 2-
truck, 3- car, 4- microbus, 5- van, 6-
pedestrian, 7-bicycle, 8-tricycle
byPlateType License plate type, see details in
VCA_PLATE_TYPE
byColor Color of license plate, see details in
VCA_PLATE_COLOR
byLicenseLen The number of plate characters
byEntireBelieve Accuracy of the license plate (percentage):
0~100
byCountry Country index, for details, see
COUNTRY_INDEX
struPlateRect Plate location
sLicense License number
byBelieve Accuracy of every recognizing character.
struPicInfo Picture information, callback one by one,
and up to 6 pictures are allowed,
differentiated by No

Remark: It doesn’t support ISAPI command.

12 Face picture library

12.1 Description
DeepinMind 4F supports 4 libraries which can be customized as blacklist or whitelist. Each library
supports up to 30,000 pictures. And four libraries support up to 50,000 pictures.

12.2 WEB interface

12.3 Integration method


12.3.1 Face library management
1) Add face library
SDK: NET_DVR_STDXMLConfig with ISAPI command
ISAPI: POST /ISAPI/Intelligent/FDLib

2) Delete face library


SDK: NET_DVR_STDXMLConfig with ISAPI command
ISAPI: DELETE /ISAPI/Intelligent/FDLib

3) Modify face library


SDK: NET_DVR_STDXMLConfig with ISAPI command
ISAPI: PUT /ISAPI/Intelligent/FDLib

4) Query face library


SDK: NET_DVR_STDXMLConfig with ISAPI command
ISAPI: GET /ISAPI/Intelligent/FDLib

12.3.2 Face library picture management


1) Add face library picture
SDK: NET_DVR_UploadFile_V40 with command IMPORT_DATA_TO_FACELIB
ISAPI: POST /ISAPI/Intelligent/pictureUpload

2) Delete library picture


SDK: NET_DVR_STDXMLConfig with ISAPI command
ISAPI: DELETE /ISAPI/Intelligent/FDLib/<FDID>/picture/<PID>

3) Modify library picture


SDK: NET_DVR_STDXMLConfig with ISAPI command
ISAPI: PUT /ISAPI/Intelligent/FDLib/<FDID>/picture/<PID>

4) Query library picture


SDK: NET_DVR_STDXMLConfig with ISAPI command
ISAPI: GET /ISAPI/Intelligent/FDLib/<FDID>/picture/<PID>

12.3.3 Search the picture


1) Search the picture
SDK: NET_DVR_STDXMLConfig with ISAPI command
ISAPI: POST /ISAPI/Intelligent/FDLib/FCSearch

2) Export the picture search result


SDK: NET_DVR_STDXMLConfig with ISAPI command
ISAPI: POST /ISAPI/Intelligent/FDLib/FCSearch/dataPackage

You might also like