CorrelationCommand Class (original) (raw)

Summary

This command compares the correlation image(or part of the correlation image) with all the areas of the same dimensions in the image to be searched (the Run method image) and finds those portions that match according to the measure of correlation. This command is available in the Document/Medical Toolkits.

Syntax

C#

Objective-C

C++/CLI

Java

Python

@interface LTCorrelationCommand : LTRasterCommand 

public class CorrelationCommand extends RasterCommand

class CorrelationCommand(RasterCommand): 

Example

Run the CorrelationCommand on an image and applies the correlation filter.

using Leadtools; using Leadtools.Codecs; using Leadtools.ImageProcessing.Core; public void CorrelationCommandExample() { // Load an image RasterCodecs codecs = new RasterCodecs(); codecs.ThrowExceptionsOnInvalidImages = true; RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "clean.tif")); // Prepare the command RasterImage DstImage = image.Clone(); CorrelationCommand command = new CorrelationCommand(); command.CorrelationImage = DstImage; command.Threshold = 70; command.XStep = 1; command.YStep = 1; command.Points = new LeadPoint[90]; //Apply the correlation filter. command.Run(image); } static class LEAD_VARS { public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images"; }

Leadtools.ImageProcessing.Core Assembly