15

Well after much work regarding vehicle plate detection, I've decided that simply finding a 'pattern' of yellow pixels within an image would be a sufficient method of finding the location of a license plate within an image. Currently I use various graphic filters and detect white pixel patterns, however this is proving to be more and more problematic.

Now for the question, I'm aware that the 'yellow' are a license plate is based on numerous factors such as brightness, environment. alt text alt text

Insight of this I would need a range to compare to, for example:

if(FindIfYellow(GetPixel(x, y)))

However I don't know if to use RGB values, specifically individual RGB values to determine if the color is a shade of yellow. Finally is there a website or information of some sort defining these ranges? I know

R: 255 G: 255 B: 0

Is the purest of yellow, but in terms of range I have no idea. Anyway hopefully it's a resonable idea, and the reason I post is to ensure I haven't overlook something, as I have been doing frequently :).

Bwooce
  • 2,123
  • 19
  • 28
Ash
  • 3,494
  • 12
  • 35
  • 42
  • Maybe [this](http://blog.xkcd.com/2010/05/03/color-survey-results/) will help in finding the right name for the right colors. :) – user541686 Jan 24 '11 at 01:03
  • Haha, yeah I thought about this :(. Well yellow cars I suppose can be an exception, found an interesting paper on plate detection again, if only there was an available algorithm for Close Region Filling as I've basically already done the rest :http://www.ijcte.org/papers/150-G667.pdf (page 3) – Ash Jan 24 '11 at 02:46

3 Answers3

25

Using CMYK channel separation - Let's OCR the Plate!

enter image description here

Repeating the process with the other image

enter image description here

Dr. belisarius
  • 60,527
  • 15
  • 115
  • 190
  • @Ash Yes, that is Mathematica 8, but the algorithms are pretty standard, and should not be difficult to implement in any decent language with a graphics library (unless you need top performance code) – Dr. belisarius Jan 24 '11 at 14:46
1

Is gold yellow? Is yellowish-orange yellow? How about yellow-green?

(My point being that this is a fuzzy definition for a human, let alone for a computer... just decide on a range that looks yellow to you and stick with it.)

user541686
  • 205,094
  • 128
  • 528
  • 886
  • Yeah it is indeed difficult to define the color range I require considering the immense amount of differences R,G,B wise, hence why I wasn't sure it RGB is the way to go. I'll keep looking into it as it's certainly a promising area :) – Ash Jan 24 '11 at 01:47
  • HSI color space looks promising. – Ash Jan 24 '11 at 02:04
  • Huh... I totally didn't think about HSL (I'd always heard hue/saturation/luminosity and not intensity... cool! didn't know it's called both of those!)... yeah, it seems like a much better option than RGB. – user541686 Jan 24 '11 at 02:59
-1

Check out OpenALPR (http://www.openalpr.com). It takes a different approach for plate localization -- it uses trained LBP patterns. You may want to use this library in addition to your color-based detection for even greater accuracy. For example, OpenALPR can detect potential plate regions, and then simply verify that a certain percentage of the area is yellow-ish.

Derrick Johnson
  • 377
  • 5
  • 9