Read simplified Chinese with tesseract orc C ++?

At first I tried 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 use Windows 10, visual studio 2013. The output I always get is E.

The jug that I use. I am also trying jpg, tif the same result.

enter image description here

+5
source share

All Articles