←Select platform

SmoothEdgesCommand Constructor(int,int)

Summary
Initializes a new SmoothEdgesCommand class object with explicit parameters.
Syntax
C#
Objective-C
C++/CLI
Java
Python
public SmoothEdgesCommand( 
   int amount, 
   int threshold 
) 
- (instancetype)initWithAmount:(NSUInteger)amount threshold:(NSUInteger)threshold NS_DESIGNATED_INITIALIZER; 
public SmoothEdgesCommand( 
   int amount, 
   int threshold 
); 
public: 
SmoothEdgesCommand(  
   int amount, 
   int threshold 
) 
__init__(self,amount,threshold) # Overloaded constructor 

Parameters

amount
This is a percentage value that indicates blur size. 0 means no blurring and 100 means total blurring.

threshold
Threshold value used to determine which pixels are edge pixels. If the difference determined for a pixel is greater than this value, the pixel is an edge. Valid values range from 0 through 255.

Example

Run the SmoothEdgesCommand on an image.

C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing.Effects; 
 
 
public void SmoothEdgesConstructorExample() 
{ 
   // Load an image 
   RasterCodecs codecs = new RasterCodecs(); 
   codecs.ThrowExceptionsOnInvalidImages = true; 
 
   RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "sample5.cmp")); 
 
   // Prepare the command 
   SmoothEdgesCommand command = new SmoothEdgesCommand(75, 0); 
   // Apply the Smooth Edge effect to the image. 
   command.Run(image); 
 
} 
 
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.