←Select platform

FormDropoutColor Constructor(int,int,int,int,int,int)

Summary

Initializes a new instance of FormDropoutColor with the specified RGB thresholds.

Syntax

C#
C++/CLI
Java
Python
public FormDropoutColor( 
   int lowRed, 
   int lowGreen, 
   int lowBlue, 
   int highRed, 
   int highGreen, 
   int highBlue 
) 

Parameters

lowRed

The minimum red value.

lowGreen

The minimum green value.

lowBlue

The minimum blue value.

highRed

The maximum red value.

highGreen

The maximum green value.

highBlue

The maximum blue value.

public FormDropoutColor( 
   int lowRed, 
   int lowGreen, 
   int lowBlue, 
   int highRed, 
   int highGreen, 
   int highBlue 
); 
public:  
   FormDropoutColor( Int32 lowRed, Int32 lowGreen, Int32 lowBlue, Int32 highRed, Int32 highGreen, Int32 highBlue) 
__init__(self,lowRed,lowGreen,lowBlue,highRed,highGreen,highBlue) # Overloaded constructor 

Remarks

This constructor initializes a FormDropoutColor class object with integer RGB thresholds used to apply color dropout in the Form.

Calling FormProcessingEngine.Process(LEADDocument,IList<PageAlignment>) will apply the color dropout on the form.

Example

C#
Java
using Leadtools; 
using Leadtools.Barcode; 
using Leadtools.Codecs; 
using Leadtools.Forms.Common; 
using Leadtools.Ocr; 
using Leadtools.Forms.Processing; 
using Leadtools.Forms.Recognition; 
using Leadtools.Forms.Recognition.Barcode; 
using Leadtools.Forms.Recognition.Ocr; 
using Leadtools.Document; 
 
///This method processes the recognized form. 
private void ProcessForm(FormProcessingEngine processingEngine, MyForm form) 
{ 
   form.ProcessingPages = form.Master.ProcessingPages; 
   processingEngine.Pages.Clear(); 
   processingEngine.Pages.AddRange(form.ProcessingPages); 
   processingEngine.Process(form.Image, form.Alignment); 
} 
 
import static org.junit.Assert.assertTrue; 
 
import java.io.File; 
import java.io.FileNotFoundException; 
import java.io.IOException; 
import java.nio.file.Files; 
import java.nio.file.Path; 
import java.nio.file.Paths; 
import java.util.ArrayList; 
import java.util.Scanner; 
import java.util.UUID; 
 
import org.junit.*; 
import org.junit.runner.JUnitCore; 
import org.junit.runner.Result; 
import org.junit.runner.notification.Failure; 
 
import leadtools.*; 
import leadtools.ocr.*; 
import leadtools.codecs.*; 
import leadtools.document.*; 
import leadtools.forms.common.*; 
import leadtools.forms.processing.*; 
import leadtools.forms.recognition.*; 
import leadtools.forms.recognition.ocr.OcrObjectsManager; 
 
 
/*class MasterForm { 
   public RasterImage Image; 
   public FormRecognitionAttributes Attributes; 
   public FormRecognitionProperties Properties; 
   public FormPages ProcessingPages; 
   public FormRecognitionEngine recognitionEngine = new FormRecognitionEngine(); 
 
   /// This constructor initializes all MasterForm members to zero/null/Empty. 
   public MasterForm() { 
      Image = null; 
      Attributes = recognitionEngine.createMasterForm("MasterFormExample", UUID.randomUUID(), null); 
      Properties = FormRecognitionProperties.getEmpty(); 
      ProcessingPages = null; 
   } 
} 
 
class MyForm { 
   public String FileName; 
   public RasterImage Image; 
   public FormRecognitionAttributes Attributes; 
   public MasterForm Master; 
   public FormRecognitionResult Result; 
   public ArrayList<PageAlignment> Alignment; 
   public FormPages ProcessingPages; 
 
   /// This constructor initializes all MyForm members to zero/null/Empty. 
   public MyForm() { 
      FileName = null; 
      Image = null; 
      Attributes = new FormRecognitionAttributes(); 
      Master = new MasterForm(); 
      Result = null; 
      Alignment = null; 
   } 
} 
 
// This method processes the recognized form. 
public void FormProcessingEngineProcessFormExample() throws Exception { 
   final String LEAD_VARS_IMAGES_DIR = "C:\\LEADTOOLS23\\Resources\\Images"; 
   String attributesFileName = combine(LEAD_VARS_IMAGES_DIR, "\\\\Forms\\\\MasterForm Sets\\\\OCR\\\\FFC-107.bin"); 
   String fieldsFileName = combine(LEAD_VARS_IMAGES_DIR, "\\\\Forms\\\\MasterForm Sets\\\\OCR\\\\FFC-107.xml"); 
   String imageFileName = combine(LEAD_VARS_IMAGES_DIR, "\\Forms\\MasterForm Sets\\OCR\\FFC-107.tif"); 
 
   RasterCodecs codecs = new RasterCodecs(); 
   FormRecognitionEngine recognitionEngine = new FormRecognitionEngine(); 
   FormProcessingEngine processingEngine = new FormProcessingEngine(); 
 
   byte[] formData; 
   MasterForm masterForm = new MasterForm(); 
   formData = Files.readAllBytes(Paths.get(attributesFileName)); 
   masterForm.Attributes = new FormRecognitionAttributes(); 
   masterForm.Attributes.setData(formData); 
   masterForm.Properties = recognitionEngine.getFormProperties(masterForm.Attributes); 
   masterForm.ProcessingPages = new FormPages(); 
   processingEngine.loadFields(fieldsFileName); 
   masterForm.ProcessingPages.addAll(processingEngine.getPages()); 
   masterForm.Image = codecs.load(imageFileName, 1, CodecsLoadByteOrder.BGR, 1, -1); 
 
   MyForm form = new MyForm(); 
 
   form.ProcessingPages = form.Master.ProcessingPages; 
   processingEngine.getPages().clear(); 
   processingEngine.getPages().addAll(form.ProcessingPages); 
   processingEngine.process(form.Image, form.Alignment); 
}*/ 

Requirements

Target Platforms

See Also

FormDropoutColor Class

FormDropoutColor Members

Leadtools.Forms.Processing Namespace

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

Leadtools.Forms.Processing Assembly

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