dog_filter: Calculates the difference of gaussian filter

Description Usage Arguments Functions See Also Examples

View source: R/filters.R

Description

This filter attempts to enhance the features in an image, it is based on subtracting a blurry image from a less blurry one. The ratio of this blurrines is measured by the ratio in their 'sigma'.

Usage

1
2
3
dog_filter(img, width, ratio = 5, img_fft = fftwtools::fftw2d(img))

compile_dog_filter(width, dim_img, ratio = 5)

Arguments

img

Dimensions of the image

width

width of the filter to be applied

ratio

the ratio of the sigma between the blurrier and the less blurry images

img_fft

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

dim_img

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

Functions

See Also

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

Examples

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

my_dog_filter <- compile_dog_filter(3, dim(test_image))
my_dog_filter(test_image)

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