nonMaximaSupression

Edge detection impulse non-maxima supression.

Filtering used in canny edge detection algorithm - suppresses all edge impulses (gradient values along edges normal) except the peek value.

Slice!(Contiguous, [2], V*)
nonMaximaSupression
(
InputTensor
V = DeepElementType!InputTensor
)
(
InputTensor mag
,
InputTensor orient
,
Slice!(Contiguous, [2], V*) prealloc = emptySlice!([2], V)
,
TaskPool pool = taskPool
)
in { static assert (isSlice!InputTensor, "Input tensor has to be of type mir.ndslice.slice.Slice"); static assert (InputTensor.init.shape.length == 2, "Input tensor has to be 2 dimensional. (matrix)"); assert (!mag.empty && !orient.empty); assert (mag.shape == orient.shape); assert (mag.strides == orient.strides, "Magnitude and Orientation tensor strides have to be the same."); }

Parameters

mag
Type: InputTensor

Gradient magnitude.

orient
Type: InputTensor

Gradient orientation of the same image source as magnitude.

prealloc
Type: Slice!(Contiguous, [2], V*)

Optional pre-allocated buffer for output slice.

pool
Type: TaskPool

TaskPool instance used parallelise the algorithm.

Note: Orientation and pre-allocated structures must match. If prealloc buffer is not given, orient memory has to be contiguous. See: dcv.imgproc.filter.calcGradients, dcv.imgproc.convolution

Meta