Safe Haskell | None |
---|---|
Language | Haskell98 |
Efficient computation of stencil based convolutions.
- data Stencil sh a = StencilStatic {
- stencilExtent :: !sh
- stencilZero :: !a
- stencilAcc :: !(sh -> a -> a -> a)
- data Boundary a
- = BoundFixed !a
- | BoundConst !a
- | BoundClamp
- makeStencil :: Num a => sh -> (sh -> Maybe a) -> Stencil sh a
Documentation
Represents a convolution stencil that we can apply to array. Only statically known stencils are supported right now.
StencilStatic | Static stencils are used when the coefficients are fixed, and known at compile time. |
|
How to handle the case when the stencil lies partly outside the array.
BoundFixed !a | Use a fixed value for border regions. |
BoundConst !a | Treat points outside the array as having a constant value. |
BoundClamp | Clamp points outside to the same value as the edge pixel. |
Stencil creation.
Make a stencil from a function yielding coefficients at each index.