{ } Raw JSON

bundles / skimage latest / skimage / morphology / _misc_cy / _remove_objects_by_distance

fused_cython_function

skimage.morphology._misc_cy:_remove_objects_by_distance

Signature

def   _remove_objects_by_distance ( out border_indices inner_indices kdtree p_norm min_distance shape )

Summary

Remove objects, in specified order, until remaining are a minimum distance apart.

Extended Summary

Remove labeled objects from an image until the remaining ones are spaced more than a given distance from one another. By default, smaller objects are removed first.

Parameters

out

An array with labels for each object in image matching it in shape.

border_indices, inner_indices

Indices into out for the border of objects (border_indices) and the inner part of objects (inner_indices). border_indices determines the iteration order; objects that are indexed first are preserved. Indices must be sorted such, that indices pointing to the same object are next to each other.

kdtree : scipy.spatial.cKDTree

A KDTree containing the coordinates of all objects in image.

min_distance

The minimal allowed distance between objects.

p_norm

The Minkowski p-norm used to calculate the distance between objects. Defaults to 2 which corresponds to the Euclidean distance.

shape

The shape of the unraveled image.

Aliases

  • skimage.morphology._misc_cy._remove_objects_by_distance