close

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

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

Note: Closing works only for 2D binary images.

Slice!(kind, [2], T*)
close
(
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*)

Closed image slice, of same type as input image.

Meta