Anpr ds-2cd4a25fwd-izs

SimonF

n3wb
Joined
Nov 29, 2015
Messages
8
Reaction score
1
I am testing an ANPR camera, the DS-2CD4A25FWD-IZS running V5.3.3 build 150610

It's jolly good at ANPR but it's quite hard to integrate it with other systems.

We have a Linux based management database and I want to catch Number Plates entering and leaving each depot.

So far I have managed to grab the list of detected plates from the camera and inject that into our MySQL

curl -d "<AfterTime><picTime>201511261145521160</picTime></AfterTime>" http://admin:mypasswd@192.168.23.45/ISAPI/Traffic/channels/1/vehicleDetect/plates

It works OK but I have to poll, it would be nice to receive a notification

I tried to use /Event/notification/httpHost/ but it doesn't fire for Plate Detection :-(

root@myserver:~$ curl http://admin:mypasswd@192.168.23.45/Event/notification/httpHost/

<?xml version="1.0" encoding="UTF-8"?>
<HttpHostNotificationList version="1.0" xmlns="http://www.hikvision.com/ver10/XMLSchema">
<HttpHostNotification version="1.0" xmlns="http://www.hikvision.com/ver10/XMLSchema">
<id>1</id>
<url></url>
<protocolType>HTTP</protocolType>
<parameterFormatType>XML</parameterFormatType>
<addressingFormatType>ipaddress</addressingFormatType>
<ipAddress>0.0.0.0</ipAddress>
<portNo>80</portNo>
<userName></userName>
<httpAuthenticationMethod>none</httpAuthenticationMethod>
</HttpHostNotification>
</HttpHostNotificationList>

Anyone else playing with this sort of stuff?

Simon
Staffordshire, UK
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,946
Reaction score
6,784
Location
Scotland
If that camera supports ONVIF, like other Hikvision products, it may be worth checking if detected plates generate an ONVIF event.
This could be checked using the very good Windows open-source tool 'ONVIF Device Manager' from sourceforge.net
Events show on the 'Events' page.
If so - it would be a bit harder code-wise, but there are some ONVIF libraries around.

Presumably you've already seen the Hikvision api documentation here: http://www.hikvisioneurope.com/portal/index.php?dir=Integration and Development Materials/
 

SimonF

n3wb
Joined
Nov 29, 2015
Messages
8
Reaction score
1
Wow, yes, thank you, that is exactly what is required!

I looked in the Onvif Device Manager but could not see anything pertaining to LPR. I am new to all this though so maybe it is there and I don't know how to find it!

Looks like the NET_DVR_SetDVRMessageCallBack function will do the trick.

Just out of interest is there any way to run a scrip or program on the camera itself?
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,946
Reaction score
6,784
Location
Scotland
I looked in the Onvif Device Manager but could not see anything pertaining to LPR.
Did you check the 'Events' page whilst waiting for the camera to trigger on one of its analytics?
One way to see what it shows is to have motion detection activated and create some motion.
 

SimonF

n3wb
Joined
Nov 29, 2015
Messages
8
Reaction score
1
Ah, yes, thank you Alastair,

Source: VideoAnalyticsConfigurationToken: VideoAnalyticsToken

Key: LicensePlate: DG06ABC

So how is Onvif getting this? By listening to a stream from a port or is it pushed somehow?

Simon 01538303900
PS - If you would like to play with the camera I can get you an IP/Login?
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,946
Reaction score
6,784
Location
Scotland
So how is Onvif getting this? By listening to a stream from a port or is it pushed somehow?
It's not something I've looked at in detail - but there is in one of the ONVIF specifications a facility to 'subscribe to ONVIF push/pull event notifications'.
But the level of support for that varies with the specific ONVIF implementation.
Hikvision are formally certified for ONVIF compliance - low-cost Chinese cameras that claim ONVIF compliance, in my experience don't support this facility, and are typically not formally certified, just a claim in the product description. Ages back when I looked at this, the 'push/pull event notification' was an optional, non-mandatory part of the ONVIF specifications as it was.

So how is Onvif getting this? By listening to a stream from a port or is it pushed somehow?
It comes from the negotiation that the ONVIF dialogues carry out when an IP surveillance transmitter talks to an IP surveillance receiver.
What are you / what can you do / I am this device/model / here are my capabilities / That's nice - I'd like some of that / OK, use this token / etc or some such.
So in coding terms - you'd need an interactive dialogue as opposed to a simple XML request.
But I expect there are examples out there, though I haven't looked. Real coding isn't my strong point.
 

SimonF

n3wb
Joined
Nov 29, 2015
Messages
8
Reaction score
1
Real coding isn't my strong point.
Ha ha - me neither!

I have hacked together a nice system using the ISAPI and polling once a minute so the customer is happy.

ANPR seems OK so far, I need to mount the camera properly next and try some live plates
 

Thys Brits

n3wb
Joined
Nov 2, 2018
Messages
2
Reaction score
0
Location
South Africa
I am trying to find a similar solution, integrating to a HikVision camera to do ANPR/LPR on a software trigger. Has anyone managed to do this, preferably using C#?

Scenario - boom gate, vehicle drives up, person at the gate clicks a button on the PC, which tells the camera to take a picture and do ANPR and return the results, which is shown to the operator on the PC and he can then verify the details and open the gate.
 

vbr123

n3wb
Joined
Mar 11, 2019
Messages
1
Reaction score
1
Location
Venus
So far I have managed to grab the list of detected plates from the camera and inject that into our MySQL

curl -d "<AfterTime><picTime>201511261145521160</picTime></AfterTime>"
Hi Simon,
I'm glad you have figured out how to grab the plate list. I'm having a hard time to do this. For some reason I'm getting only last 20 plates when I send with <picTime>0</picTIme> when there are almost 100 of them on the list. Is there any settings to set the limits or anything like that?

Please help.
 
Top