open

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

Performs erosion, than on the resulting eroded image performs dilation.

Note: Opening works only for 2D binary images.

Slice!(kind, [2], T*)
open
(
alias BoundaryConditionTest = neumann
T
SliceKind kind
)
(
Slice!(kind, [2], T*) slice
,
Slice!(kind, [2], T*) kernel = radialKernel!T(3)
,
Slice!(kind, [2], T*) prealloc = emptySlice!([2], T)
,
TaskPool pool = taskPool
)
if (
isBoundaryCondition!BoundaryConditionTest
)

Parameters

slice
Type: Slice!(kind, [2], T*)

Input image slice, to be eroded.

kernel
Type: Slice!(kind, [2], T*)

Erosion/Dilation kernel. Default value is radialKernel!T(3).

prealloc
Type: Slice!(kind, [2], T*)

Optional pre-allocated buffer to hold result.

pool
Type: TaskPool

Optional TaskPool instance used to parallelize computation.

Return Value

Type: Slice!(kind, [2], T*)

Opened image slice, of same type as input image.

Meta