Is there any way to get current "entered" and "exited" peoples

MrSman

n3wb
Joined
Jan 9, 2019
Messages
7
Reaction score
0
Location
Spain
Hi guys !
I'm trying to get the current entered and exited people counter from a Hikvision People Counting Camera. I'm using a Java code to do this by calling the ISAPI protocol but I just found the way to get a daily report with history data, but not real time data.
Someone knows if there is a ISAPI call to get the current values?
Thanks !
 

StewartM

Getting the hang of it
Joined
Dec 11, 2017
Messages
260
Reaction score
75
Location
Cape Town
How are you getting the the daily report? I'm new to this too but would like to know more.
Something like:
<?xml version="1.0" encoding="utf-16"?>
<countingStatisticsDescription xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="XML Schema">
<reportType>daily</reportType>
<timeSpanList>
<timeSpan>
<startTime>2017-05-03T00:00:00</startTime>
<endTime>2017-05-03T23:59:59</endTime>
</timeSpan>
</timeSpanList>
</countingStatisticsDescription>
 

MrSman

n3wb
Joined
Jan 9, 2019
Messages
7
Reaction score
0
Location
Spain
How are you getting the the daily report? I'm new to this too but would like to know more.
Something like:
<?xml version="1.0" encoding="utf-16"?>
<countingStatisticsDescription xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="XML Schema">
<reportType>daily</reportType>
<timeSpanList>
<timeSpan>
<startTime>2017-05-03T00:00:00</startTime>
<endTime>2017-05-03T23:59:59</endTime>
</timeSpan>
</timeSpanList>
</countingStatisticsDescription>
Well, I'm doing it with a Java code by sending a similar XML request as your XML on a HTTP request. I'm using MediaType Jar Library to encode the XML with x-www-form-urlencoded and UTF-8 charset. Is something like this:
MediaType XML = MediaType.parse("application/x-www-form-urlencoded; charset=utf-8");
String myXML = "<CountingStatisticsDescription>"
+ "<statisticType>enternum</statisticType>"
+ "<reportType>daily</reportType>"
+ "<timeSpanList>"
+ "<timeSpan>"
+ "<startTime>2017-05-03T00:00:00</startTime>"
+ "<endTime>2017-05-03T23:59:59</endTime>"
+ "</timeSpan>"
+ "</timeSpanList>"
+ "</CountingStatisticsDescription>";
RequestBody requestBody = RequestBody.create(XML, myXML);
Request request = new Request.Builder()
.url("http://<CamIP:CamPort>/ISAPI/System/Video/inputs/channels/<ID>/counting/search")
.get()
.addHeader("Authorization", "Basic Base64Encoding(user, password)")
.post(requestBody)
.build();

Response response = null;
try {
response = client.newCall(request).execute();
} catch (IOException e) {
e.printStackTrace();
}
 
Last edited:
Top