sobel_filter: Calculating sobel filters

Description Usage Arguments Functions See Also Examples

View source: R/filters.R

Description

The sobel filter is used to detect edges in the images

Usage

1
2
3
compile_sobel_filter(width, dim_img)

sobel_filter(img, width = 3, img_fft = fftwtools::fftw2d(img))

Arguments

width

width of the filter to be applied

dim_img

the dimensions of the image to be used later during filtering, only needed if pre-compiling the filter.

img

Dimensions of the image

img_fft

optional argument to pass the pre-computed fourier tranform of the image from 'fftwtools::fftw2d(img)'.

Functions

See Also

Other filters: circular_hough_transform(), compile_hough_circle_draw(), compile_variance_filter(), dog_filter()

Examples

1
2
3
4
5
test_image <- matrix(runif(81), 9)
sobel_filter(test_image, 3)

my_sobel_filter <- compile_sobel_filter(3, dim(test_image))
my_sobel_filter(test_image)

jspaezp/clasifierrr documentation built on March 2, 2020, 11:20 a.m.