Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

blur_anisotropic

Blur image anisotropically, in an edge-preserving way.


Description

Standard blurring removes noise from images, but tends to smooth away edges in the process. This anisotropic filter preserves edges better.

Usage

blur_anisotropic(
  im,
  amplitude,
  sharpness = 0.7,
  anisotropy = 0.6,
  alpha = 0.6,
  sigma = 1.1,
  dl = 0.8,
  da = 30,
  gauss_prec = 2,
  interpolation_type = 0L,
  fast_approx = TRUE
)

Arguments

im

an image

amplitude

Amplitude of the smoothing.

sharpness

Sharpness.

anisotropy

Anisotropy.

alpha

Standard deviation of the gradient blur.

sigma

Standard deviation of the structure tensor blur.

dl

Spatial discretization.

da

Angular discretization.

gauss_prec

Precision of the diffusion process.

interpolation_type

Interpolation scheme. Can be 0=nearest-neighbor | 1=linear | 2=Runge-Kutta

fast_approx

If true, use fast approximation (default TRUE)

Examples

im <- load.image(system.file('extdata/Leonardo_Birds.jpg',package='imager'))
im.noisy <- (im + 80*rnorm(prod(dim(im)))) 
blur_anisotropic(im.noisy,ampl=1e4,sharp=1) %>% plot

imager

Image Processing Library Based on 'CImg'

v0.42.10
LGPL-3
Authors
Simon Barthelme [aut], David Tschumperle [ctb], Jan Wijffels [ctb], Haz Edine Assemlal [ctb], Shota Ochi [cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.