repeat#
- rlemasklib.RLEMask.repeat(num_h, num_w, inplace=False)[source]#
Repeat the mask pixels multiple times along the axes.
This method is analogous to
np.repeat(notnp.tile).This repeats each pixel in the mask num_h times along the vertical axis and num_w times along the horizontal axis.
- Parameters:
- Returns:
An RLEMask object representing the repeated mask (self if inplace=True)
- Return type:
Examples
Repeat each pixel 2x vertically and 3x horizontally (upscales the mask):
.repeat(2, 3) ==See also
Not to be confused with
tile()