SRL Archive - Development

Ocr.


Wizzup?

2009-10-29 21:55:56

Thanks to BenLand100 who decided not to release his code under the Elite Domain License, but instead donate it to Mufasa to be GPL'ed, we now have a fully working, and speedy OCR. ;)
Currently it is only tested for Up Chars, but no doubt it will work for all other fonts too. I implemented it in Mufasa now, (a bit messy), but it seems to work.

It manages to find the text where I believe SCAR fails; and it is as far as I know, always faster than SCAR. It is not yet committed, but it is looking very good! :)

A falador wall (east bank), with white uptext. (Which is hard to spot.)

$ ./project1
Time: 18.9405940594059


19ms. And it is usually faster! Note that this also includes all the overhead caused by the MML, including copying the client to the bitmap, and then passing the data to the OCR, and then the OCR has to filter the given bitmap before identifying the characters on it. Identifying the characters usually takes less than 2ms.

<3 Ben

mixster

2009-10-30 07:28:12

Power to the GPL Republic!

<3 Ben x 2

Naike

2009-10-30 20:50:25

Woot woot, no more rs_GetUpText problems!

Loves you long time

tarajunky

2009-11-01 01:01:39

Believe it when I seez it. :)

The Claw

2009-11-01 01:29:43

How does OCR actually work? Does it count pixels, the outline of letters, compare actual bitmaps/dtms or what?

nielsie95

2009-11-01 02:52:58

It compares the actual bitmap mask.

The Claw

2009-11-01 04:26:20

Hmm, well it looks pretty damn fast but why not compare a few slices instead? Like a vertical + horizontal, or horizontal + diagonal, or whatever combination would give unique results for each letter.

mastaraymond

2009-11-01 05:01:46

Well, I couldn't understand the code.. Not very well commented :-p.
But in essence it compares the 'found' letter with every letter in the OCR database, it saves the accuracy that letter has.. Then at the end it results the letter with the highest accuracy.

Wizzup?

2009-11-01 05:29:42

From: N1ke!
Woot woot, no more rs_GetUpText problems!

Loves you long time


Well, I hope so. It ofcourse hasn't been tested in every possible case, but it's looking good for all the test cases.

From: tarajunky
Believe it when I seez it. :)


I hope to fully implement it this week. :)

Markus

2009-11-02 09:20:23

From: Wizzup?
Well, I hope so. It ofcourse hasn't been tested in every possible case, but it's looking good for all the test cases.


How about we create a bunch (around 10 to 500 or so, just enough :p) of pictures with 'hard-to-ocr' uptexts, compare those to a known uptext and thus we can have a nice chart of accuracies between SCAR 3.21, 3.15b, 2.03 and Mufasa+Cogat? :)
Marketing is important my friends, and so is research.

Wizzup?

2009-11-02 11:41:33

Well, I've found some cases where the detection doesn't fully work. (Or perhaps the blob finding.) But it generally does quite well.

Wizzup?

2009-11-03 08:15:56

I committed a new one, with my own upchars filtering, but I still need to add a floodfill filter to remove further noise. It should perform a lot better than our previous one in all cases. It's around the 7ms.

@Niels: I've used posterize + contrast, so very light fally walls wont work.