Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, May 6, 2008 10:43:59 PM(UTC)

Johnny  
Johnny

Groups: Registered
Posts: 3


Hi,

We got a couple of concurrent runtime OCR licenses. Is it possible to have any examples to use OCR concurrent licenses by threads?

Thanks,

Johnny.
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, May 7, 2008 12:41:20 AM(UTC)

Johnny  
Johnny

Groups: Registered
Posts: 3


I did a simple test as below. But it does not work with the runtime licenses.

Public Class OCR

Private _RasterDocument As RasterDocumentEngine
Private _codecs As RasterCodecs
Public Sub New()
RasterSupport.Unlock(RasterSupportType.Ocr, "XXXXXXXX")
'2 Concurrent Runtime Licenses

RasterCodecs.Startup()
_codecs = New RasterCodecs

_RasterDocument = RasterDocumentEngine.Instance
_RasterDocument.Startup()
End Sub

End Class

Sub Main()
Dim ocr1 As New OCR
Dim ocr2 As New OCR
End Sub

 
#3 Posted : Wednesday, May 7, 2008 3:02:00 AM(UTC)

Johnny  
Johnny

Groups: Registered
Posts: 3


Sorry, the code is missing one line. But it is still not working. Are there any settings required or any way to apply 2 concurrent licenses?

Public Class OCR

Private _RasterDocument As RasterDocumentEngine
Private _codecs As RasterCodecs
Public Sub New()
RasterSupport.Unlock(RasterSupportType.Document, "XXXXXXXX")
RasterSupport.Unlock(RasterSupportType.Ocr, "XXXXXXXX")
'2 Concurrent Runtime Licenses

RasterCodecs.Startup()
_codecs = New RasterCodecs

_RasterDocument = RasterDocumentEngine.Instance
_RasterDocument.Startup()
End Sub

End Class

Sub Main()
Dim ocr1 As New OCR
Dim ocr2 As New OCR
End Sub
 
#4 Posted : Wednesday, May 7, 2008 7:00:03 AM(UTC)

Qasem Lubani  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

The OCR engine can only be initialized once at a time, and cannot be accessed from
multiple threads in the same process simultaneously.

The only way to use multiple instances of the OCR engine on the same PC is to run
completely separate instances of the application (running from separate
processes).

Also, if you have an OCR session, you cannot access this session from multiple
threads. The thread that creates the session and initializes the engine should
be the same thread that adds a page and performs recognition, then shuts down
the engine.
This limitation is from the OCR engine itself and cannot be overridden.

Edit by moderator:
The newer versions of LEADTOOLS, there's advanced support for OCR multi-threading, including a dedicated demo for that.

Edited by moderator Tuesday, October 25, 2016 10:50:40 AM(UTC)  | Reason: Not specified

 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.090 seconds.