3

Basically I'm reading vehicle license plates using tessract OCR, however despite being able to emphasise text easily enough via changing contrast, reducing noise an so on, some 'parts' of the vehicle remain on the image which does cause the OCR to throw bad results.

For example take:

enter image description here

I can change this easily enough, such as:

enter image description here

I'm looking to eliminate the edges off each plate, here's another example:

enter image description here

I could remove the edges using pixel manipulation algorithm, however I don't feel it's the right method, and would cause quite a lot of problems.

I've been using the following application to test various methods such as morphology and eliminating the unwanted data, so far I haven't been successful.

http://www.codeproject.com/KB/GDI-plus/Image_Processing_Lab.aspx

However someone with knowledge of this could use the application on the article above to achieve want I'm trying, so feel free to give it a try.

Thanks

Community
  • 1
  • 1
Ash
  • 3,494
  • 12
  • 35
  • 42
  • [`This algorithm`](http://stackoverflow.com/questions/4777677/license-plate-recognition-determining-color-range-for-pixel-comparison/4778495#4778495) seems to be able to isolate your plates text ... :D – Dr. belisarius Feb 18 '11 at 20:10
  • Ha, yeah it's just very difficult to duplicate that functionality; I'll carry on looking into other solutions, thanks anyway :). If you aware of any article/api's/libraries which described/have this functionality, I'd appreciate hearing about them. – Ash Feb 19 '11 at 16:19
  • Sorted the problem, I just remove a certain percentage of the outline based off the total size and width, not perfect but good enough :) – Ash Feb 19 '11 at 17:18

2 Answers2

1

Please try to use stroke width transformation concept.

This concept use to segment text from natural images.....

cmsjr
  • 56,771
  • 11
  • 70
  • 62
suresh gopal
  • 3,138
  • 6
  • 27
  • 58
0

I already did such an algorithm. I just can say that it works great. The secret is, that you need to know that the light is coming just from one side perhaps. You cannot set the image to "black/white" just by using ONE threshold.

Detect the average luminance of parts of the image and use this luminance calculation to set the threshold for each region.

For example, if the left top is lighter, you need a lower threshold to make these parts not to bright. And if the bottom right has low light, you need to set the threshold higher to receive all existing light information.

Then, you need just to drive into the image from each side by using the method:

IsPixelAboveThreshold ?

If it is below, you are on the border, if it is above, you can say you are on the middle of the image with more brightness.

Regards

rmtheis
  • 5,992
  • 12
  • 61
  • 78
goldengel
  • 611
  • 8
  • 22