網頁

2018年10月26日 星期五

Tesseract API for VS2017

參照 Tesseract OCR 安裝

c:\users\userName\.cppan\stroage 目錄下搜尋 leptonica
可以找到 C:\Users\userName\.cppan\storage\src\8f\a3\90d7\src 目錄
拷貝所有檔案至 C:\Program Files\tesseract\include\leptonica

VS2013 不能編譯, VS2017 才可以
Property Pages/Platform 選 x64
Property Pages/Configuration 選 Debug
Property Pages/Configuration Properties/Debugging/Environment
PATH=%PATH%;D:\TensorFlow\OCR\tesseract\win64\bin\Debug
Property Pages/Configuration Properties/C/C++/General/Additional Include Directories
新增 C:\Program Files\tesseract\include
Property Pages/Configuration Properties/Linker/General/Additional Library Directories
新增 D:\TensorFlow\OCR\tesseract\win64\Debug
Property Pages/Configuration Properties/Linker/Input/Additional Dependencies
新增 tesseract40d.lib
新增 pvt.cppan.demo.danbloomberg.leptonica-1.76.0.lib

Property Pages/Platform 選 x64
Property Pages/Configuration 選 Release
Property Pages/Configuration Properties/Debugging/Environment
PATH=%PATH%;C:\Program Files\tesseract\bin
Property Pages/Configuration Properties/C/C++/General/Additional Include Directories
新增 C:\Program Files\tesseract\include
Property Pages/Configuration Properties/Linker/General/Additional Library Directories
新增 C:\Program Files\tesseract\lib
Property Pages/Configuration Properties/Linker/Input/Additional Dependencies
新增 tesseract40.lib
新增 pvt.cppan.demo.danbloomberg.leptonica-1.76.0.lib

執行 Debug 程式時,若是使用 Release 的 lib, delete GetUTF8Text() 產生的記憶體
會產生 Exception


沒有留言:

張貼留言