ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 IEVision
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

win568

Austria
16 Posts

Posted - Dec 03 2012 :  05:26:09  Show Profile  Reply
Hi Guys

We need a version of IEVision were we can execute the CreateOCR Function several times. We use it to extract text from images in a multithreaded environment. Is this possible ??

xequte

38615 Posts

Posted - Dec 03 2012 :  13:06:41  Show Profile  Reply
Hi

You can create it as often as you like, just ensure you null it between calls:

e_OCR := IEVisionLib.createOCR(':ENG');
e_OCR.recognize(ivw.IEBitmap.GetIEVisionImage(),IEVisionRect(ocrrect.x, ocrrect.y, ocrrect.width, ocrrect.height)).c_str();
e_OCR := nil;

e_OCR := IEVisionLib.createOCR('swedish');
e_OCR.recognize(ivw.IEBitmap.GetIEVisionImage(),IEVisionRect(ocrrect.x, ocrrect.y, ocrrect.width, ocrrect.height)).c_str();
e_OCR := nil;

e_OCR := IEVisionLib.createOCR('german');
e_OCR.recognize(ivw.IEBitmap.GetIEVisionImage(),IEVisionRect(ocrrect.x, ocrrect.y, ocrrect.width, ocrrect.height)).c_str();
e_OCR := nil;



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

win568

Austria
16 Posts

Posted - Dec 03 2012 :  14:04:13  Show Profile  Reply
Hi Nigel

Thank you for your reply. My Problem is that i cannot serialize it. The OCR recognition will be executed in several threads. When the User selects a file in the GUI, a thread will be executed to extract the text. When the User selects an Other file, a Second Thread will be executed. In this Case the recognition can work parallel.

That is my Problem. Ehen the Second Thread will be executed, i got an exception
Go to Top of Page

fab

1310 Posts

Posted - Dec 14 2012 :  04:22:53  Show Profile  Reply
At the moment the OCR engine is not thread-safe. Only one TIEVisionOCR can work for each thread.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: