Ofir A.
Ofir A.

Reputation: 3162

help with OCR application - Matlab

I'm really need your help, I'm desperate.

I'm trying to build an OCR application and I'm facing some problems that I can't solve alone. for now I'm cutting the plate form the image and doing some filtering to reduce the noise. for example, this is the plate after cutting it from the image and after filtering:

enter image description here

now because that the plate is in angle and because that there is still noise (like above the numbers 9 and 3), the identification process(using corr2) is giving me the wrong numbers.

eg:

enter image description here

as you see the only problem is in the numbers 9 and 3(at the left side) where the noise is disturbing.

I thought to stretch the image so that each number will fit all the square (without the black lines at the top), but I can't find any method to do this that it will work for every image.

EDIT: this is the results from the corr2 function, I marked in red the results of the numbers 9 and 3. enter image description here

please give me an idea or working solution...

any help will be greatly appreciated.

Upvotes: 2

Views: 1757

Answers (1)

Dr. belisarius
Dr. belisarius

Reputation: 61056

You may pre-process the image you posted in a 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 much trouble, like this one:

enter image description here

Edit

A step by step procedure posted in your other question

Upvotes: 1

Related Questions