# [−][src]Function arrayfire::gaussian_kernel

pub fn gaussian_kernel(

rows: i32,

cols: i32,

sigma_r: f64,

sigma_c: f64

) -> Array<f32>

Creates a Gaussian Kernel.

This function creates a kernel of a specified size that contains a Gaussian distribution. This distribution is normalized to one. This is most commonly used when performing a Gaussian blur on an image. The function takes two sets of arguments, the size of the kernel (width and height in pixels) and the sigma parameters (for row and column) which effect the distribution of the weights in the y and x directions, respectively.

Changing sigma causes the weights in each direction to vary. Sigma is calculated internally as (0.25 * rows + 0.75) for rows and similarly for columns.

# Parameters

`rows`

is number of rows of kernel`cols`

is number of cols of kernel`sigma_r`

is standard deviation of rows`sigma_c`

is standard deviation of cols

# Return Values

An Array with gaussian kernel values