tesseract error - Image too large

2019-04-09 23:05发布

I am getting below error from tesseract for an image of size 5+ MB.

Tesseract Open Source OCR Engine v3.01 with Leptonica Page 0 Image too large: (39667, 56133) Error during processing.

Is there a limit on file size or is there a parameter to resolve this issue.

Appreciate your help..

2条回答
Root(大扎)
2楼-- · 2019-04-09 23:22

It's not the file size but rather the image size (dimension) that exceeds Tesseract limits. I have no problems with Tesseract recognizing 16MB image. Try resize or rescale your image and try again.

查看更多
萌系小妹纸
3楼-- · 2019-04-09 23:33

The maximum width and height are 32767.

From the source code (file baseapi.cpp):

    if (tesseract_->ImageWidth() > MAX_INT16 ||
        tesseract_->ImageHeight() > MAX_INT16) {
      tprintf("Image too large: (%d, %d)\n",
              tesseract_->ImageWidth(), tesseract_->ImageHeight());
查看更多
登录 后发表回答