powered by
spatialGradient calculates the first order derivative of an image in both x and y using a Sobel operator.
spatialGradient
spatialGradient(image, k_size = 5)
An Image object.
Image
The half-size in pixels of the kernel (default: 5).
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.
Image, sobel
sobel
# NOT RUN { balloon <- image(system.file("sample_img/balloon1.png", package = "Rvision")) balloon_gradient <- spatialGradient(balloon, 5) # }
Run the code above in your browser using DataLab