Module imgproc_rs::filter[][src]

A module for image filtering operations

Functions

alpha_trimmed_mean_filter

Applies an alpha-trimmed mean filter, where each output pixel is the mean of the pixels in a (2 * radius + 1) x (2 * radius + 1) kernel in the input image, with the lowest alpha / 2 pixels and the highest alpha / 2 pixels removed.

bilateral_filter

Applies a bilateral filter using CIE LAB

box_filter

Applies a normalized box filter using a size x size kernel

derivative_mask

Applies a separable derivative mask to a grayscale image

filter_1d

Applies a 1D filter. If is_vert is true, applies kernel as a vertical filter; otherwise applies kernel as a horizontal filter

gaussian_blur

Applies a Gaussian blur using a size x size kernel

laplacian

Applies the Laplacian operator to a grayscale image. Output contains positive and negative values - use normalize_laplacian() for visualization

laplacian_of_gaussian

Applies the Laplacian of Gaussian operator using a size x size kernel to a grayscale image. Output contains positive and negative values - use normalize_laplacian() for visualization

linear_filter

Applies a linear filter using the 2D kernel

median_filter

Applies a median filter, where each output pixel is the median of the pixels in a (2 * radius + 1) x (2 * radius + 1) kernel in the input image. Based on Ben Weiss’ partial histogram method, using a tier radix of 2. A detailed description can be found here.

normalize_laplacian

Normalizes the result of a Laplacian or Laplacian of Gaussian operator to the range [0, 255]

prewitt

Applies the Prewitt operator to a grayscale image

residual

Returns the residual image of a filter operation

separable_filter

Applies a separable linear filter by first applying vert_kernel and then horz_kernel

sharpen

Sharpens image

sobel

Applies the Sobel operator to a grayscale image

sobel_weighted

Applies a Sobel operator with weight weight to a grayscale image

threshold

Performs a thresholding operation based on method

unseparable_filter

Applies an unseparable linear filter

unsharp_masking

Sharpens image by applying the unsharp masking kernel

weighted_avg_filter

Applies a weighted average filter using a size x size kernel with a center weight of weight