vlkit.geometry package

Submodules

vlkit.geometry.distance_transform module

vlkit.geometry.distance_transform.distance_transform(x)[source]

distance transform

Parameters

x (np.ndarray) – a [h w] binary map

Returns

tuple containing:

dist (np.ndarray): the distance matrix [h w]

yxs (np.ndarray): the coordinates of nearest points [2 h w]

field (np.ndarray): the directional vector field [2 h w]

Return type

(tuple)

_images/distance_transform.svg

See an example here

Module contents