spatialGradient: First Order Derivatives of an Image with the Sobel Operator

View source: R/filters.R

spatialGradientR Documentation

First Order Derivatives of an Image with the Sobel Operator

Description

spatialGradient calculates the first order derivative of an image in both x and y using a Sobel operator.

Usage

spatialGradient(image, k_size = 5)

Arguments

image

An Image object.

k_size

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

Value

A list containing two Image objects, one of for the derivative along the x axis and the other for the derivative along the y axis.

Author(s)

Simon Garnier, garnier@njit.edu

See Also

Image, sobel

Examples

balloon <- image(system.file("sample_img/balloon1.png", package = "Rvision"))
balloon_gradient <- spatialGradient(balloon, 5)


swarm-lab/Rvision documentation built on Feb. 7, 2024, 4:59 a.m.