←Select platform

Factor Property

Summary
Gets or sets the Threshold factor.
Syntax
C#
Objective-C
C++/CLI
Java
Python
public int Factor { get; set; } 
@property (nonatomic, assign) NSUInteger factor; 
public int getFactor(); 
public void setFactor( 
   int intValue 
); 
public: 
property int Factor { 
   int get(); 
   void set (    int ); 
} 
Factor # get and set (AutoBinarizeCommand) 

Property Value

Value that indicates the threshold factor.

Example
C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing.Core; 
 
public void AutoBinarizeCommandExample() 
{ 
   // Load an image 
   RasterCodecs codecs = new RasterCodecs(); 
   codecs.ThrowExceptionsOnInvalidImages = true; 
 
   RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "noisy_barcode.jpg")); 
 
   AutoBinarizeCommand command = new AutoBinarizeCommand(); 
   command.Flags = AutoBinarizeCommandFlags.UsePercentileThreshold | AutoBinarizeCommandFlags.DontUsePreProcessing; 
   command.Factor = 2000; // use 20% threshold 
   command.Run(image); 
} 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images"; 
} 
Requirements

Target Platforms

Help Version 22.0.2023.11.1
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.