←Select platform

FieldType Property

Summary

The OMR field type.

Syntax
C#
C++/CLI
Python
public OMRFieldType FieldType {get; set;} 
public:  
   property OMRFieldType^ FieldType 
   { 
      OMRFieldType^ get() 
      void set(OMRFieldType^ value) 
   } 
FieldType # get and set (OMRField) 

Property Value

Specifies the OMR field type.

Example
C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing.Core; 
 
 
public void FindCandidateFormFieldsCommandExample() 
{ 
 
   RasterCodecs codecs = new RasterCodecs(); 
 
   RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, @"Forms\Forms to be Recognized\OMR\AnswerSheet_Pattern.jpg"), 0, Leadtools.Codecs.CodecsLoadByteOrder.Bgr, 1, 1); 
   FindCandidateFormFieldsCommand findFields = new FindCandidateFormFieldsCommand(); 
   findFields.HorizontalLineMinimumLength = (char)10; 
   findFields.VerticalLineMinimumLength = (char)3; 
   findFields.Run(image); 
 
   TextField[] textFields = findFields.TextFieldAreas; 
   OMRField[] omrFields = findFields.OMRFieldAreas; 
 
 
   foreach (TextField field in textFields) 
   { 
      // Function TODO : Drawing rectangle field.Bounds 
      // Function TODO : Drawing rectangle field.FilledAreaBounds 
   } 
          
   foreach (OMRField field in omrFields) 
   { 
      if (field.FieldType == BoxOMR) 
      { 
         // Function TODO : Drawing rectangle field.UnFilledBound 
      } 
      { 
         // Function TODO : Drawing circle field.UnFilledBound 
      } 
   } 
          
   image.Dispose(); 
 
   codecs.Dispose(); 
} 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images"; 
} 
Requirements

Target Platforms

Help Version 22.0.2023.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.ImageProcessing.Core Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.