August 17, 2018

Hikvision ANPR, Part 1


So I recently wanted to replace my aging Axis Q1604-E & illuminator combo with something a little more subtle, and a device that could process numberplates automatically (without using OpenALPR as I find it cumbersome and not too great on UK plates).

Looking at my options that were within budget the only clear winner was the Hikvision DS-2CD4A26FWD-IZS/P, it currently costs £531.79 in the UK but is available on a '14 day buy & try' scheme from (not a refferal link or anything.. just a good company to work with!). I was a little skeptical that a device at this price point would actually recognise plates, not to mention doing the same at night.. but due to their returns / trial policy I decided to for it.

The camera turned up and the first thing i did was update the firmware, which annoyingly you need to contact your supplier for as Hikvision don't make it easy to find on their site (it's a special firmware containing the ANPR functionality).

skip a few hours.. camera mounted on a tree

Camera Setup

(skipping setting an IP and basic network config - these are setups for firmware v5.4.7)
The first thing you'll need to do is grab Hikvision's plugin for rending the video stream, I'm using a mac so used this file once it's installed you'll need to restart your browser.

Anyway, head over to the camera's config page, change your password and head over to the configuration area > Image.

Set the following:

Now go to 'Road Traffic'

You need to setup as follows, basically defining a lane(s) and your region:
Detection Config

Set the other settings as you see fit, but make sure on the 'Picture' tab you set the 'FTP Picture Name' to 'Custom' as follows:

FTP Picture Name
This is so that our Python script can read the plate from the file name (more on that later!).

Once setup you should be able to go into the 'Real-time LPR Result' tab and see plates as they pass your camera:

Real time result


So for the money it works very well, hardly ever misses a normal plate (maybe once in 2 weeks it's missed a car going up the drive but gets it coming down). It works very well at night, including when cars are coming towards the camera with headlights..
Night time plate

However there are a couple of things wrong:

Moving forward

I've started working on a python program to capture the plate details and save them in a database with future goals of a web interface to manage known plates, report suspicous visitors, blacklist, trigger actions etc.

More on that in part 2

  • LinkedIn
  • Tumblr
  • Reddit
  • Google+
  • Pinterest
  • Pocket