Hi all I have a collection of images that are similar to photos of car registration plates.
I am wondering how to pre process the image before sending it to an OCR engine to determine the text.
I would like to eventually be able to crop the input on only the white content of the registration plate.
The actual image would look something like this:
and should end up something like this (color depth not important)
Thank for any help. Regards, Bob
There are 4 different types of Image Pre-Processing techniques and they are listed below. Pixel brightness transformations/ Brightness corrections. Geometric Transformations. Image Filtering and Segmentation. Fourier transform and Image restauration.
Installing OpenCV Package for Image Preprocessing OpenCV is a pre-built, open-source CPU-only library (package) that is widely used for computer vision, machine learning, and image processing applications. It supports a good variety of programming languages including Python.
Segment the image (take a look at this).
Classify segments using a gray scale threshold (since you're just looking for white).
Crop the image by using the white segment bounding box (or bounding boxes, if it breaks down in more than one segment). This is probably not going to work for white cars - but it should not be too difficult to establish a few rules for this case.
Take a look at tesseract-ocr to extract the text.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With