imsharpen: Sharpen image.

View source: R/filtering.R

imsharpenR Documentation

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


layout(t(1:2))
plot(boats,main="Original")
imsharpen(boats,150)  %>% plot(main="Sharpened")

imager documentation built on May 29, 2024, 1:38 a.m.