EdgeDetectEffectCommand Class (original) (raw)

Summary

Performs edge detection on the image.

Syntax

C#

Objective-C

C++/CLI

Java

Python

@interface LTEdgeDetectEffectCommand : LTRasterCommand 

public class EdgeDetectEffectCommand extends RasterCommand

class EdgeDetectEffectCommand(RasterCommand): 

Example

Run the EdgeDetectEffectCommand on an image.

using Leadtools; using Leadtools.Codecs; using Leadtools.ImageProcessing.Effects; public void EdgeDetectEffectCommandExample() { // Load an image RasterCodecs codecs = new RasterCodecs(); codecs.ThrowExceptionsOnInvalidImages = true; RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "sample5.cmp")); // Prepare the command EdgeDetectEffectCommand command = new EdgeDetectEffectCommand(); command.Level = 50; command.Threshold = 0; command.Type = EdgeDetectEffectCommandType.Smooth; // Apply find edges effect on the image. 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"; }