CloseRegion


Performs a morphological closing on a region using selected predefined kernel.

Applications:Filling-in small gaps in a region without making it thicker.

Syntax

C++
C#
Python
 
def CloseRegion(
	inRegion: Region,
	outRegion: Region,
	/,
	*,
	inKernel: KernelShape = KernelShape.Box,
	inRadiusX: int = 1,
	inRadiusY: int | None = None
)
-> None

Parameters

Name Type Range Default Description
Input value inRegion Region Input region
Input value inKernel KernelShape KernelShape.Box Kernel shape (predefined)
Input value inRadiusX int 0 - 1 Nearly half of the kernel's width (2*R+1)
Input value inRadiusY int | None 0 - None Nearly half of the kernel's height (2*R+1), or same as inRadiusX
Output value outRegion Region Output region