This is my image

<https://lh3.googleusercontent.com/-7l8wq8oybP4/WmuBhKbYe6I/AAAAAAAAAQQ/B2dbuxEf_zcDM2LdZH3z9hUEzvmtUOTpwCLcBGAs/s1600/danger_module.png>


And this is my code

#include <tesseract/baseapi.h>
#include <leptonica/allheaders.h>


int main()
{
 tesseract::TessBaseAPI *api = new tesseract::TessBaseAPI();
 api->Init(".\\tessdata", "eng");
 Pix *image = pixRead("image.png");
 api->SetImage(image);
        api->SetPageSegMode(tesseract::PSM_SINGLE_CHAR);

 api->SetSourceResolution(300);
 api->SetVariable("classify_bln_numeric_mode", "1");
 //api->SetVariable("tessedit_char_whitelist", "0123456789");
 api->SetRectangle(61, 4, 38, 22);
 char *outText = api->GetUTF8Text();
 cout << outText << endl;
 api->End();


 return 0;
}


I will get a character *A*. Why my *SetVariable("classify_bln_numeric_mode", 
"1");* don't work normally? And even I use 
*SetVariable("tessedit_char_whitelist", 
"0123456789");*. The result is same still. How to read a digit from a 
specify rectangle?

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tesseract-ocr/30cf0597-d7a3-449f-bcc4-87f9f3d211ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to