Learn R Programming

Rvision (version 0.4.2)

sqrBoxFilter: Blurs an Image Using a Square Box Filter

Description

sqrBoxFilter calculates the normalized and unnormalized sum of squares of the pixels in a box surrounding focal pixel. The result is a blurred version of the source image.

Usage

sqrBoxFilter(image, k_height = 5, k_width = 5, normalize = TRUE)

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).

normalize

Whether the kernel is to be normalized by its area (default: true).

Value

An Image object.

See Also

Image, boxFilter

Examples

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

# }

Run the code above in your browser using DataLab