←Select platform

MaximumError Property

Summary
Gets or sets the maximum error for the approximation algorithm.
Syntax
C#
C++/CLI
Python
public int MaximumError { get; set; } 
public: 
property int MaximumError { 
   int get(); 
   void set (    int ); 
} 
MaximumError # get and set (ContourFilterCommand) 

Property Value

Maximum error for the approximation algorithm. Values can be from 0 to 255. Default is 5. This property is only valid if the Type property is set to ApproxColor.

Example
C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing.Effects; 
 
 
public void ContourFilterCommandExample() 
{ 
   // Load an image 
   RasterCodecs codecs = new RasterCodecs(); 
   codecs.ThrowExceptionsOnInvalidImages = true; 
 
   RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, @"ImageProcessingDemo\Beauty16.jpg"), 16, CodecsLoadByteOrder.BgrOrGray, 1, 1); 
 
   // Prepare the command 
   ContourFilterCommand command = new ContourFilterCommand(); 
   command.Threshold = 15; 
   command.DeltaDirection = 35; 
   command.MaximumError = 5; 
   command.Type = ContourFilterCommandType.Thin; 
   command.Run(image); 
   codecs.Save(image, Path.Combine(LEAD_VARS.ImagesDir, "Result.jpg"), RasterImageFormat.Jpeg, 24); 
 
} 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS23\Resources\Images"; 
} 
Requirements

Target Platforms

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

Leadtools.ImageProcessing.Effects Assembly

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