|
4 | 4 | ## Numbers of note
|
5 | 5 |
|
6 | 6 | * The barcode is `1024x1024` pixels. The individual tiles are `8x8` in a `9x9` grid (there is an empty row/column of spacing on either side)
|
7 |
| -* **7500** or 8750 bytes per cimbar image, after error correction |
| 7 | +* **7500** bytes per cimbar image, after error correction |
8 | 8 | * There are 16 possible symbols per tile, encoding 4 bits
|
9 | 9 | * There are 4 or 8 possible colors, encoding an additional 2-3 bits per tile.
|
10 |
| - * These 6-7 bits per tile work out to a maximum of 9300-10850 bytes per barcode, though in practice this number is reduced by error correction. |
| 10 | + * These 6 bits per tile work out to a maximum of 9300 bytes per barcode, though in practice this number is reduced by error correction. |
11 | 11 | * The default ecc setting is 30/155, which is how we go from 9300 -> 7500 bytes of real data for a 4-color cimbar image.
|
12 | 12 | * Reed Solomon is not perfect for this use case -- specifically, it corrects byte errors, and cimbar errors tend to involve 1-3 bits at a time. However, since Reed Solomon implementations are ubiquitous, it is currently in use.
|
13 | 13 |
|
14 | 14 | ## Current sustained benchmark
|
15 | 15 |
|
16 |
| -* 4-color cimbar with ecc=30: |
| 16 | +* `mode B` (8x8 4-color) cimbar with ecc=30/155: |
| 17 | + * 4,689,084 bytes (after compression) in 43s -> 872 kilobits/s (~109 KB/s) |
| 18 | + * mode B was introduced in 0.6.0, and should work in a wide variety of scenarios |
| 19 | + |
| 20 | +* *legacy* `mode 4C` (8x8 4-color) cimbar with ecc=30/155: |
17 | 21 | * 4,717,525 bytes (after compression) in 45s -> 838 kilobits/s (~104 KB/s)
|
| 22 | + * the original configuration. Mostly replaced by mode B. |
18 | 23 |
|
19 |
| -* 8-color cimbar with ecc=30: |
| 24 | +* *deprecated* `mode 8C` (8x8 8-color) cimbar with ecc=30/155: |
20 | 25 | * 4,717,525 bytes in 40s -> 943 kilobits/s (~118 KB/s)
|
| 26 | + * removed in 0.6.0. 8-color has always been inconsistent, and needs future research |
| 27 | + |
| 28 | +* *beta* `mode S` (5x5 4-color) cimbar with ecc=40/216 (note: not finalized, and requires a special build) |
| 29 | + * safely >1 Mbit/s |
| 30 | + * format still a WIP. To be continued... |
21 | 31 |
|
22 | 32 | * details:
|
23 | 33 | * cimbar has built-in compression using zstd. What's being measured here is bits over the wire, e.g. data after compression is applied.
|
24 |
| - * these numbers are using https://github.com/sz3/cfc, running with 4 CPU threads on a Qualcomm Snapdragon 625 |
25 |
| - * perhaps I will buy a new cell phone to inflate the benchmark numbers. |
26 |
| - * the sender is the cimbar.org wasm implementation. An equivalent command line is `./cimbar_send /path/to/file -s` |
| 34 | + * these numbers are using https://github.com/sz3/cfc, running with 4 CPU threads on a venerable Qualcomm Snapdragon 625 |
| 35 | + * more modern cell CPUs run the decoder more quickly, but it turns out that this does not benefit performance much: the camera is usually the bottleneck. |
| 36 | + * the sender is the cimbar.org wasm implementation. An equivalent command line is `./cimbar_send /path/to/file` |
27 | 37 | * cimbar.org uses the `shakycam` option to allow the receiver to detect/discard "in between" frames as part of the scan step. This allows it to spend more processing time decoding real data.
|
28 | 38 | * burst rate can be higher (or lower)
|
29 |
| - * to this end, lower ecc settings *can* provide better burst rates |
30 |
| - * 4-color cimbar is currently preferred, and will give more consistent transfer speeds. |
31 |
| - * 8-color cimbar should be considered a prototype within a prototype. It is considerably more sensitive to lighting conditions and color tints. |
| 39 | + * to this end, lower ecc settings *can* provide better burst rates. I've aimed for a balance of performance and reliability. |
| 40 | + * cimbar `mode B` is preferred, and should be the most reliable. |
| 41 | + * The older `mode 4C` *may* give more consistent transfer speeds in certain scenarios, but is mostly included for backwards-compatibility reasons. |
32 | 42 |
|
33 | 43 | * other notes:
|
34 |
| - * having better lighting in the frame often leads to better results -- this is why cimbar.org has a (mostly) white background. cfc uses android's auto-exposure, auto-focus, etc (it's a very simple app). Good ambient light -- or a white background -- can lead to more consitent quality frame capture. |
| 44 | + * having better lighting in the frame often leads to better results -- this is why cimbar.org has a (mostly) white background. cfc uses android's auto-exposure, auto-focus, etc (it's a demo app). Good ambient light -- or a white background -- can lead to more consitent quality frame capture. |
| 45 | + * screen brightness on the sender is good, but ambient light is better. |
35 | 46 | * because of the lighting/exposure question, landscape *may* be better than portrait.
|
36 |
| - * cfc currently has a low resolution, so the cimbar frame should take up as much of the display as possible (trust the guide brackets) |
| 47 | + * the cimbar frame should take up as much of the display as possible (trust the guide brackets) |
| 48 | + * the format is designed to decode at resolutions as low as 700x700, but performance may suffer. |
37 | 49 | * similarly, it's best to keep the camera angle straight-on -- instead of at an angle -- to decode the whole image successfully. Decodes should still happen at higher angles, but the "smaller" part of the image may have more errors than the ECC can deal with.
|
38 | 50 | * other things to be wary of:
|
39 | 51 | * glare from light sources.
|
|
0 commit comments