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