peirick / tesseract-ocr_for_windows Goto Github PK
View Code? Open in Web Editor NEWVisual Studio Projects for Tessearct and dependencies
License: MIT License
Visual Studio Projects for Tessearct and dependencies
License: MIT License
I need little help about usage of tesseract .I am not able to understand that how can i extract text from image using tesseractmain.cpp.I successfully Build the source code .But right stuck at how i can use it to perform basic function of ocr. Or how i can add some kind of wrapper for it .Thanks
Tobias,
The official master for leptonica is now at: github.com/danbloomberg/leptonica
We put it up there in January. As you can imagine, the maintenance and development is much easier than when it was on code.google.com (and only updated with a release every 5 months or so). I particularly like the automatic appveyor windows builds, because I previously had to rely on others to test the code on windows.
I'd rather not have forks if they are not necessary, because they are not efficient and generally cause confusion. Would you like to have responsibility for keeping the master up to date with VS?
-- Dan
Hi,
I have successfully build the solution.But when I run the program using the basic api example it shows nothing.I am new into this and not able to figure out what exactly is wrong or Is there any other method to use tesseract?
Thank you.
Basic API example:
#include <tesseract/baseapi.h>
#include <leptonica/allheaders.h>
int main()
{
char *outText;
tesseract::TessBaseAPI *api = new tesseract::TessBaseAPI();
// Initialize tesseract-ocr with English, without specifying tessdata path
if (api->Init(NULL, "eng")) {
fprintf(stderr, "Could not initialize tesseract.\n");
exit(1);
}
// Open input image with leptonica library
Pix *image = pixRead("/usr/src/tesseract/testing/phototest.tif");
api->SetImage(image);
// Get OCR result
outText = api->GetUTF8Text();
printf("OCR output:\n%s", outText);
// Destroy used object and release memory
api->End();
delete [] outText;
pixDestroy(&image);
return 0;
}
Hello,
I'm not a C++ developper, I've used this code to build Tesseract with VS2015 without problem, and I have a working exe...but what I need is a DLL :)
What have I to do to build a static DLL (without dependency) ?
I've tried to play with cppan but I have an error "list does not recongize sub-commande FILTER" even when I use the provided cppan.yml without any change.
Thanks
EDIT: I've found :)
Build project :)
Now I build this project (pc environment :win7 64bit vs2015)
and it generates some lib file.
**giflib.lib
libjpeg.lib
liblept.lib
libpng.lib
libtesseract.lib
libtiff.lib
libwebp.lib**
I use this code to test the api,
`#include "stdafx.h"
using namespace std;
int main(void)
{
char *str = "e:\1_1.png";
tesseract::TessBaseAPI api;
api.Init(NULL, "eng", tesseract::OEM_DEFAULT);
STRING text_out;
cout << text_out.string();
}`
It shows "LINK : fatal error LNK1104: can not open “giflib.lib”"
can you tell me what's wrong with my project?
Is there a flag or configuration that must be updated before running build_tesseract.bat?
First, thanks for putting all this together!
I had an issue building that I wanted to clarify for anyone else using Visual Studio Express 2015 for Desktop. The output from liblept.sln is liblept.lib instead of leptonica.lib so both .bat files fail. Have you encountered this? We could add a note to the README or update the Project files appropriately.
I'd like to use the repository, but I'm concerned by licensing paranoia.
Could you please apply some permissive software license to the repository?
Thanks
when I build project,it shows that"invalid literal suffix '__LPREFIX'; literal operator or literal operator template 'operator ""__LPREFIX' not found"
zlib.dll is not valid win32 application tesseract . now i have got new error .
I had cloned this git repository then i run the build_tesseract.bat .After that i have build the whole application tried to debug it . Then i got error zlib.dll is not valid win32 application.
thanks for your time
If this dependency is not removed, we are getting a compilation error. Please look into this and adjust the solution file accordingly.
tesseractmain.cpp
c1xx : fatal error C1083: Cannot open source file: '..\tesseract_3.04\api\tesseractmain.cpp': No such file or directory.I have download as it is but while i tried to run it on visual studio 2015 i got error . I m using windows 10 . thanks in advance .
I build on VC++ 2015 CLR support, the Tesseract can work as a console application but When I integrate to to a WinForm Application system with following:
Win 7
X64, Debug
I can compile but it make runtime error (debug assertion failed) when I create an object of tesseract::TessBaseAPI class
tesseract::TessBaseAPI tesseract;
So Until now I can not write a C++/CLR Windows form Application using tesseract OCR, only the console will work as in your code.
can you show us how to solve?
Thanks
I built the tesseract for visual studio 2017 x64 bit and it is running fine. But when i train the data unicharset_extractor is not a command error comes. How to use the training tools?
when i run build_tesseract.bat i get
fatal: Not a git repository (or any of the parent directories): .git
"Program failed, please check this log file for errors ..."
Errorlevel: 128
I keep on getting above link error, while building this Tesseract solution.
plz help me out.
Hi, i got an issue during running tesseract without debugging (ctrl+F5) in vs2015. vs2015 warn me that debug/zlib.lib is not a valid win32 program and just stop running while building (F7) is totally ok and pass.
I downloaded the "VS2015_Tesseract-master.zip", released the file, run build_tesseract.bat through git cmd, and run the tesseract.sln with vs2015. Did i miss somthing? I have no clue about how to solve this problem.Plz help & really thanx a lot!
When i try to debug after build the project suddenly this error comes . Can you guide how i can solve that issue . Thanks For Your Time
@peirick : do you have a plan to support Tesseract 4 ? thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.