Hello,

I have an image in which alphanumeric characters as also special characters
may appear. I have confiigured Tesseract to include only numeric characters
in the white list. However, when I process the image all characters get
recognised. Where am I going wrong? Here is my code:

///////////////////////////////////////////////////////////////////////////////////////////////////
BOOL bResult = TRUE;
tesseract::TessBaseAPI api;
ETEXT_DESC* monitor = NULL;
ETEXT_DESC* head = NULL;

bResult = api.SetVariable("classify_bln_numeric_mode", "T");
bResult = api.SetVariable("tessedit_char_blacklist",
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
bResult = api.SetVariable("tessedit_char_whitelist", "0123456789");
bResult = api.Init("", "eng", tesseract::OEM_DEFAULT);
api.SetVariable("save_blob_choices", "T");
api.SetPageSegMode(static_cast<tesseract::PageSegMode>(7));
api.SetOutputName("out");

StartTimer();
api.SetImage((uchar*)(m_OrigImage.GetImage()->imageData),
m_OrigImage.Width(), m_OrigImage.Height(),
m_OrigImage.GetImage()->nChannels, m_OrigImage.GetImage()->widthStep);
int nResult = api.Recognize(monitor);
        const char* out = api.GetUTF8Text();
//////////////////////////////////////////////////////////////////////////////////////////////////

This a VC8 program running on WIN XP.

Thanks,

Kishor Durve

-- 
-- 
You received this message because you are subscribed to the Google
Groups "tesseract-ocr" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/tesseract-ocr?hl=en

--- 
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].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to