EdgeDetectStatisticalCommand Class (original) (raw)

Summary

Detects edges by examining the variation of colors in all directions using statistical indices.

Syntax

C#

Objective-C

C++/CLI

Java

Python

@interface LTEdgeDetectStatisticalCommand : LTRasterCommand 

public class EdgeDetectStatisticalCommand extends RasterCommand

public ref class EdgeDetectStatisticalCommand : public RasterCommand   
class EdgeDetectStatisticalCommand(RasterCommand): 

Example

Run the EdgeDetectStatisticalCommand on an image.

using Leadtools; using Leadtools.Codecs; using Leadtools.ImageProcessing.Effects; public void EdgeDetectStatisticalCommandExample() { // Load an image RasterCodecs codecs = new RasterCodecs(); codecs.ThrowExceptionsOnInvalidImages = true; RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "ImageProcessingDemo\\NaturalFruits.jpg")); // Prepare the command EdgeDetectStatisticalCommand command = new EdgeDetectStatisticalCommand(); command.Dimension = 15; command.Threshold = 128; command.EdgeColor = new RasterColor(255, 255, 255); command.BackGroundColor = new RasterColor(0, 0, 0); // Apply an edge detector statistical command. command.Run(image); codecs.Save(image, Path.Combine(LEAD_VARS.ImagesDir, "Result.jpg"), RasterImageFormat.Jpeg, 24); } static class LEAD_VARS { public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images"; }