Visual Basic (Declaration) | |
---|---|
Public Interface IOcrOmrOptions |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public interface IOcrOmrOptions |
C++/CLI | |
---|---|
public interface class IOcrOmrOptions |
This example will load a TIF image, create OMR zones and recognize them.
OMR stands for Optical Mark Recognition. For more information refer to Using OMR in LEADTOOLS .NET OCR.
You can get the instance of the IOcrOmrOptions interface currently used in the engine with the IOcrSpellCheckManager.OmrOptions property.
With the IOcrOmrOptions interface, you can change the following OMR settings:
Change the frame detection method using the IOcrOmrOptions.FrameDetectionMethod property. Frames stand for the checkbox that may exist around OMR fields. Change the sensitivity of the OMR detection engine using the IOcrOmrOptions.Sensitivity property. Change the characters to use as a replacement for unfilled and filled OMR marks in the output document (for example, in a PDF file) using the IOcrOmrOptions.GetStateRecognitionCharacter and IOcrOmrOptions.SetStateRecognitionCharacter methods.
After you call IOcrPage.Recognize, all the OMR zones in the page will have the OMR properties updated as follows:
Property | Description |
---|---|
OcrZone.OmrState | Either OcrOmrZoneState.Filled if the mark is recognized to be filled or checked, or OcrOmrZoneState.Unfilled if the mark is recognized to be unfilled or unchecked. |
OcrZone.OmrConfidence | A number between 0 and 100 (where 100 is maximum confidence) that specifies the OCR engine confidence in the recognition status in OcrZone.OmrState. |
The OMR zones of a page are zones with the following properties:
Property | Value |
---|---|
OcrZone.FillMethod | Set to OcrZoneFillMethod.Omr |
OcrZone.RecognitionModule | Set to OcrZoneRecognitionModule.Omr |
All LEADTOOLS OCR engines support OMR. However, there is no current support for auto-detecting OMR zones in a page, you have to add the OMR zones manually to the page by setting their boundary (through OcrZone.Bounds, the fill method and recognition module as described above and adding the zone to the page using the IOcrPage.Zones collection before calling IOcrPage.Recognize.
To use OMR in LEADTOOLS, you need a special key to unlock the OMR capabilities. For more information, refer to Unlocking Special LEAD Features.
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family
Reference
IOcrOmrOptions MembersLeadtools.Forms.Ocr Namespace
OcrEngineManager Class
OcrEngineType Enumeration
IOcrPageCollection Interface
IOcrZoneCollection Interface
IOcrZoneManager Interface
OcrZone Structure
OcrZoneRecognitionModule Enumeration
OcrZoneFillMethod Enumeration
Programming with Leadtools .NET OCR
Using OMR in LEADTOOLS .NET OCR
Unlocking Special LEAD Features