5

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:

input

and should end up something like this (color depth not important) ouput

Thank for any help. Regards, Bob

The HCD
  • 492
  • 8
  • 18

1 Answers1

6
  • 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.

Vitor Py
  • 5,145
  • 4
  • 39
  • 62
  • I'm already looking at tesseract and it works great.. once the image processing is working well :) – The HCD Nov 16 '10 at 23:28
  • Just ask if you have any trouble :) – Vitor Py Nov 16 '10 at 23:45
  • hi @VitorBraga I have use the segment the image link code but when ever I tried to use the segment command with `./segment 0.5 500 20 js.jpeg rs.jpeg` in terminal on os x i got one error called `terminate called throwing an exceptionAbort trap: 6`. Will you help me out of it ? Can you give me some information regarding where I am wrong? Please help me out of this problem :) – The iOSDev Feb 01 '13 at 07:05
  • I have almost same kind of problem see [this](http://stackoverflow.com/q/13247914/1132951) question where I stuck and to resolve it what I have tried so far. And also the answer which is given by me and accepted but not properly working :( – The iOSDev Feb 01 '13 at 07:09