dcv.imgproc.filter

Module introduces image filtering functions and utilities.

Members

Enums

EdgeKernel
enum EdgeKernel

Convolution kernel type for edge detection.

Functions

bilateralFilter
Slice!(Contiguous, packs, OutputType*) bilateralFilter(Slice!(kind, packs, Iterator) input, float sigmaCol, float sigmaSpace, size_t kernelSize, Slice!(Contiguous, packs, OutputType*) prealloc = emptySlice!(packs, OutputType), TaskPool pool = taskPool)

Bilateral filtering implementation.

boxKernel
Slice!(Contiguous, [2], T*) boxKernel(size_t rows, size_t cols, T value = 1)
Slice!(Contiguous, [2], T*) boxKernel(size_t size, T value = 1)

Box kernel creation.

calcGradients
void calcGradients(InputTensor input, ref Slice!(Contiguous, [2], V*) mag, ref Slice!(Contiguous, [2], V*) orient, EdgeKernel edgeKernelType = EdgeKernel.SIMPLE, TaskPool pool = taskPool)

Calculate gradient magnitude and orientation of an image slice.

calcHistogram
HistogramType calcHistogram(Range range)

Calculate range value histogram.

calcPartialDerivatives
void calcPartialDerivatives(InputTensor input, ref Slice!(Contiguous, [2], V*) fx, ref Slice!(Contiguous, [2], V*) fy, TaskPool pool = taskPool)

Calculate partial derivatives of an slice.

canny
Slice!(Contiguous, [2], V*) canny(Slice!(kind, [2], T*) slice, T lowThresh, T upThresh, EdgeKernel edgeKernelType = EdgeKernel.SOBEL, Slice!(Contiguous, [2], V*) prealloc = emptySlice!([2], V), TaskPool pool = taskPool)

Perform canny filtering on an image to expose edges.

canny
Slice!(Contiguous, [2], V*) canny(Slice!(kind, [2], T*) slice, T thresh, EdgeKernel edgeKernelType = EdgeKernel.SOBEL, Slice!(Contiguous, [2], V*) prealloc = emptySlice!([2], V))

Perform canny filtering on an image to expose edges.

close
Slice!(kind, [2], T*) close(Slice!(kind, [2], T*) slice, Slice!(kind, [2], T*) kernel = radialKernel!T(3), Slice!(kind, [2], T*) prealloc = emptySlice!([2], T), TaskPool pool = taskPool)

Perform morphological $(LINK3 https://en.wikipedia.org/wiki/Closing_(morphology),closing).

dilate
Slice!(kind, [2], T*) dilate(Slice!(kind, [2], T*) slice, Slice!(kind, [2], T*) kernel = radialKernel!T(3), Slice!(kind, [2], T*) prealloc = emptySlice!([2], T), TaskPool pool = taskPool)

Perform morphological $(LINK3 https://en.wikipedia.org/wiki/Dilation_(morphology),dilation).

edgeKernel
Slice!(Contiguous, [2], T*) edgeKernel(EdgeKernel kernelType, GradientDirection direction)

Create a kernel of given type.

erode
Slice!(kind, [2], T*) erode(Slice!(kind, [2], T*) slice, Slice!(kind, [2], T*) kernel = radialKernel!T(3), Slice!(kind, [2], T*) prealloc = emptySlice!([2], T), TaskPool pool = taskPool)

Perform morphological $(LINK3 https://en.wikipedia.org/wiki/Erosion_(morphology),erosion).

filterNonMaximum
auto filterNonMaximum(Slice!(kind, [2], Iterator) input, size_t filterSize = 10)

Perform non-maxima filtering of the image.

gaussian
Slice!(Contiguous, [2], V*) gaussian(V sigma, size_t width, size_t height)

Instantiate 2D gaussian kernel.

histEqualize
auto histEqualize(Slice!(kind, packs, T*) slice, HistogramType histogram, Slice!(Contiguous, packs, T*) prealloc = emptySlice!(packs, T))

Histogram Equalization.

laplacian
Slice!(Contiguous, [2], T*) laplacian(T a = 0.)

Create negative laplacian 3x3 kernel matrix.

laplacianOfGaussian
Slice!(Contiguous, [2], T*) laplacianOfGaussian(T sigma, size_t width, size_t height)

Create laplacian of gaussian $(LINK3 http://homepages.inf.ed.ac.uk/rbf/HIPR2/log.htm, (LoG)) filter kernel.

medianFilter
Slice!(Contiguous, packs, O*) medianFilter(Slice!(kind, packs, T*) slice, size_t kernelSize, Slice!(Contiguous, packs, O*) prealloc = emptySlice!(packs, O), TaskPool pool = taskPool)

Median filtering algorithm.

nonMaximaSupression
Slice!(Contiguous, [2], V*) nonMaximaSupression(InputTensor mag, InputTensor orient, Slice!(Contiguous, [2], V*) prealloc = emptySlice!([2], V), TaskPool pool = taskPool)

Edge detection impulse non-maxima supression.

open
Slice!(kind, [2], T*) open(Slice!(kind, [2], T*) slice, Slice!(kind, [2], T*) kernel = radialKernel!T(3), Slice!(kind, [2], T*) prealloc = emptySlice!([2], T), TaskPool pool = taskPool)

Perform morphological $(LINK3 https://en.wikipedia.org/wiki/Opening_(morphology),opening).

prewitt
Slice!(Contiguous, [2], T*) prewitt(GradientDirection direction)

Create a Prewitt edge kernel.

radialKernel
Slice!(Contiguous, [2], T*) radialKernel(size_t radius, T foreground = 1, T background = 0)

Radial kernel creation.

scharr
Slice!(Contiguous, [2], T*) scharr(GradientDirection direction)

Create a Scharr edge kernel.

sobel
Slice!(Contiguous, [2], T*) sobel(GradientDirection direction)

Create a Sobel edge kernel.

Meta

Authors

Relja Ljubobratovic

License

$(LINK3 http://www.boost.org/LICENSE_1_0.txt, Boost Software License - Version 1.0).

Module contains:
$(BIG Filter kernel generators: ) boxKernel radianKernel gaussian laplacian laplacianOfGaussian sobel scharr prewitt
$(BIG Image processing functions: ) filterNonMaximum calcPartialDerivatives calcGradients nonMaximaSupression canny bilateralFilter medianFilter calcHistogram histEqualize erode dilate open close