Safe Haskell | None |
---|
Efficient computation of stencil based convolutions.
- data Stencil sh a = StencilStatic {
- stencilExtent :: !sh
- stencilZero :: !a
- stencilAcc :: !(sh -> a -> a -> a)
- data Boundary 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.
BoundConst a | Treat points outside as having a constant value. |
BoundClamp | Clamp points outside to the same value as the edge pixel. |