C# Class Accord.Imaging.Filters.DifferenceEdgeDetector

Difference edge detector.

The filter finds objects' edges by calculating maximum difference between pixels in 4 directions around the processing pixel.

Suppose 3x3 square element of the source image (x - is currently processed pixel): P1 P2 P3 P8 x P4 P7 P6 P5 The corresponding pixel of the result image equals to: max( |P1-P5|, |P2-P6|, |P3-P7|, |P4-P8| )

The filter accepts 8 bpp grayscale images for processing.

Sample usage:

// create filter DifferenceEdgeDetector filter = new DifferenceEdgeDetector( ); // apply the filter filter.ApplyInPlace( image );

Initial image:

Result image:

Inheritance: BaseUsingCopyPartialFilter
Show file Open project: accord-net/framework Class Usage Examples

Public Methods

Method Description
DifferenceEdgeDetector ( ) : System

Initializes a new instance of the DifferenceEdgeDetector class.

Protected Methods

Method Description
ProcessFilter ( UnmanagedImage sourceData, UnmanagedImage destinationData, Rectangle rect ) : void

Process the filter on the specified image.

Method Details

DifferenceEdgeDetector() public method

Initializes a new instance of the DifferenceEdgeDetector class.
public DifferenceEdgeDetector ( ) : System
return System

ProcessFilter() protected method

Process the filter on the specified image.
protected ProcessFilter ( UnmanagedImage sourceData, UnmanagedImage destinationData, Rectangle rect ) : void
sourceData UnmanagedImage Source image data.
destinationData UnmanagedImage Destination image data.
rect System.Drawing.Rectangle Image rectangle for processing by the filter.
return void