repa-algorithms-2.0.0.2: Algorithms using the Repa array library.

Data.Array.Repa.Algorithms.Convolve

Description

Old support for stencil based convolutions.

NOTE: This is slated to be merged with the new Stencil support in the next version of Repa. We'll still expose the convolve function though.

Synopsis

Documentation

convolveSource

Arguments

:: (Elt a, Num a) 
=> (DIM2 -> a)

Use this function to get border elements where the kernel apply.

-> Array DIM2 a

Kernel to use in the convolution.

-> Array DIM2 a

Input image.

-> Array DIM2 a 

Image-kernel convolution, which takes a function specifying what value to return when the kernel doesn't apply.

type GetOut aSource

Arguments

 = (DIM2 -> a)

The original get function.

-> DIM2

The shape of the image.

-> DIM2

Index of element we were trying to get.

-> a 

A function that gets out of range elements from an image.

outAs :: a -> GetOut aSource

Use the provided value for every out-of-range element.

outClamp :: GetOut aSource

If the requested element is out of range use the closest one from the real image.

convolveOutSource

Arguments

:: (Elt a, Num a) 
=> GetOut a

Use this fn to get out of range elements.

-> Array DIM2 a

Kernel

-> Array DIM2 a

Image

-> Array DIM2 a 

Image-kernel convolution, which takes a function specifying what value to use for out-of-range elements.