Leadtools.ImageProcessing.Core Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
SigmaCommand Constructor(Int32,Int32,Single,Boolean)
See Also  Example
Leadtools.ImageProcessing.Core Namespace > SigmaCommand Class > SigmaCommand Constructor : SigmaCommand Constructor(Int32,Int32,Single,Boolean)



dimension
Dimensions of the neighborhood used for filtering.
sigma
Number of Standard Deviations of the kernel calculated pixels must be within.
threshold
Minimum percentage of pixels included to the number of pixels in the kernel.
outline
Whether the central pixel is included in the calculation of the filter or not.
Initializes a new SigmaCommand class object with explicit parameters.

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal dimension As Integer, _
   ByVal sigma As Integer, _
   ByVal threshold As Single, _
   ByVal outline As Boolean _
)
Visual Basic (Usage)Copy Code
Dim dimension As Integer
Dim sigma As Integer
Dim threshold As Single
Dim outline As Boolean
 
Dim instance As SigmaCommand(dimension, sigma, threshold, outline)
C# 
public SigmaCommand( 
   int dimension,
   int sigma,
   float threshold,
   bool outline
)
C++/CLI 
public:
SigmaCommand( 
   int dimension,
   int sigma,
   float threshold,
   bool outline
)

Parameters

dimension
Dimensions of the neighborhood used for filtering.
sigma
Number of Standard Deviations of the kernel calculated pixels must be within.
threshold
Minimum percentage of pixels included to the number of pixels in the kernel.
outline
Whether the central pixel is included in the calculation of the filter or not.

Example

Runs the SigmaCommand on the Image.

Visual BasicCopy Code
Public Sub SigmaCommandExample()
   RasterCodecs.Startup()
   Dim codecs As New RasterCodecs()
   codecs.ThrowExceptionsOnInvalidImages = True

   Dim leadImage As RasterImage = codecs.Load(LeadtoolsExamples.Common.ImagesPath.Path + "Master.jpg")

   ' Prepare the command
   Dim command As SigmaCommand = New SigmaCommand
   'Apply
   command.Dimension = 10
   command.Sigma = 2
   command.Threshold = 0.2F
   command.Outline = False
   command.Run(leadImage)

   RasterCodecs.Shutdown()
End Sub
C#Copy Code
public void SigmaCommandExample() 

    // Load an image 
    RasterCodecs.Startup(); 
    RasterCodecs codecs = new RasterCodecs(); 
    codecs.ThrowExceptionsOnInvalidImages = true; 
 
    RasterImage image =codecs.Load( "D:\\Lead15\\images2\\LEADTOOLS Images\\Master.jpg"); 
 
    // Prepare the command 
    SigmaCommand command = new SigmaCommand(); 
    //Apply  
    command.Dimension = 10; 
    command.Sigma = 2; 
    command.Threshold = 0.2f; 
    command.Outline = false; 
    command.Run(image); 
 
    RasterCodecs.Shutdown(); 
}

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also