union#

static rlemasklib.RLEMask.union(masks)[source]#

Return a mask where each pixel is set if at least one of the input masks has the pixel set.

Parameters:

masks (Sequence[RLEMask]) – a list of RLEMask objects

Returns:

A new RLEMask object representing the union of the masks.

Return type:

RLEMask

Examples

Union combines all covered areas from multiple masks:

RLEMask.union([, , ]) ==

See also

__or__(), which provides the union as the | operator.