Giter Club home page Giter Club logo

brodante / anpr-server-c- Goto Github PK

View Code? Open in Web Editor NEW

This project forked from srslynow/anpr-server-c-

0.0 0.0 0.0 10.99 MB

A multithreaded Automatic Number Plate Recognition (ANPR) server written in C++, much like OpenALPR. Difference is that this code is build for speed & low-overhead, which makes it run on embedded devices like a raspberry PI. Also uses deep neural-networks (DNNs, trained with Caffe) for character classification through the new OpenCV DNN interface.

License: GNU General Public License v3.0

C++ 97.31% CMake 2.69%

anpr-server-c-'s Introduction

ANPR-Server-C++

A multithreaded Automatic Number Plate Recognition (ANPR) server written in C++, much like OpenALPR.

A few features

  • Communication with a client source (webcam/security cam/image/video) happens over UDP instead of TCP
  • This provides us with much faster processing & lower latency (e.g. ~2-3 ms instead of 100 ms delay on a local network)
  • Some example scripts how to provide data to this server are in my ANPR-Client-Python repository
  • Program is completely multi-threaded (frame based) and scales up to hundreds of cores.
  • Uses Deep Neural Networks (DNNs) for
  • Segmentation: masking & isolating characters in a licence plate image
  • Classification: classification of characters in a licence plate, e.g. say that an image contains a '7'
  • Uses Histogram of Gradients (HoG) descriptors for licence plate detection

TODOs

  • Use DNNs for licence plate localization
  • Write sequence id format for the UDP server for the case packets arrive out of order, those frames are dropped now

Usage

If you use 64-bit windows you can use the precompiled binary, if not you'll have to compile manually. Dependencies are:

  • C++17 capable compiler
  • OpenCV >3.3.x (or earlier version, with a manually linked opencv-DNN module, from opencv-contrib)
  • SFML >2.x

Just run the executable, and supply data through udp. Examples how to do this can be found here. See the files:

  • socket_send_udp.py
  • socket_send_udp_video.py

General UDP structure uses the format:

  • Initial packet is 4 bytes (int) indicating frame data size, endian format is dependend on ANPR-Server host. Most systems use Little-endian, as does mine.
  • Following packets contain JPG-encoded frame data, keep packet size <1500 bytes to prevent fragmentation
  • Repeat for more frames.. :)

The server keeps track of ip & port of the data-sending client, it assumes non-concurrent data sending. You have a few options to use multiple cameras:

  • Interleave the frames from different cameras
  • Set up different socket for the different senders, this will give the new client a different sending port, thus enabling the server to differentiate between clients.

alt text

anpr-server-c-'s People

Contributors

srslynow avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.