How to use code call the Tesseract API

177 views
Skip to first unread message

朱裕清

unread,
Oct 24, 2017, 11:58:15 AM10/24/17
to tesseract-ocr
Tesseract Version: 3.05
Platform: Microsoft Windows [version 10.0.15063]

Current Behavior:
After build the Tesseract with this method. Then my build/bin/Debug directory contain this files:

    eng.traineddata
    phototest.tif
    pvt.cppan.demo.behdad.harfbuzz-1.5.1.dll
    pvt.cppan.demo.bzip2-1.0.6.dll
    pvt.cppan.demo.cairographics.cairo-1.15.6.dll
    pvt.cppan.demo.danbloomberg.leptonica-1.74.4.dll
    pvt.cppan.demo.expat-2.2.4.dll
    pvt.cppan.demo.freedesktop.fontconfig.fontconfig-2.12.1.dll
    pvt.cppan.demo.freetype-2.8.1.dll
    pvt.cppan.demo.gnome.glib.glib-2.50.3.dll
    pvt.cppan.demo.gnome.glib.gobject-2.50.3.dll
    pvt.cppan.demo.gnome.pango.pango-1.40.9.dll
    pvt.cppan.demo.gnome.pango.pangocairo-1.40.9.dll
    pvt.cppan.demo.gnome.pango.pangoft2-1.40.9.dll
    pvt.cppan.demo.gnu.gettext.intl-0.19.8.dll
    pvt.cppan.demo.gnu.iconv.libcharset-1.15.0.dll
    pvt.cppan.demo.gnu.iconv.libiconv-1.15.0.dll
    pvt.cppan.demo.jpeg-9.2.0.dll
    pvt.cppan.demo.madler.zlib-1.2.11.dll
    pvt.cppan.demo.openjpeg.openjp2-2.1.2.dll
    pvt.cppan.demo.pcre.pcre-8.40.0.dll
    pvt.cppan.demo.png-1.6.30.dll
    pvt.cppan.demo.tiff-4.0.8.dll
    pvt.cppan.demo.unicode.icu.common-59.1.0.dll
    pvt.cppan.demo.unicode.icu.data-59.1.0.dll
    pvt.cppan.demo.unicode.icu.i18n-59.1.0.dll
    pvt.cppan.demo.webp-0.6.0.dll
    pvt.cppan.demo.weltling.winlibs.libffi-3.2.1.dll
    pvt.cppan.demo.xz_utils.lzma-5.2.3.dll
    tesseract.exe
    tesseract.ilk
    tesseract.pdb
    tesseract400d.dll
    tesseract400d.ilk
    tesseract400d.pdb

I can run it in commandline now
tesseract.exe phototest.tif stdout



 Page 1
 This is a lot of 12 point text to test the
 ocr code and see if it works on all types
 of file format.
 
 The quick brown dog jumped over the
 lazy fox. The quick brown dog jumped
 over the lazy fox. The quick brown dog
 jumped over the lazy fox. The quick
 brown dog jumped over the lazy fox.
 

Expected Behavior:
I hope to run it with code method, such as [this](https://github.com/tesseract-ocr/tesseract/wiki/APIExample#basic-example), but not in commandline. If I can get all .lib, then I can build a new project and import to use it. But I get few .lib and most .dll...So how to use it by this code method?
Reply all
Reply to author
Forward
0 new messages