Difference edge detector.

Namespace:  AForge.Imaging.Filters
Assembly:  AForge.Imaging (in AForge.Imaging.dll) Version: 2.2.5.0 (2.2.5.0)

Syntax

C#
public class DifferenceEdgeDetector : BaseUsingCopyPartialFilter

Remarks

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):

Copy 
P1 P2 P3
P8  x P4
P7 P6 P5
The corresponding pixel of the result image equals to:
Copy 
max( |P1-P5|, |P2-P6|, |P3-P7|, |P4-P8| )

The filter accepts 8 bpp grayscale images for processing.

Sample usage:

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

Initial image:

Result image:

Inheritance Hierarchy

System..::.Object
  AForge.Imaging.Filters..::.BaseUsingCopyPartialFilter
    AForge.Imaging.Filters..::.DifferenceEdgeDetector

See Also