Learn R Programming

imager (version 0.42.19)

deriche: Apply recursive Deriche filter.

Description

The Deriche filter is a fast approximation to a Gaussian filter (order = 0), or Gaussian derivatives (order = 1 or 2).

Usage

deriche(im, sigma, order = 0L, axis = "x", neumann = FALSE)

Arguments

im

an image

sigma

Standard deviation of the filter.

order

Order of the filter. 0 for a smoothing filter, 1 for first-derivative, 2 for second.

axis

Axis along which the filter is computed ( 'x' , 'y', 'z' or 'c').

neumann

If true, use Neumann boundary conditions (default false, Dirichlet)

Examples

Run this code
deriche(boats,sigma=2,order=0) %>% plot("Zeroth-order Deriche along x")
deriche(boats,sigma=2,order=1) %>% plot("First-order Deriche along x")
deriche(boats,sigma=2,order=1) %>% plot("Second-order Deriche along x")
deriche(boats,sigma=2,order=1,axis="y") %>% plot("Second-order Deriche along y")

Run the code above in your browser using DataLab