cwitools.extraction.obj2binary

cwitools.extraction.obj2binary(obj_mask, obj_id)

Get a binary mask of specific objects in a labelled object mask.

Parameters:
  • obj_mask (numpy.ndarray) – Data cube containing labelled regions.
  • obj_id (int or list) – Object ID or list of object IDs to include.
Returns:

The binary mask, where 1 = object, and 0 = background.

Return type:

numpy.ndarray