2

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.

Ofir A.
  • 3,112
  • 11
  • 57
  • 83
  • 1
    Just a tip, convolution is not a particularly robust or efficient method for this problem. You should look into machine learning topics like neural networks or support vector machines. A lot of relevant info here: http://stackoverflow.com/questions/850717/what-are-some-popular-ocr-algorithms – so12311 Jun 04 '11 at 19:08
  • consider blurring the training image (supposing the second row is your training template) so that the *darkness* and *thickness* of the digits' strokes are similar to your input. As for the first digit (9 misrecognized as 1), are you sure its correlation is positive? For this particular input, can you list its correlation toward all templates (from 0 to 9) so that we'll see how close it is to being misrecognized? Finally, you may also try [Linear Discriminant Analysis](http://en.wikipedia.org/wiki/Linear_discriminant_analysis) or Eigenface, it's a easier starting point. – rwong Jun 04 '11 at 20:35
  • Methink you should recheck your master images ... Also, take a look at this answer http://stackoverflow.com/questions/4777677/license-plate-recognition-determining-color-range-for-pixel-comparison/4778495#4778495, perhaps you can get some inspiration – Dr. belisarius Jun 06 '11 at 15:08

1 Answers1

1

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

Community
  • 1
  • 1
Dr. belisarius
  • 60,527
  • 15
  • 115
  • 190