avg_pool2x2#

rlemasklib.RLEMask.avg_pool2x2()[source]#

Average-pool the mask by a factor of 2.

Each 2x2 block in the input produces a single pixel in the output, which is 1 if more than half the pixels (>=2 of 4) in the block are 1.

Returns:

A new RLEMask object representing the average-pooled mask.

Return type:

RLEMask

Examples

.avg_pool2x2() ==