DetectEdges

Detects the edges in the current image using various one and two dimensional algorithms. If the greyscale parameter is set to false the detected edges will maintain the pixel colors of the originl image.

public ImageFactory DetectEdges(IEdgeFilter filter, bool greyscale = true)
    

Parameters

filter
The ImageProcessor.Imaging.Filters.EdgeDetection.IEdgeFilter to detect edges with.
greyscale
Whether to convert the image to greyscale first. Defaults to true.

Available filters are:

  • KayyaliEdgeFilter
  • KirschEdgeFilter
  • Laplacian3X3EdgeFilter
  • Laplacian5X5EdgeFilter
  • LaplacianOfGaussianEdgeFilter
  • PrewittEdgeFilter
  • RobertsCrossEdgeFilter
  • ScharrEdgeFilter
  • SobelEdgeFilter

Examples

Original

original image

Kayyali

image with kayyali filter applied

Kirsch

image with kirsch filter applied

Laplacian3X3

image with laplacian3X3 filter applied

Laplacian5X5

image with laplacian5X5 filter applied

LaplacianOfGaussian

image with laplaciangaussian filter applied

Prewitt

image with prewitt filter applied

RobertsCross

image with robertscross filter applied

Scharr

image with scharr filter applied

Sobel

image with sobel filter applied