All projects

License Plate Recognition Access Control

Vehicle access control on a Raspberry Pi 3B: OpenALPR reads the plate, a Flask + MySQL backend authorizes it and pushes the event live over Socket.IO.

Type
Final degree project — ASIR
Date
2024 — 2025
Role
Sole author
Source
GitHub

01Technical summary

An access-control system based on automatic license-plate recognition. A Raspberry Pi 3B with a camera captures the vehicle, OpenALPR (EU region) extracts the plate, and a Flask backend with MySQL checks it against authorized plates. Users and roles are authenticated, and access events reach the web interface in real time through WebSockets (Socket.IO).

02Architecture

Edge · Raspberry Pi 3B
Camera1 frame / second
OpenALPREU regionplate → text
Python clientsystemd serviceRestart=always
Backend
FlaskAPI · auth · roles
MySQLplates · users · log
Clients
Web UIusers request platesadmins approvelive access history
Recognition runs at the edge; the backend authorizes, stores and pushes events to the browser.

03My contribution

Final project of my ASIR degree, designed, built and documented end to end on my own.

04Implementation

  • Capture — a Python script on the Pi captures a frame every second and runs OpenALPR with the EU region. Consecutive duplicates are skipped.
  • Unattended operation — the script runs as a systemd service with Restart=always, so it starts on boot and recovers from failures.
  • Backend — Flask API and web app with MySQL; the Pi posts each detected plate and image to it over HTTP. Users request their plate and administrators approve or reject it (role-based access).
  • Real time — the server emits each access event over Socket.IO and the history view updates without reloading.

05Result / output

A working end-to-end system — plate in front of the camera, decision in the backend, event on screen — with full technical documentation in the repository.

06Technologies

  • Raspberry Pi 3B
  • Python
  • OpenALPR
  • Flask
  • MySQL
  • Socket.IO
  • WebSockets
  • systemd