Learn R Programming

Rvision (version 0.4.2)

laplacian: Calculates the Laplacian of an Image

Description

laplacian calculates the Laplacian of the source image by adding up the second x and y derivatives calculated using the Sobel operator.

Usage

laplacian(image, k_size = 5, scale = 1, in_place = FALSE)

Arguments

image

An Image object.

k_size

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

scale

The scale factor for the computed Laplacian values (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, sobel

Examples

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

# }

Run the code above in your browser using DataLab