我想调用谷歌提供的tesseract ocr开源代码,发现在无法用,我把开源代码发到工程下,无法调用!不知道那位大侠能帮助一下,怎么用C++去调用!麻烦给一个案例出来,我也在网上找好很多,但我用调用 的时候会出错很多地方 ,而且出错的地方都在tesseract ocr源码中!所以让我头痛啊?
网上找的例子:#include "stdafx.h"
#include "tesseract\baseapi.h"
#include "tesseract\strngs.h"
int _tmain(int argc, _TCHAR* argv[])
{
const char * image = "image.jpg";
tesseract::TessBaseAPI api;
api.Init(NULL, "eng", tesseract::OEM_DEFAULT);
api.SetVariable( "tessedit_char_whitelist",
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" ); STRING text_out;
if (!api.ProcessPages(image, NULL, 0, &text_out))
{
return 0;
} printf(text_out.string()); return 0;
}
这个我在用得时候,不能调用会出现很多错误!求解决方法啊
网上找的例子:#include "stdafx.h"
#include "tesseract\baseapi.h"
#include "tesseract\strngs.h"
int _tmain(int argc, _TCHAR* argv[])
{
const char * image = "image.jpg";
tesseract::TessBaseAPI api;
api.Init(NULL, "eng", tesseract::OEM_DEFAULT);
api.SetVariable( "tessedit_char_whitelist",
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" ); STRING text_out;
if (!api.ProcessPages(image, NULL, 0, &text_out))
{
return 0;
} printf(text_out.string()); return 0;
}
这个我在用得时候,不能调用会出现很多错误!求解决方法啊
http://tesseract-ocr.googlecode.com/svn/trunk/vs2008/doc/overview.html
http://blog.csdn.net/xiaochunyong/article/details/7193744
http://wenku.baidu.com/view/92264def81c758f5f61f67fd.html
http://code.google.com/p/tesseract-ocr/