An unofficial TypeScript port of Coco API's maskApi.c
(reference).
Coco API uses a modified version of Run Length Encoding (RLE) to efficiently store image masks. RLE data is further compressed via a modified version of LEB128 (which can be inuitively considered LEB32
).
coco-maskapi
aims to bring this flavor of mask compression/encoding to web browsers, favoring Canvas ImageData as the data source and target.
Function | Status |
---|---|
rleEncode |
🧑🏭 WIP |
rleDecode |
🧑🏭 WIP |
rleMerge |
🗒️ TODO |
rleArea |
🗒️ TODO |
rleNMS |
🗒️ TODO (?) |
bbIou |
🗒️ TODO |
bbNms |
🗒️ TODO (?) |
rleToBbox |
🗒️ TODO |
rleFrBbox |
🗒️ TODO |
uintCompare |
🗒️ TODO |
rleFrPoly |
🗒️ TODO |
rleToString |
🧑🏭 WIP |
rleFrString |
🧑🏭 WIP |
pnpm install
pnpm dev
/
, base example/worst
, worst case experimentation