Help with OCR - Matlab

I really need your help, I'm desperate.

I am trying to create an OCR application, and I ran into some problems that I cannot solve alone. while I cut the image plate and do filtering to reduce noise. for example, this is a plate after cutting it from the image and after filtering:

enter image description here

now due to the fact that the plate is at an angle, and since there is still noise (for example, above numbers 9 and 3), the identification process (using corr2) gives me the wrong numbers.

eg:

enter image description here

as you can see, the only problem is the numbers 9 and 3 (left), where the noise gets in the way.

I thought to stretch the image so that each number matches all the squares (without black lines at the top), but I can’t find a way to make it work for each image.

EDIT: this is the result of the corr2 function, I colored the results of numbers 9 and 3. enter image description here

please give me an idea or a working solution ...

Any help would be greatly appreciated.

+2
source share
1 answer

You can pre-process the image posted in the previous question:

enter image description here

with something like: (code in Mathematica)

Dilation[ DeleteSmallComponents[ Pruning[ Thinning@ Binarize[ ColorSeparate[ ColorNegate@yourColorImage , "HSB"][[3]], .92], 10], 30], 3] 

Result:

enter image description here

Now your OCR should pass without any problems, for example:

enter image description here

Edit

The step-by-step procedure is posted in your other question.

+1
source

Source: https://habr.com/ru/post/918884/


All Articles