Initializes a new SigmaCommand class object with explicit parameters.
Syntax
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 Basic | Copy 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")
Dim command As SigmaCommand = New SigmaCommand
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