1. Why do you use PSM_SINGLE_BLOCK_VERT_TEXT for single character?
   2. If I got it right - if you use command line you read image data from
   disk, when you use API you read image data from memory (cv?). Try to avoid
   using different sources (e.g. read image from disk in case of API to avoid
   mistakes in reading from memory...)


Zdenko


On Fri, Apr 18, 2014 at 9:37 AM, Vipul Aggarwal <[email protected]>wrote:

> Running tesseract through terminal leads to good result, but something
> might be wrong in my c++ implementation.
> Please respond!
>
>
> On Thursday, April 10, 2014 9:33:20 PM UTC+5:30, Vipul Aggarwal wrote:
>>
>> I am working on images with single character.
>> However, tesseract is unable to recognize them.
>>
>> This is how I initialized it:
>>         tess.Init(NULL, "eng", tesseract::OEM_DEFAULT);
>>  tess.SetPageSegMode(tesseract::PSM_SINGLE_BLOCK_VERT_TEXT);
>> tess.SetVariable("tessedit_char_whitelist",
>> "ABCDEFGHIJKLMNOPQRSTUVWXYZ");
>>
>> This is what i do for recognition:
>> tess.SetImage((uchar*)rotatedImage.data, rotatedImage.cols,
>> rotatedImage.rows, 1, rotatedImage.cols);
>>  char* out = tess.GetUTF8Text();
>>
>>
>> I am attaching images
>>
>  --
> --
> 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/d/optout.
>

-- 
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 http://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tesseract-ocr/CAJbzG8zKPpcEcHOp3HLF3nOd8uJnw1u4ZQwo473geip%3D9t9Egw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to