isarandi / rlemasklib

Manipulate run-length encoded image masks
Other
6 stars 4 forks source link
compression-algorithm computer-vision cython image-mask image-masking image-processing image-segmentation mask python run-length run-length-encoding runlengthencoding segmentation

Run-Length Encoded Mask Operations

This library is an extended and improved version of the COCO API's pycocotools.mask module (which was originally written by Piotr Dollár and Tsung-Yi Lin).

It offers the following additional features:

List of functions

Encoding / decoding (between run lengths and binary masks)

Compression / decompression (between compressed and uncompressed run lengths)

Initialization

Set operations

Measurements

Crop / pad / shift by offset

Connected components

Conversions (bounding box, polygon)