Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
:: (Image src, Integral (ImagePixel src), Bounded res, Eq res, Storable res) | |
=> Int | Radius of the Sobel's filter. |
-> Int32 | Low threshold. Pixels for which the bidirectional derivative is greater than this value and which are connected to another pixel which is part of an edge will be part of this edge. |
-> Int32 | High threshold. Pixels for which the bidirectional derivative is greater than this value will be part of an edge. |
-> src | |
-> Manifest res |
Detects edges using the Canny's algorithm. Edges are given the value
maxBound
while non-edges are given the value minBound
.
This implementation doesn't perform any noise erasing (as blurring) before edge detection. Noisy images might need to be pre-processed using a Gaussian blur.
The bidirectional derivative (gradient magnitude) is computed from x
and
y
derivatives using sqrt(dx² + dy²)
.
See http://en.wikipedia.org/wiki/Canny_edge_detector for details.
This function is specialized for Grey
images but is declared INLINABLE
to be further specialized for new image types.