improve Tesseract performance with OpenCV on Android

后端 未结 4 1324
小鲜肉
小鲜肉 2021-01-12 16:07

I am working on a Android application using real-time OCR. I using OpenCV and Tesseract Library. But the performance is very poor, even on my Galaxy SIII. There are any meth

4条回答
  •  情话喂你
    2021-01-12 16:55

    You can have Tesseract only do the recognition pass 1, so that it skips passes 2 through 9, when it calls recog_all_words().

    Change the following line in baseapi.cpp and rebuild your Tesseract library project:

    if (tesseract_->recog_all_words(page_res_, monitor, NULL, NULL, 0)) {
    

    Change it to:

    if (tesseract_->recog_all_words(page_res_, monitor, NULL, NULL, 1)) {
    

提交回复
热议问题