2

I am developing an OCR application in EmguCV. My target is to achieve the same results as done by Capture2Text.

Capture2Text uses Tesseract engine for OCR and Leptonica library for Preprocessing. As we know EmguCV is using Tesseract engine for OCR therefore we are left with Preprocessing.

Preprocessing in Capture2Text is done by calling the functions of Leptonica in the following order with specific values. The actual code file is available in the leptonica_util.c uner the folder ...\Capture2Text_v3.5\Capture2Text\SourceCode\leptonica_util

Read in source image Convert to grey scale Perform auto negate image Scale the image (linear interpolation) Apply unsharp mask Perform Otsu Binarize

Out of these two possible options, which one is better to follow and how ?

  1. Use Leptonica library in EmguCV by including it in the code and then calling the same functions with same parameters.
  2. Try to find and use equivalent functions already available in EmguCV.

I have tried to go for option 1, but could not do it properly. For 2nd option I am not sure where to look specifically in EmguCV.

Novice
  • 515
  • 7
  • 22

1 Answers1

2

Finally, I managed to solve the problem by using Leptonica library in EmguCV. The main issue I found was the mismatch between 'bitness' of Leptonica libraries and EmguCV installation on my system.

What worked for me was to set both of them to be used in a 32 bit environment and build them for x86 machine.

Now the OCR recognition level is same as in Capture2Text (which is very accurate for my application).

Novice
  • 515
  • 7
  • 22