Anpr ds-2cd4a25fwd-izs

Discussion in 'Hikvision' started by SimonF, Nov 29, 2015.

Share This Page

  1. SimonF

    SimonF n3wb

    Joined:
    Nov 29, 2015
    Messages:
    8
    Likes Received:
    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
     
  2. alastairstevenson

    alastairstevenson Staff Member

    Joined:
    Oct 28, 2014
    Messages:
    9,744
    Likes Received:
    2,865
    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/
     
  3. Korgoth

    Korgoth Pulling my weight

    Joined:
    Aug 28, 2015
    Messages:
    103
    Likes Received:
    158
  4. SimonF

    SimonF n3wb

    Joined:
    Nov 29, 2015
    Messages:
    8
    Likes Received:
    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?
     
  5. alastairstevenson

    alastairstevenson Staff Member

    Joined:
    Oct 28, 2014
    Messages:
    9,744
    Likes Received:
    2,865
    Location:
    Scotland
    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.
     
  6. SimonF

    SimonF n3wb

    Joined:
    Nov 29, 2015
    Messages:
    8
    Likes Received:
    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?
     
  7. alastairstevenson

    alastairstevenson Staff Member

    Joined:
    Oct 28, 2014
    Messages:
    9,744
    Likes Received:
    2,865
    Location:
    Scotland
    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.

    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.
     
  8. SimonF

    SimonF n3wb

    Joined:
    Nov 29, 2015
    Messages:
    8
    Likes Received:
    1
    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
     
  9. alastairstevenson

    alastairstevenson Staff Member

    Joined:
    Oct 28, 2014
    Messages:
    9,744
    Likes Received:
    2,865
    Location:
    Scotland
    Well done, sounds good.
    Nothing like a happy customer!
     
  10. asafbt

    asafbt n3wb

    Joined:
    Aug 17, 2017
    Messages:
    1
    Likes Received:
    0
  11. SimonF

    SimonF n3wb

    Joined:
    Nov 29, 2015
    Messages:
    8
    Likes Received:
    1
    asafbt likes this.
  12. Thys Brits

    Thys Brits n3wb

    Joined:
    Nov 2, 2018
    Messages:
    2
    Likes Received:
    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.