←Select platform

Threshold Property

Summary
Gets or sets a value that indicates the correlation threshold.
Syntax
C#
Objective-C
C++/CLI
Java
Python
public int Threshold { get; set; } 
@property (nonatomic, assign) NSUInteger threshold; 
public int getThreshold(); 
public void setThreshold( 
   int intValue 
); 
public: 
property int Threshold { 
   int get(); 
   void set (    int ); 
} 
Threshold # get and set (CorrelationListCommand) 

Property Value

Value that indicates the correlation threshold, which is a measure of association required to consider two areas to be correlated. If the correlation value between an image in the list and an area in the image is less than the correlation threshold they are uncorrelated. Valid values range from 0 (zero resemblance) to 100 (perfect resemblance).

Example
C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing; 
using Leadtools.ImageProcessing.Core; 
 
public void CorrelationListCommandExample() 
{ 
   // Load an image 
   RasterCodecs codecs = new RasterCodecs(); 
   codecs.ThrowExceptionsOnInvalidImages = true; 
 
   RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "clean.tif")); 
 
   CorrelationListCommand command = new CorrelationListCommand(); 
   CopyRectangleCommand copyRectangle = new CopyRectangleCommand(); 
 
   LeadRect rc_cor = new LeadRect(458, 591, 21, 28); 
   copyRectangle.Rectangle = rc_cor; 
   copyRectangle.Run(image); 
   command.CorrelationImage = copyRectangle.DestinationImage.Clone(); 
 
   rc_cor = new LeadRect(507, 591, 21, 28); 
   copyRectangle.Rectangle = rc_cor; 
   copyRectangle.Run(image); 
   command.CorrelationImage.AddPage(copyRectangle.DestinationImage.Clone()); 
 
   command.Points = new LeadPoint[30]; 
   command.ListIndex = new int[30]; 
   command.Threshold = 90; 
   command.XStep = 1; 
   command.YStep = 1; 
   command.Run(image); 
 
} 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images"; 
} 
Requirements

Target Platforms

Help Version 22.0.2023.11.1
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.ImageProcessing.Core Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.