{"id":15216662,"url":"https://github.com/sz3/libcimbar","last_synced_at":"2025-05-13T20:12:33.812Z","repository":{"id":38376791,"uuid":"254456021","full_name":"sz3/libcimbar","owner":"sz3","description":"Optimized implementation for color-icon-matrix barcodes","archived":false,"fork":false,"pushed_at":"2025-04-08T06:08:02.000Z","size":11733,"stargazers_count":5134,"open_issues_count":28,"forks_count":358,"subscribers_count":30,"default_branch":"master","last_synced_at":"2025-04-09T22:08:42.076Z","etag":null,"topics":["barcode","cpp17","fountain-codes","image-hash","opencv","proof-of-concept"],"latest_commit_sha":null,"homepage":"https://cimbar.org","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sz3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-09T19:05:01.000Z","updated_at":"2025-04-09T09:05:55.000Z","dependencies_parsed_at":"2024-03-01T03:30:05.262Z","dependency_job_id":"f8ee9dad-f1a2-4db4-9333-fbe9bb260da6","html_url":"https://github.com/sz3/libcimbar","commit_stats":{"total_commits":681,"total_committers":4,"mean_commits":170.25,"dds":0.1879588839941263,"last_synced_commit":"06305c3523d8e79f88215a5bd2c7d1bad97507b7"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sz3%2Flibcimbar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sz3%2Flibcimbar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sz3%2Flibcimbar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sz3%2Flibcimbar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sz3","download_url":"https://codeload.github.com/sz3/libcimbar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251300020,"owners_count":21567356,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["barcode","cpp17","fountain-codes","image-hash","opencv","proof-of-concept"],"created_at":"2024-09-28T12:01:30.422Z","updated_at":"2025-04-28T10:51:03.817Z","avatar_url":"https://github.com/sz3.png","language":"C++","readme":"### [INTRODUCTION](https://github.com/sz3/cimbar) | [ABOUT](https://github.com/sz3/cimbar/blob/master/ABOUT.md) | [CFC](https://github.com/sz3/cfc) | LIBCIMBAR\n### [DETAILS](DETAILS.md) | [PERFORMANCE](PERFORMANCE.md) | [TODO](TODO.md)\n\n## libcimbar: Color Icon Matrix Barcodes\n\nBehold: an experimental barcode format for air-gapped data transfer.\n\nIt can sustain speeds of 850 kilobits/s (~106 KB/s) using just a computer monitor and a smartphone camera!\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/sz3/cimbar-samples/blob/v0.6/b/4cecc30f.png\" width=\"70%\" title=\"A non-animated mode-B cimbar code\" \u003e\n\u003c/p\u003e\n\n## Explain?\n\nThe encoder outputs an animated barcode to a computer or smartphone screen:\n* Encoder web app: https://cimbar.org\n\nWhile the decoder is a cell phone app that uses the phone camera to read the animated barcode:\n* Decoder android app: https://github.com/sz3/cfc\n\nNo internet/bluetooth/NFC/etc is used. All data is transmitted through the camera lens. You can try it out yourself, or take my word that it works. :)\n\n## How does it work?\n\n`cimbar` is a 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 -\u003e digital decoding. Sub-1% error rates are expected, and corrected.\n\n`libcimbar`, this optimized implementation, includes a simple protocol for file encoding built on fountain codes (`wirehair`) and zstd compression. Files of up to 33MB (after compression!) are encoded in a series of cimbar codes, which can be output as images or a live video feed. Once enough distinct image frames have been decoded successfully, the file will be reconstructed and decompressed successfully. This is true even if the images are received out of order, or if some have been corrupted or are missing.\n\n## Platforms\n\nThe code is written in C++, and developed/tested on amd64+linux, arm64+android (decoder only), and emscripten+WASM (encoder only). It probably works, or can be made to work, on other platforms.\n\nCrucially, because the encoder compiles to asmjs and wasm, it can run on anything with a modern web browser. For offline use, you can either install cimbar.org as a progressive web app, or [download the latest release](https://github.com/sz3/libcimbar/releases/latest) of `cimbar_js.html`, save it locally, and open it in your web browser.\n\n## Library dependencies\n\n[OpenCV](https://opencv.org/) and [GLFW](https://github.com/glfw/glfw) (+ OpenGL ES headers) must be installed before building. All other dependencies are included in the source tree.\n\n* opencv - https://opencv.org/ (`libopencv-dev`)\n* GLFW - https://github.com/glfw/glfw (`libglfw3-dev`)\n* GLES3/gl3.h - `libgles2-mesa-dev`\n* base - https://github.com/r-lyeh-archived/base\n* catch2 - https://github.com/catchorg/Catch2\n* concurrentqueue - https://github.com/cameron314/concurrentqueue\n* cxxopts - https://github.com/jarro2783/cxxopts (used for command line tools)\n* fmt - https://github.com/fmtlib/fmt\n* intx - https://github.com/chfast/intx\n* libcorrect - https://github.com/quiet/libcorrect\n* libpopcnt - https://github.com/kimwalisch/libpopcnt\n* PicoSHA2 - https://github.com/okdshin/PicoSHA2 (used for testing)\n* stb_image - https://github.com/nothings/stb (for loading embedded pngs)\n* wirehair - https://github.com/catid/wirehair\n* zstd - https://github.com/facebook/zstd\n\n## Build\n\n1. install opencv and GLFW. On ubuntu/debian, this looks like:\n```\nsudo apt install libopencv-dev libglfw3-dev libgles2-mesa-dev\n```\n\n2. run the cmake + make incantation\n```\ncmake .\nmake -j7\nmake install\n```\n\nBy default, libcimbar will try to install build products under `./dist/bin/`.\n\nTo build cimbar.js (what cimbar.org uses), see [WASM](WASM.md).\n\n## Usage\n\nEncode:\n* large input files may fill up your disk with pngs!\n\n```\n./cimbar --encode -i inputfile.txt -o outputprefix\n```\n\nDecode (extracts file into output directory):\n```\n./cimbar outputprefix*.png -o /tmp\n```\n\nDecode a series of encoded images from stdin:\n```\necho outputprefix*.png | ./cimbar -o /tmp\n```\n\nEncode and animate to window:\n```\n./cimbar_send inputfile.pdf\n```\n\nYou can also encode a file using [cimbar.org](https://cimbar.org), or the latest [release](https://github.com/sz3/libcimbar/releases/latest).\n\n## Performance numbers\n\n[PERFORMANCE](PERFORMANCE.md)\n\n## Implementation details\n\n[DETAILS](DETAILS.md)\n\n## Room for improvement/next steps\n\n[TODO](TODO.md)\n\n## Inspiration\n\n* https://github.com/JohannesBuchner/imagehash/\n* https://github.com/divan/txqr\n* https://en.wikipedia.org/wiki/High_Capacity_Color_Barcode\n\n## Would you like to know more?\n\n### [INTRODUCTION](https://github.com/sz3/cimbar) | [ABOUT](https://github.com/sz3/cimbar/blob/master/ABOUT.md)\n","funding_links":[],"categories":["C++"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsz3%2Flibcimbar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsz3%2Flibcimbar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsz3%2Flibcimbar/lists"}