SetVariable - classify_save_adapted_templates - problem

23 views
Skip to first unread message

Andrew Reed

unread,
May 28, 2014, 8:34:05 AM5/28/14
to tesser...@googlegroups.com
Hello!

I have a problem with the classify_save_adapted_templates option within SetVariable. I set this to "1" but when running tesseract I get the following error:

Saving adapted templates to .a ...Class->NumConfigs == this->fontset_table_.get(
Class->font_set_id).size:Error:Assert failed:in file ..\..\classify\intproto.cpp
, line 1199

This is on a windows 7 machine, Python Tesseract wrapper (https://code.google.com/p/python-tesseract/), using english only.

When I try the same again from Ubuntu 14.04 I get:

Saving adapted templates to .a ...Class->NumConfigs == this->fontset_table_.get(
Class->font_set_id).size:Error:Assert failed:in file intproto.cpp, line 1216
Segmentation fault (core dumped)

This time also using a different wrapper (https://github.com/virtuald/python-tesseract-sip), still using english as only language.

I have tried ordering the code differently but this has not made any difference.

Example of Python code being used:

import tesseract

mImgFile = "example.jpg"
mBuffer=open(mImgFile,"rb").read()
api = tesseract.TessBaseAPI()
api.Init(".","eng",tesseract.OEM_DEFAULT)
api.SetVariable("tessedit_char_whitelist", "0123456789abcdefghijklmnopqrstuvwxyz")
api.SetPageSegMode(tesseract.PSM_AUTO)
api.SetVariable("classify_save_adapted_templates","1")

What am I doing wrong?
Reply all
Reply to author
Forward
0 new messages