ecit241 / tesseract-ocr

Automatically exported from code.google.com/p/tesseract-ocr
Other
0 stars 0 forks source link

Include a C wrapper in TessBaseAPI (baseapi.cpp/.h) #362

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Several applications can only use C function calls in their interfacing with 
Tesseract. But according to http://code.google.com/p/tesseract-ocr/wiki/ReadMe, 
the DLL interface will no longer be supported in Tesseract 3.0.

This request asks to include a C wrapper to a global recognize class object in 
the TessBaseAPI. Basically, it calls for moving the C wrapper from the obsolete 
tessdll.cpp/.h to inside the baseapi.cpp/.h.

Original issue reported on code.google.com by nguyen...@gmail.com on 26 Sep 2010 at 4:20

GoogleCodeExporter commented 9 years ago
This is final version of patch based on
https://groups.google.com/d/topic/tesseract-dev/NU58nkP-3Hk/discussion

Original comment by zde...@gmail.com on 22 Aug 2012 at 7:24

Attachments:

GoogleCodeExporter commented 9 years ago
I've now tested these and I'm happy. :)

Original comment by JerseyChewi@gmail.com on 30 Aug 2012 at 8:33

GoogleCodeExporter commented 9 years ago
commited to svn. Please test it

Original comment by zde...@gmail.com on 24 Sep 2012 at 5:18

GoogleCodeExporter commented 9 years ago
Getting a linker error in the DLL_Release version:
tesseractmain.obj : error LNK2019: unresolved external symbol "public: void 
__cdecl ERRCODE::error(char const *,enum TessErrorLogCode,char const 
*,...)const " (?error@ERRCODE@@QBAXPBDW4TessErrorLogCode@@0ZZ) referenced in 
function "public: virtual void __thiscall GenericVector<class 
STRING>::remove(int)" (?remove@?$GenericVector@VSTRING@@@@UAEXH@Z)

I don't know exactly where the error lies, but it's probably either:
- a problem with the calling convention, the requested calling convention is 
__cdecl which is not standard for C++ code, or:
- a problem with using a template class when linking as DLL.

LIB_Release seems to be ok.

Original comment by trop...@gmail.com on 24 Sep 2012 at 12:41

GoogleCodeExporter commented 9 years ago
VC++ DLL release should be fixed in r762

Original comment by zde...@gmail.com on 25 Sep 2012 at 9:12

GoogleCodeExporter commented 9 years ago
Thanks!
I'll test it as soon as I have some free time.

Original comment by trop...@gmail.com on 25 Sep 2012 at 3:18

GoogleCodeExporter commented 9 years ago
I tested r765 with Tess4J, and all unit tests passed. Thank you for all the 
work.

Original comment by nguyen...@gmail.com on 26 Sep 2012 at 1:05

GoogleCodeExporter commented 9 years ago
Works for me

Original comment by trop...@gmail.com on 27 Sep 2012 at 7:21

GoogleCodeExporter commented 9 years ago
patch commited in r759 (will be included in version 3.02)

Original comment by zde...@gmail.com on 28 Sep 2012 at 9:44

GoogleCodeExporter commented 9 years ago
I am using Tesseract Wrapper to read hindi images. I used Below code. but 
through memory full error. 

 OCR.TesseractWrapper.TesseractProcessor ocr = new OCR.TesseractWrapper.TesseractProcessor();
            if (ocr.Init(@"C:\OCR Language\tesseract-ocr-3.01.hin.tar\tesseract-ocr-3.01.hin\tesseract-ocr\tessdata\", "hin", (int)eOcrEngineMode.OEM_DEFAULT))
            {
                string text = ocr.Recognize(bt);
                textBox1.Text = textBox1.Text + text.ToString() + Environment.NewLine;
            }

I want to read hindi font using TesseractWrapper. can any one help me.

Original comment by bsahoo....@gmail.com on 22 Jun 2014 at 5:23