Go to file
sz 74cad11d24 Not the prettiest CMakeLists.txt, but it builds...
will want to bring over some options from the zstd Makefile (or decide
this is a terrible idea and bail out)
2020-08-21 23:45:33 -05:00
bitmap Added some assets to the bitmaps.h file, here they are 2020-08-06 03:06:41 -05:00
samples@39a419ac5c Add samples submodule 2020-08-20 20:16:26 -05:00
src Not the prettiest CMakeLists.txt, but it builds... 2020-08-21 23:45:33 -05:00
test Rolling back a few overambitious (e.g. wrong) optimizations. 2020-05-28 20:18:04 -05:00
.gitignore Update gitignore 2020-04-20 16:16:07 -05:00
.gitmodules Ignore local changes to the samples submodule. 2020-08-20 23:43:56 -05:00
CMakeLists.txt Not the prettiest CMakeLists.txt, but it builds... 2020-08-21 23:45:33 -05:00
DETAILS.md One more batch of docs edits, now with less scare quotes 2020-08-20 20:03:28 -05:00
LICENSE Might as well be license time 2020-05-20 01:45:38 -05:00
PERFORMANCE.md One more batch of docs edits, now with less scare quotes 2020-08-20 20:03:28 -05:00
README.md One more batch of docs edits, now with less scare quotes 2020-08-20 20:03:28 -05:00
TODO.md One more batch of docs edits, now with less scare quotes 2020-08-20 20:03:28 -05:00

README.md

INTRODUCTION | ABOUT | CFC | LIBCIMBAR

DETAILS | PERFORMANCE | TODO

libcimbar: Color Icon Matrix Barcodes

And the quest for 100 kb/s over the air gap...

What is it?

cimbar is a proof-of-concept high-density 2D barcode format. Data is stored in a grid of colored tiles -- bits are encoded based on which tile is chosen, and which color is chosen to draw the tile. Reed Solomon error correction is applied on the data, to account for the lossy nature of the video -> digital decoding. Sub-1% error rates are expected, and corrected.

libcimbar, the optimized implementation, includes a simple protocol for file encoding based on fountain codes (wirehair). Files of up to 16MB can be encoded in a series of cimbar codes, which can be output as a series of images, or -- more usefully -- generated on the fly as a video feed of animated cimbar codes. The magic of fountain codes means that once enough distinct images have been decoded successfully, the file will be reconstructed successfully. This is true even if the images are out of order, or if random images have been corrupted or are missing.

Platforms

The code is written in C++, and developed/tested on amd64+linux and arm64+android. It probably works, or can be made to work, on other platforms. Maybe.

I would like to add emscripten+wasm support.

Library dependencies

OpenCV must be installed before building. All other dependencies are included in the source tree.

Build

cmake .
make -j7
make install

By default, libcimbar will try to put its build products under ./dist/bin/.

Usage

Encode:

  • large input files may fill up your disk with pngs!
./cimbar --encode -i inputfile.txt -o outputprefix -f

Decode (extracts file into output directory):

./cimbar outputprefix-1.png outputprefix-2.png outputprefix-3.png -o /tmp -f

Encode and animate to window:

./cimbar_video inputfile.pdf

Performance numbers

PERFORMANCE

Implementation details

DETAILS

Room for improvement/next steps

TODO

Inspiration

Would you like to know more?

INTRODUCTION | ABOUT