vuba.Mask

class vuba.Mask(mask)[source]

Convenience class for performing segmentation to a mask.

Mask enables the creation of a callable that will perform bitwise_and on a given frame with the mask supplied at initiation. This can be useful for performing the same operation on a series of frames.

Parameters

mask (ndarray) – Mask to segment frame(s) to.

Returns

mask – Class object with __call__ method that performs bitwise_and with the mask provided at initiation.

Return type

Mask

Raises

ValueError – If the supplied image is not grayscale.

__init__(mask)[source]

Methods

__init__(mask)