Learn R Programming

Rvision (version 0.4.2)

gaussianBlur: Blurs an Image Using a Gaussian Filter

Description

gaussianBlur convolves the source image with the specified Gaussian kernel. The result is a blurred version of the source image.

Usage

gaussianBlur(
  image,
  k_height = 5,
  k_width = 5,
  sigma_x = 1,
  sigma_y = 1,
  in_place = FALSE
)

Arguments

image

An Image object.

k_height

The half-height in pixels of the kernel (default: 5).

k_width

The half-width in pixels of the kernel (default: 5).

sigma_x

The standard deviation of the kernel along the x axis (default: 1).

sigma_y

The standard deviation of the kernel along the y axis (default: 1).

in_place

A logical indicating whether the change should be applied to the image itself (TRUE, faster but destructive) or to a copy of it (FALSE, the default, slower but non destructive).

Value

An Image object if in_place=FALSE. Otherwise, it returns nothing and modifies image in place.

See Also

Image, boxFilter, blur

Examples

Run this code
# NOT RUN {
balloon <- image(system.file("sample_img/balloon1.png", package = "Rvision"))
balloon_blur <- gaussianBlur(balloon, 11, 11, 5, 5)
plot(balloon_blur)

# }

Run the code above in your browser using DataLab