Gets or sets a value that indicates the maximum number of threads to use when recognizing a document.
public int MaximumThreadsPerJob { get; set; }
Property MaximumThreadsPerJob As Integer
@property (nonatomic, assign) NSInteger maximumThreadsPerJob
public int getMaximumThreadsPerJob()
public void setMaximumThreadsPerJob(int value)
An Int32 value that indicates the maximum number of threads to use when recognizing a document. Must be greater than or equals to 0 and less than or equals to 64. Default value is 0.
A value of 0 means use maximum number of CPUs/cores available to the machine. The engine will read this value from System.Environment.ProcessorCount.
The IOcrAutoRecognizeManager supports converting a single document using multiple threads using the Run, RunJob and RunJobAsync methods. You can enable this feature by setting MaximumThreadsPerJob to 0 (for maximum CPUs/cores) or a value greater than 1.
The LEADTOOLS OCR Module - LEAD Engine uses the system thread pool and does not require a set number of threads. A value of 1 will disable threading and any other value will be treated as "use multi-threading".
Not all OCR engines support multi-threading in this fashion. If multi-threading supported, then IsMultiThreadedSupported will be true and the value of MaximumThreadsPerJob is used.
If the OCR engine does not support multi-threading, then IsMultiThreadedSupported will be false and the value of MaximumThreadsPerJob is not used (ignored).
The following table lists the LEADTOOLS OCR engines and whether they support multi-threading in IOcrAutoRecognizeManager:
OCR Engine |
Multi-threaded supported in IOcrAutoRecognizeManager |
---|---|
OcrEngineType.LEAD/> Win32 (x86) version | Yes |
OcrEngineType.LEAD/> x64 version | Yes |
OcrEngineType.OmniPage/> Win32 (x86) version | Yes |
OcrEngineType.OmniPage/> x64 version | No |
OcrEngineType.Arabic/> Win32 (x86) version | No |
OcrEngineType.Arabic/> x64 version | No |
Note: This property is not used and will be ignored when using engine native format (DocumentFormat.User and IOcrDocumentManager.EngineFormat).
Some OCR engine types support creating multi-threaded documents by creating one IOcrEngine and multiple IOcrDocument or IOcrAutoRecognizeJob each in its own dedicated threads. For more information, refer to Multi-Threading with LEADTOOLS OCR.
IOcrAutoRecognizeManager Interface
IOcrAutoRecognizeManager Members
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.