4

I've seen that to limit scan errors you can define a whitelist for characters.

But I couldn't find information for the bool numericMode in the ocr.Init(@"c:\temp", "fra", false);

Suppose you would only want to scan numbers: Setting the whitelist to "0123456789" would be correct to obtain best results in recognition but what does the numericMode parameter of the Init Method do? I've always seen it as false even when the whitelist was "0123456789".

Also what is the best Bitmap parameters (pixelformat) for the image to feed to tessnet.

Thinkable
  • 301
  • 2
  • 7
Relok
  • 301
  • 4
  • 14

2 Answers2

1

From experience, numeric mode limits the results to numbers and supporting characters. I've seen "0123456789,.+-/*%<>$(){}" and more. Currency symbols are allowed.

Also from my experience, I've not seen any great benefit of reduced bit-depth formats over a full color image. However, I've not optimized for speed, only accuracy. If your fonts are small (lower case >= 8 pixels high) then enlarging the image can really enhance accuracy.

Thinkable
  • 301
  • 2
  • 7
1

The question of scanning numbers is listed in the Tesseract FAQ. If you have version 3, you should be able to just issue the command:

tesseract image.tif outputbase nobatch digits
Jerry
  • 966
  • 2
  • 13
  • 28
  • Your answer is out of Context I'm talking about using tessnet2 wich is a C# Wrapper of 2.0 ocr library. I'm talking about doing the ocr recognition programmatically, not using the shell. Also the bitmap is a memory bitmap not a file so the the command is to no avail. – Relok Oct 03 '11 at 07:55