All projects

License Plate Recognizer

A MATLAB image-processing pipeline that reads European license plates, identifies the issuing country from the EU strip, and stays robust to Gaussian noise — classic computer vision, no learned model.

MATLAB Computer VisionMATLABImage Processing
license-plate-recognizer.pdf · 1.8 MB Open the report

The problem

Project for the Industrial Vision course at the Universitat de les Illes Balears.

No learned model is allowed: the plate has to be located, the issuing country identified from the EU strip and all seven characters read using classic image-processing operators only.

That makes the chain fully deterministic and inspectable — the same image always gives the same reading — but it also means every character has to be told apart by a measurable property rather than by a classifier, and the whole thing has to survive images deliberately corrupted with Gaussian noise.

It is deliberately specialized to the plate format used in the course: a restricted alphabet of the letters A, B, C and the digits 0, 1, 7, 8. Widening it would mean finding a new measurable property for every character added, which is exactly the wall a hand-built recogniser hits.

How it works

The pipeline runs in stages:

  • Preprocessing — Gaussian noise is removed with a 3×3 mean filter using symmetric padding.
  • Segmentation — the RGB image is thresholded into a white mask (the plate background) and a blue mask (the EU country strip).
  • Region extraction — the largest white connected component gives the plate region and the largest blue one the country strip; the plate crop is inverted so the dark characters can be analysed.
  • Country identification — the blue-strip components are filtered by area (to drop the stars) and eccentricity (to drop the thin bands); the number of remaining letters and the Euler number of the first one classify the plate as D, PL or GB.
  • Plate reading — the plate components are filtered by area (the first three are letters, the last four digits) and each character is identified from its Euler number, telling 1 and 7 apart by their extent.
  • Output — the intermediate masks and crops are saved per image (original, white_mask, blue_mask, plate, country), and every detected code is collected into a summary with per-country totals.

Running it

Requires MATLAB with the Image Processing Toolbox.

  1. Clone the repository and open its folder in MATLAB so the relative paths resolve.
  2. Run main.m from the repository root.

The detected codes are printed to the console, the intermediate images are saved under output/, and a summary of all plates and per-country totals is written to output/plates.txt. A detailed write-up of the method, parameter choices and results is in the project report.