Read simplified Chinese with tesseract orc c++?

Viewed 225

First what i have try so far.

Mat im = imread("D:/OutE/cn.png");

cv::Mat gray;
cv::cvtColor(im, gray, CV_BGR2GRAY);
// ...other image pre-processing here...  

// Pass it to Tesseract API  
TessBaseAPI tess;
tess.Init("D:/Program Files/Work/Exp/OCR/tesseract-master", "chi_sim", tesseract::OEM_DEFAULT);

tess.SetPageSegMode(tesseract::PSM_SINGLE_BLOCK);
tess.SetImage((uchar*)gray.data, gray.cols, gray.rows, 1, gray.cols);


char *outText = tess.GetUTF8Text();
CString rstCString(outText);
fprintf(stderr, "%s", outText);

I am using windows 10, visual studio 2013. In output i always get E.

The pitcher i am using. i also try jpg, tif same result.

enter image description here

0 Answers
Related