Learn R Programming

imager (version 0.42.10)

imsharpen: Sharpen image.

Description

The default sharpening filter is inverse diffusion. The "shock filter" is a non-linear diffusion that has better edge-preserving properties.

Usage

imsharpen(im, amplitude, type = "diffusion", edge = 1, alpha = 0, sigma = 0)

Arguments

im

an image

amplitude

Sharpening amplitude (positive scalar, 0: no filtering).

type

Filtering type. "diffusion" (default) or "shock"

edge

Edge threshold (shock filters only, positive scalar, default 1).

alpha

Window size for initial blur (shock filters only, positive scalar, default 0).

sigma

Window size for diffusion tensor blur (shock filters only, positive scalar, default 0).

Examples

Run this code
# NOT RUN {
layout(t(1:2))
plot(boats,main="Original")
imsharpen(boats,150)  %>% plot(main="Sharpened")
# }

Run the code above in your browser using DataLab