Safe Haskell | Safe-Infered |
---|
This module is a collection of simple edge detectors.
- sobelOp :: (Int, Int) -> SobelAperture -> ImageOperation GrayScale D32
- sobel :: (Int, Int) -> SobelAperture -> Image GrayScale D32 -> Image GrayScale D32
- laplaceOp :: LaplacianAperture -> ImageOperation GrayScale D32
- laplace :: LaplacianAperture -> Image GrayScale D32 -> Image GrayScale D32
- canny :: Int -> Int -> Int -> Image GrayScale D8 -> Image GrayScale D8
- susan :: (Int, Int) -> D32 -> Image GrayScale D32 -> Image GrayScale D8
- data SobelAperture
- sScharr :: SobelAperture
- s1 :: SobelAperture
- s3 :: SobelAperture
- s5 :: SobelAperture
- s7 :: SobelAperture
- data LaplacianAperture
- l1 :: LaplacianAperture
- l3 :: LaplacianAperture
- l5 :: LaplacianAperture
- l7 :: LaplacianAperture
Common edge detectors
sobelOp :: (Int, Int) -> SobelAperture -> ImageOperation GrayScale D32Source
Perform Sobel filtering on image. First argument gives order of horizontal and vertical derivative estimates and second one is the aperture. This function can also calculate Scharr filter with aperture specification of sScharr
laplaceOp :: LaplacianAperture -> ImageOperation GrayScale D32Source
Perform laplacian filtering of given aperture to image
canny :: Int -> Int -> Int -> Image GrayScale D8 -> Image GrayScale D8Source
Perform canny thresholding using two threshold values and given aperture Works only on 8-bit images
susan :: (Int, Int) -> D32 -> Image GrayScale D32 -> Image GrayScale D8Source
SUSAN edge detection filter, see http://users.fmrib.ox.ac.uk/~steve/susan/susan/susan.html
Various aperture sizes
For added safety we define the possible apertures as constants, since the filters accept only specific mask sizes.
data SobelAperture Source
Aperture sizes for sobel operator
sScharr :: SobelApertureSource
Use Scharr mask instead
data LaplacianAperture Source
Aperture sizes for laplacian operator