-
Load image
-
Apply blur filter (to remove noise)
-
Convert blurred image to grayscale
-
Apply Sobel filter to find vertical edges (car plates have a high density of vertical lines)
-
Apply threshold with Ostu’s Binarization (Ostu’s binarization will automatically calculate optimal threshold from image histogram)
-
Create a rectangular mask of size of 17x3 and apply “closing” filter to detect plate number more clearly
- Find and fetch contours of possible plates
- Validate contours and clear out those, that can't be potential plate numbers
- Is white color dominant?
- Rotated not more than 15 degrees
- In Europe, car plate size: 52x11, aspect 4,7272
- Define min && max area of plate number
- After (8), apply dilate filter and threshold to validated contours to get numbers and characters
10)Apply Tesseract to extract plate number as a text. Tesseract is an optical character recognition (OCR) engine sponsored by Google.