Learn R Programming

Rvision (version 0.4.2)

sobel: Calculates an Image Derivatives Using an Extended Sobel Operator

Description

sobel calculates the first, second, third, or mixed image derivatives of an image using an extended Sobel operator.

Usage

sobel(image, dx = 1, dy = 1, k_size = 5, scale = 1, in_place = FALSE)

Arguments

image

An Image object.

dx

Order of the x derivative (default: 1).

dy

Order of the y derivative (default: 1),

k_size

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

scale

The scale factor for the computed derivative 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, laplacian, scharr

Examples

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

# }

Run the code above in your browser using DataLab