dilate2#

rlemasklib.dilate2(rle)[source]#

Dilate a mask with a round 5x5 kernel.

The kernel is 0 in the four corners, otherwise 1.

0 1 1 1 0
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
0 1 1 1 0
Parameters:

rle (dict) – an RLE mask dictionary

Returns:

An RLE mask dictionary of the dilated mask.

Return type:

dict