Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

Re: Find words in document and highlight with annotations
Started by Otis at 10-18-2005 11:11. Topic has 9 replies.

Print Search « Previous Thread Next Thread »
  10-18-2005, 11:11
Otis is not online. Last active: 2/23/2010 11:20:57 PM Otis



Top 10 Posts
Joined on 10-19-2004
Charlotte, NC
Posts 331
Find words in document and highlight with annotations

Attachment: Find word and highlight.zip
Reply Quote
The attached VB.NET example will allow you to load an image and perform OCR on it. You can then specify a word you wish to search for within the image. If the word is found, a highlight annotation will be displayed over the word.
Otis Goodwin
LEAD Developer Support
   Report 
  09-13-2007, 15:36
drjones is not online. Last active: 9/13/2007 8:35:56 PM drjones

Not Ranked
Joined on 09-13-2007
Posts 5
Re: Find words in document and highlight with annotations
Reply Quote
Hi:
   Is there a VC++ version of this code? Any pointers would be useful. Thanks. Anand

   Report 
  09-14-2007, 11:15
jigar is not online. Last active: 2/22/2010 1:06:32 PM jigar



Top 10 Posts
Joined on 08-22-2007
Posts 594
Re: Find words in document and highlight with annotations
Reply Quote
Hello,

Unfortunately, we don't have one available in VC++, but the code flow is the same.  You just have to use the corresponding functions available in the API library.  Our C++ Class Library is very close to this.  If you have anything specific that you have trouble with we can help you out with that.

Thank You

LEADTOOLS Technical Support
   Report 
  09-14-2007, 11:56
drjones is not online. Last active: 9/13/2007 8:35:56 PM drjones

Not Ranked
Joined on 09-13-2007
Posts 5
Re: Find words in document and highlight with annotations
Reply Quote
Thanks, I could figure it out. But when I output the recognized word to a file, it prints out hex (even if I use the %s qualifier). Am i missing anything obvious? Thanks

   Report 
  09-14-2007, 12:31
jigar is not online. Last active: 2/22/2010 1:06:32 PM jigar



Top 10 Posts
Joined on 08-22-2007
Posts 594
Re: Find words in document and highlight with annotations
Reply Quote
Hello,

Can you post the code snippet which gets a word from the recognized page and prints it to the console/file.  I'm thinking it's because it might be returning in Unicode char set, but I'm not 100% sure on it.

LEADTOOLS Technical Support
   Report 
  09-14-2007, 12:58
drjones is not online. Last active: 9/13/2007 8:35:56 PM drjones

Not Ranked
Joined on 09-13-2007
Posts 5
Re: Find words in document and highlight with annotations
Reply Quote
yes it is returning the unicode charset. I tried:
myfile << pRecogWords[i].szWord; // (prints unicode)
myfile << printf("%s",pRecogWords[i].szWord); // (prints a single digit)

and similar combinations.

Thanks

   Report 
  09-14-2007, 15:06
jigar is not online. Last active: 2/22/2010 1:06:32 PM jigar



Top 10 Posts
Joined on 08-22-2007
Posts 594
Re: Find words in document and highlight with annotations
Reply Quote
Yes, the szWord is of type L_WCHAR which is the same as WCHAR.  If you want to conver it to a LPCSTR you can use the WideCharToMultiByte() function in windows.h.  Documentation for it is here: http://msdn2.microsoft.com/en-us/library/ms776420.aspx


LEADTOOLS Technical Support
   Report 
  09-27-2007, 10:21
GregR is not online. Last active: 3/18/2010 11:41:49 AM GregR



Top 10 Posts
Joined on 05-31-2006
In House
Posts 2,252
Re: Find words in document and highlight with annotations

Attachment: NET - V15 - Find Word and Highlight.zip
Reply Quote
This demo has been ported to version 15 in VB.NET 2005.

Greg Ross
LEADTOOLS Technical Support
   Report 
  09-27-2007, 10:22
GregR is not online. Last active: 3/18/2010 11:41:49 AM GregR



Top 10 Posts
Joined on 05-31-2006
In House
Posts 2,252
Re: Find words in document and highlight with annotations

Attachment: CLIB - V15 - Find Word and Highlight VC6.zip
Reply Quote
This demo has been ported to version 15 with the C++ Class Library

Greg Ross
LEADTOOLS Technical Support
   Report 
  06-30-2009, 16:06
GregR is not online. Last active: 3/18/2010 11:41:49 AM GregR



Top 10 Posts
Joined on 05-31-2006
In House
Posts 2,252
Re: Find words in document and highlight with annotations
Reply Quote
For 16.0 and 16.5 versions, please visit http://support.leadtools.com/CS/forums/24558/ShowPost.aspx

Greg Ross
LEADTOOLS Technical Support
   Report 
Post
LEAD Support Fo... » Developer » DotNet » Re: Find words in document and highlight with annotations

Powered by Community Server, by Telligent Systems