Compares the images in a list with all the areas of the same
dimensions in an image and finds those portions that match according
to the measure of correlation. This method is only available in the
Document/Medical toolkits.
Syntax
Example
Run the CorrelationListCommand on an image.
Visual Basic | Copy Code |
---|
Public Sub CorrelationListCommandExample()
RasterCodecs.Startup()
Dim codecs As RasterCodecs = New RasterCodecs()
codecs.ThrowExceptionsOnInvalidImages = True
Dim image As RasterImage = codecs.Load(LeadtoolsExamples.Common.ImagesPath.Path + "Master.jpg")
Dim command As CorrelationListCommand = New CorrelationListCommand()
Dim copyRectangle As CopyRectangleCommand = New CopyRectangleCommand()
Dim rc_cor As Rectangle = New Rectangle(327, 378, 22, 28)
copyRectangle.Rectangle = rc_cor
copyRectangle.Run(image)
command.CorrelationImage = copyRectangle.DestinationImage.Clone()
rc_cor = New Rectangle(283, 378, 22, 28)
copyRectangle.Rectangle = rc_cor
copyRectangle.Run(image)
command.CorrelationImage.AddPage(copyRectangle.DestinationImage.Clone())
Dim points(30) As Point
Dim listIndex(30) As Integer
command.Points = points
command.ListIndex = listIndex
command.Threshold = 90
command.XStep = 1
command.YStep = 1
command.Run(image)
RasterCodecs.Shutdown()
End Sub |
C# | Copy Code |
---|
public void CorrelationListCommandExample() { // Load an image RasterCodecs.Startup(); RasterCodecs codecs = new RasterCodecs(); codecs.ThrowExceptionsOnInvalidImages = true; RasterImage image = codecs.Load(LeadtoolsExamples.Common.ImagesPath.Path + "Master.jpg"); CorrelationListCommand command = new CorrelationListCommand(); CopyRectangleCommand copyRectangle = new CopyRectangleCommand(); Rectangle rc_cor = new Rectangle(327, 378, 22, 28); copyRectangle.Rectangle = rc_cor; copyRectangle.Run(image); command.CorrelationImage = copyRectangle.DestinationImage.Clone(); rc_cor = new Rectangle(283, 378, 22, 28); copyRectangle.Rectangle = rc_cor; copyRectangle.Run(image); command.CorrelationImage.AddPage(copyRectangle.DestinationImage.Clone()); command.Points = new Point[30]; command.ListIndex = new int[30]; command.Threshold = 90; command.XStep = 1; command.YStep = 1; command.Run(image); RasterCodecs.Shutdown(); } |
Remarks
Inheritance Hierarchy
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