This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Tuesday, May 6, 2008 10:43:59 PM(UTC)
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.
#2
Posted
:
Wednesday, May 7, 2008 12:41:20 AM(UTC)
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)
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)
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.