crop#

rlemasklib.RLEMask.crop(bbox, inplace=False)[source]#

Crop the mask to the bounding box.

Parameters:
  • bbox (ndarray) – a bounding box, in the format [x_start, y_start, width, height]

  • inplace – whether to perform the operation in place or to return a new object

Returns:

An RLEMask object representing the cropped mask.

Return type:

RLEMask

See also

tight_crop()