Hi,
Since I am doing exactly the same and it works for me, I would say something is 
going wrong when you call SetImage or your picture is has is the problem or you 
routing to get the picture buffer.
You can try to recognize your image using the tesseract.exe, if you get result 
then it's the routine it no then probably the image is causing the problem.
I use following code and I get results, if tesseract can regonize it.

pTessBase->Init(AppDataPath, "eng");
pTessBase->SetImage(pbuffer, rect.width, rect.height, 1, rect.width);
const char* ocr = pTessBase->GetUTF8Text();

Regards,
Mike

-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] Im 
Auftrag von srinivasan
Gesendet: Mittwoch, 4. Mai 2011 14:41
An: tesseract-ocr
Betreff: how to recognize the text in an image?

Hi,

Im trying to recognize english text from an image. the steps i
followed :

1. I created a tesseract object
2. Initialized the language to english using the trained data in
tessdata folder
3. I set the image using setImage method
4. Im trying to get the UTF8text using getUTF8Text method

The language is getting initialized successfully, then im setting the
image but Im getting an empty text.

In baseapi.cpp it is mentioned as after setting the image, we can call
getUTF8Text() it will automatically perform recognition.

How to do recognition? whether im missing any step?

Please help me out.

Thanks,
Srinivasan

--
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

This message is confidential and intended only for the addressee. If you have 
received this message in error, please immediately notify the 
[email protected] and delete it from your system as well as any copies. The 
content of e-mails as well as traffic data may be monitored by NDS for 
employment and security purposes.
To protect the environment please do not print this e-mail unless necessary.

An NDS Group Limited company. www.nds.com

-- 
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

Reply via email to