I am trying to use tesseract into VS2010 project to get some text from an image.
I am using the following code:
tesseract::TessBaseAPI api;
if(0 != api.Init(NULL, _T("eng"), tesseract::OEM_DEFAULT))
{
m_sError.Format(_T("tesseract initialize error"));
return;
}
api.SetPageSegMode(static_cast<tesseract::PageSegMode>(7));
PIX* pixs = pixRead(sFileName);
STRING txtout;
if(! api.ProcessPages(sFileName, NULL, 0, &txtout))
{
m_sError.Format(_T("tesseract process error"));
return;
}
but I always get error at api.init method ...
I have taken from here the sample code, and the compiled tesseract library. I have applied all specification from that post, and I have tried this even on Release, with the same result.
Also, I have tried to compile the tesseract library on my own, but I have VS2010 only. Here is saying that I need VS2015 or above, and I have found here a VS2010 tesseract binaries, but even here I have met errors at compile time:
fatal error C1083: Cannot open include file: 'allheaders.h': No such file or directory
Why I get Init error ? If there something wrong with my library, can you give me some compiled tesseract library in order to use it in my VS2010 project ? Can you help a little bit ?