Loading...

OCR: OCRTesseractDoOCR language

Support for GdTwain ActiveX and GdTwain Pro ActiveX/SDK.

OCR: OCRTesseractDoOCR language

Postby ctn » Mon Mar 16, 2009 11:50 am

Hi,

Why this function "OCRTesseractDoOCR" always recognize the same text even if a different language has been selected for the same image?

Thank you.
Br, ctn
ctn
 
Posts: 57
Joined: Thu Dec 04, 2008 6:20 pm

Re: OCR: OCRTesseractDoOCR language

Postby ctn » Tue Mar 17, 2009 9:29 am

Could you please give me a feedback?
Thank you
Br, ctn
ctn
 
Posts: 57
Joined: Thu Dec 04, 2008 6:20 pm

Re: OCR: OCRTesseractDoOCR language

Postby Loïc » Tue Mar 17, 2009 2:30 pm

Hi,

I've made test with success using different dictionaries.

Could you upload the image on which you have the same result ?

Best regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4441
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: OCR: OCRTesseractDoOCR language

Postby ctn » Wed Mar 18, 2009 11:41 am

Please find a "image" file (pdf) and the test result file (txt) attached.

Code snippet looks like:
Code: Select all
   ...
   TesseractDictionary ocrLanguage = TwainHandlerUtil.tesseractDictionary(language);

   if(Directory.Exists(@"ocrdata"))
   {
      string ocrText = _gdTwain.OCRTesseractDoOCR(ocrLanguage, @"ocrdata", "");
      _gdTwain.OCRTesseractClear();

      if(string.IsNullOrEmpty(ocrText))
      {
         throw new Exception();
      }
      return ocrText;
   }
   ...
   
   public static TesseractDictionary tesseractDictionary(OcrLanguageEnum language)
   {
      TesseractDictionary ocrLanguage;
      switch(language)
      {
         case OcrLanguageEnum.ENGLISH:
            ocrLanguage = TesseractDictionary.TesseractDictionaryEnglish;
            break;
         case OcrLanguageEnum.FRENCH:
            ocrLanguage = TesseractDictionary.TesseractDictionaryFrench;
            break;
         case OcrLanguageEnum.GERMAN:
            ocrLanguage = TesseractDictionary.TesseractDictionaryGerman;
            break;
         case OcrLanguageEnum.ITALIAN:
            ocrLanguage = TesseractDictionary.TesseractDictionaryItalian;
            break;
         default:
            ocrLanguage = TesseractDictionary.TesseractDictionaryGerman;
            break;
      }
      return ocrLanguage;
   }

   public enum OcrLanguageEnum
   {
      GERMAN,
      FRENCH,
      ITALIAN,
      ENGLISH
   }


Thank you.
Br, ctn
ctn
 
Posts: 57
Joined: Thu Dec 04, 2008 6:20 pm

Re: OCR: OCRTesseractDoOCR language

Postby ctn » Wed Mar 18, 2009 11:44 am

Attach files again.
Br, ctn


Seems that "Upload attachment" does not work.
Br, ctn
ctn
 
Posts: 57
Joined: Thu Dec 04, 2008 6:20 pm

Re: OCR: OCRTesseractDoOCR language

Postby Loïc » Wed Mar 18, 2009 3:22 pm

Hi,

Send me your images at esupport (at) gdpicture (dot) com.

Best regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4441
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: OCR: OCRTesseractDoOCR language

Postby ctn » Wed Mar 18, 2009 4:02 pm

Hi Loïc

An email has been sent.
Thanks
Br, ctn
ctn
 
Posts: 57
Joined: Thu Dec 04, 2008 6:20 pm

Re: OCR: OCRTesseractDoOCR language

Postby Loïc » Wed Mar 18, 2009 4:12 pm

Hi,

I got your mail, thanks !


For me the OCR result are quite different regarding the dictionary.
There is no problem.

IE in first line using first German dictionary then English dictionary :


German
Die Rahmenprogramme für Forschung und technologische Entwicklung (FRP) sind das

English
Die Rahmenprogramme fur Forschung und technologische Entwicklung (FRP) sind das


Kind regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4441
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: OCR: OCRTesseractDoOCR language

Postby ctn » Wed Mar 18, 2009 4:58 pm

Hi

I thought that only recognized words in the expected language will be returned.

Br, ctn
ctn
 
Posts: 57
Joined: Thu Dec 04, 2008 6:20 pm


Return to GdTwain [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 2 guests