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



rect
The Segmentation Rectangle surrounding the object to be segmented
Initializes a new AutoSegmentCommand class object with explicit parameters.

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal rect As Rectangle _
)
Visual Basic (Usage)Copy Code
Dim rect As Rectangle
 
Dim instance As AutoSegmentCommand(rect)
C# 
public AutoSegmentCommand( 
   Rectangle rect
)
C++/CLI 
public:
AutoSegmentCommand( 
   Rectangle rect
)

Parameters

rect
The Segmentation Rectangle surrounding the object to be segmented

Example

Runs the AutoSegmentCommand on the Image.

Visual BasicCopy Code
Public Sub AutoSegmentConstructorExample()
   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 AutoSegmentCommand = New AutoSegmentCommand(New Rectangle(50, 100, 100, 150))
   command.Run(leadImage)

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

    // 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 
    // Apply  
    AutoSegmentCommand command = new AutoSegmentCommand(new Rectangle(25, 25, 50, 100)); 
    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