Tesseract gives the same results in cube mode, is this normal/common?

103 views
Skip to first unread message

fsbo.c...@gmail.com

unread,
Sep 3, 2015, 3:04:29 PM9/3/15
to tesseract-ocr

api->SetVariable("tessedit_ocr_engine_mode", "0"); gives the same exact results as api->SetVariable("tessedit_ocr_engine_mode", "1");


are there additional steps that need to be taken to set up cube mode? I am just using it on english text so I haven't done any training of my own for either mode.

fsbo.c...@gmail.com

unread,
Sep 3, 2015, 4:56:43 PM9/3/15
to tesseract-ocr
Further Detail:

        int value123221;

        api->GetIntVariable("tessedit_ocr_engine_mode", &value123221);

        std::cout << value123221 << std::endl;

        std::cout << "Val1" << std::endl;

        api->SetVariable("tessedit_ocr_engine_mode", "3");

        api->GetIntVariable("tessedit_ocr_engine_mode", &value123221);

        std::cout << value123221<< std::endl;

        std::cout << "Val2" << std::endl;


The output from this is:


0

Val1

0

Val2


This means that the setvariable function does not appear to be working for me ... no idea why though.

fsbo.c...@gmail.com

unread,
Sep 3, 2015, 5:06:33 PM9/3/15
to tesseract-ocr
You may notice tessedit_ocr_engine_mode being set to 3 which is of course outside of the accepted range of 0-2, it does not work in the accepted range either, printing 0 just the same. Also, when I call  api->SetVariable("tessedit_char_whitelist", "0123456789abc ... 

it works just fine.

zdenko podobny

unread,
Sep 4, 2015, 4:26:40 AM9/4/15
to tesser...@googlegroups.com
tessedit_ocr_engine_mode is init-only[1] parameter (INT_INIT_MEMBER [2]) e.g. you can set it only during initialization of tesseract. Otherwise it has no effect.



Zdenko

--
You received this message because you are subscribed to the Google Groups "tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-oc...@googlegroups.com.
To post to this group, send email to tesser...@googlegroups.com.
Visit this group at http://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/585a4d35-d485-497d-9b3e-ef56cf831961%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages