├── app
├── .gitignore
├── src
│ ├── cpp
│ │ ├── libcimbar
│ │ │ ├── test
│ │ │ │ ├── py
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── helpers.py
│ │ │ │ ├── TestHelpers.h
│ │ │ │ └── unittest.h
│ │ │ ├── src
│ │ │ │ ├── third_party_lib
│ │ │ │ │ ├── libcorrect
│ │ │ │ │ │ ├── .gitignore
│ │ │ │ │ │ ├── src
│ │ │ │ │ │ │ ├── CMakeLists.txt
│ │ │ │ │ │ │ ├── reed-solomon
│ │ │ │ │ │ │ │ ├── CMakeLists.txt
│ │ │ │ │ │ │ │ └── encode.c
│ │ │ │ │ │ │ └── convolutional
│ │ │ │ │ │ │ │ ├── sse
│ │ │ │ │ │ │ │ ├── CMakeLists.txt
│ │ │ │ │ │ │ │ ├── encode.c
│ │ │ │ │ │ │ │ └── convolutional.c
│ │ │ │ │ │ │ │ ├── CMakeLists.txt
│ │ │ │ │ │ │ │ ├── metric.c
│ │ │ │ │ │ │ │ └── error_buffer.c
│ │ │ │ │ │ ├── include
│ │ │ │ │ │ │ ├── correct
│ │ │ │ │ │ │ │ ├── reed-solomon
│ │ │ │ │ │ │ │ │ ├── decode.h
│ │ │ │ │ │ │ │ │ ├── encode.h
│ │ │ │ │ │ │ │ │ ├── reed-solomon.h
│ │ │ │ │ │ │ │ │ └── polynomial.h
│ │ │ │ │ │ │ │ ├── util
│ │ │ │ │ │ │ │ │ ├── error-sim-sse.h
│ │ │ │ │ │ │ │ │ ├── error-sim-fec.h
│ │ │ │ │ │ │ │ │ └── error-sim-shim.h
│ │ │ │ │ │ │ │ ├── convolutional
│ │ │ │ │ │ │ │ │ ├── sse
│ │ │ │ │ │ │ │ │ │ └── convolutional.h
│ │ │ │ │ │ │ │ │ ├── error_buffer.h
│ │ │ │ │ │ │ │ │ ├── metric.h
│ │ │ │ │ │ │ │ │ ├── lookup.h
│ │ │ │ │ │ │ │ │ ├── bit.h
│ │ │ │ │ │ │ │ │ └── convolutional.h
│ │ │ │ │ │ │ │ ├── portable.h
│ │ │ │ │ │ │ │ └── convolutional.h
│ │ │ │ │ │ │ └── correct-sse.h
│ │ │ │ │ │ ├── .travis.yml
│ │ │ │ │ │ ├── util
│ │ │ │ │ │ │ ├── CMakeLists.txt
│ │ │ │ │ │ │ ├── error-sim-sse.c
│ │ │ │ │ │ │ ├── error-sim-fec.c
│ │ │ │ │ │ │ └── error-sim-shim.c
│ │ │ │ │ │ ├── tests
│ │ │ │ │ │ │ ├── include
│ │ │ │ │ │ │ │ ├── rs_tester_fec.h
│ │ │ │ │ │ │ │ ├── rs_tester_fec_shim.h
│ │ │ │ │ │ │ │ └── rs_tester.h
│ │ │ │ │ │ │ ├── rs_tester_fec_shim.c
│ │ │ │ │ │ │ └── rs_tester_fec.c
│ │ │ │ │ │ ├── appveyor.yml
│ │ │ │ │ │ ├── LICENSE
│ │ │ │ │ │ ├── tools
│ │ │ │ │ │ │ ├── CMakeLists.txt
│ │ │ │ │ │ │ └── find_rs_primitive_poly.c
│ │ │ │ │ │ └── .appveyor-install-tools.cmd
│ │ │ │ │ ├── intx
│ │ │ │ │ │ └── CMakeLists.txt
│ │ │ │ │ ├── base91
│ │ │ │ │ │ ├── CMakeLists.txt
│ │ │ │ │ │ └── LICENSE
│ │ │ │ │ ├── cxxopts
│ │ │ │ │ │ ├── CMakeLists.txt
│ │ │ │ │ │ └── LICENSE
│ │ │ │ │ ├── libpopcnt
│ │ │ │ │ │ ├── CMakeLists.txt
│ │ │ │ │ │ └── LICENSE
│ │ │ │ │ ├── zstd
│ │ │ │ │ │ ├── decompress
│ │ │ │ │ │ │ ├── CMakeLists.txt
│ │ │ │ │ │ │ └── zstd_ddict.h
│ │ │ │ │ │ ├── CMakeLists.txt
│ │ │ │ │ │ ├── common
│ │ │ │ │ │ │ ├── CMakeLists.txt
│ │ │ │ │ │ │ ├── xxhash.c
│ │ │ │ │ │ │ ├── debug.c
│ │ │ │ │ │ │ ├── allocations.h
│ │ │ │ │ │ │ └── zstd_common.c
│ │ │ │ │ │ ├── compress
│ │ │ │ │ │ │ ├── CMakeLists.txt
│ │ │ │ │ │ │ ├── zstd_compress_superblock.h
│ │ │ │ │ │ │ ├── zstd_fast.h
│ │ │ │ │ │ │ ├── zstd_double_fast.h
│ │ │ │ │ │ │ └── zstd_compress_literals.h
│ │ │ │ │ │ └── LICENSE
│ │ │ │ │ ├── wirehair
│ │ │ │ │ │ ├── .gitattributes
│ │ │ │ │ │ ├── .gitignore
│ │ │ │ │ │ ├── LICENSE
│ │ │ │ │ │ └── CMakeLists.txt
│ │ │ │ │ ├── PicoSHA2
│ │ │ │ │ │ └── LICENSE
│ │ │ │ │ └── fmt
│ │ │ │ │ │ └── LICENSE.rst
│ │ │ │ ├── lib
│ │ │ │ │ ├── gui
│ │ │ │ │ │ ├── CMakeLists.txt
│ │ │ │ │ │ ├── mat_to_gl.h
│ │ │ │ │ │ ├── gl_program.h
│ │ │ │ │ │ └── gl_shader.h
│ │ │ │ │ ├── bit_file
│ │ │ │ │ │ ├── test
│ │ │ │ │ │ │ ├── test.cpp
│ │ │ │ │ │ │ └── CMakeLists.txt
│ │ │ │ │ │ └── CMakeLists.txt
│ │ │ │ │ ├── encoder
│ │ │ │ │ │ ├── test
│ │ │ │ │ │ │ ├── test.cpp
│ │ │ │ │ │ │ └── CMakeLists.txt
│ │ │ │ │ │ ├── CMakeLists.txt
│ │ │ │ │ │ ├── ReedSolomon.h
│ │ │ │ │ │ ├── DecoderPlus.h
│ │ │ │ │ │ └── escrow_buffer_writer.h
│ │ │ │ │ ├── fountain
│ │ │ │ │ │ ├── test
│ │ │ │ │ │ │ ├── test.cpp
│ │ │ │ │ │ │ └── CMakeLists.txt
│ │ │ │ │ │ ├── FountainInit.h
│ │ │ │ │ │ ├── CMakeLists.txt
│ │ │ │ │ │ └── FountainEncoder.h
│ │ │ │ │ ├── serialize
│ │ │ │ │ │ ├── CMakeLists.txt
│ │ │ │ │ │ ├── format.h
│ │ │ │ │ │ └── str_join.h
│ │ │ │ │ ├── util
│ │ │ │ │ │ ├── CMakeLists.txt
│ │ │ │ │ │ ├── bytebuf.h
│ │ │ │ │ │ ├── vec_xy.h
│ │ │ │ │ │ ├── byte_istream.h
│ │ │ │ │ │ ├── ConfigScope.h
│ │ │ │ │ │ ├── null_stream.h
│ │ │ │ │ │ ├── MakeTempDirectory.h
│ │ │ │ │ │ ├── Timer.h
│ │ │ │ │ │ ├── loop_iterator.h
│ │ │ │ │ │ └── File.h
│ │ │ │ │ ├── cimbar_js
│ │ │ │ │ │ ├── test
│ │ │ │ │ │ │ ├── test.cpp
│ │ │ │ │ │ │ └── CMakeLists.txt
│ │ │ │ │ │ ├── cimbar_js.h
│ │ │ │ │ │ └── cimbar_recv_js.h
│ │ │ │ │ ├── compression
│ │ │ │ │ │ ├── test
│ │ │ │ │ │ │ ├── test.cpp
│ │ │ │ │ │ │ ├── CMakeLists.txt
│ │ │ │ │ │ │ └── zstd_header_checkTest.cpp
│ │ │ │ │ │ ├── CMakeLists.txt
│ │ │ │ │ │ ├── zstd_header_check.h
│ │ │ │ │ │ └── zstd_dstream.h
│ │ │ │ │ ├── extractor
│ │ │ │ │ │ ├── test
│ │ │ │ │ │ │ ├── test.cpp
│ │ │ │ │ │ │ ├── CMakeLists.txt
│ │ │ │ │ │ │ ├── DeskewerTest.cpp
│ │ │ │ │ │ │ ├── SimpleCameraCalibrationTest.cpp
│ │ │ │ │ │ │ ├── UndistortTest.cpp
│ │ │ │ │ │ │ ├── ExtractorTest.cpp
│ │ │ │ │ │ │ ├── CornersTest.cpp
│ │ │ │ │ │ │ └── ScanStateTest.cpp
│ │ │ │ │ │ ├── Deskewer.cpp
│ │ │ │ │ │ ├── Extractor.cpp
│ │ │ │ │ │ ├── CMakeLists.txt
│ │ │ │ │ │ ├── DistortionParameters.h
│ │ │ │ │ │ ├── DeskewerPlus.h
│ │ │ │ │ │ ├── Midpoints.h
│ │ │ │ │ │ ├── EdgeScanState.h
│ │ │ │ │ │ ├── Extractor.h
│ │ │ │ │ │ ├── ExtractorPlus.h
│ │ │ │ │ │ ├── Deskewer.h
│ │ │ │ │ │ ├── Undistort.h
│ │ │ │ │ │ └── SimpleCameraCalibration.h
│ │ │ │ │ ├── image_hash
│ │ │ │ │ │ ├── test
│ │ │ │ │ │ │ ├── test.cpp
│ │ │ │ │ │ │ ├── CMakeLists.txt
│ │ │ │ │ │ │ └── averageHashTest.cpp
│ │ │ │ │ │ ├── CMakeLists.txt
│ │ │ │ │ │ └── hamming_distance.h
│ │ │ │ │ ├── cimb_translator
│ │ │ │ │ │ ├── test
│ │ │ │ │ │ │ ├── test.cpp
│ │ │ │ │ │ │ ├── CellPositionsTest.cpp
│ │ │ │ │ │ │ ├── CMakeLists.txt
│ │ │ │ │ │ │ ├── LinearDecodePositionsTest.cpp
│ │ │ │ │ │ │ ├── CimbEncoderTest.cpp
│ │ │ │ │ │ │ ├── CellDriftTest.cpp
│ │ │ │ │ │ │ └── CimbWriterTest.cpp
│ │ │ │ │ │ ├── PositionData.h
│ │ │ │ │ │ ├── Common.h
│ │ │ │ │ │ ├── CellDrift.h
│ │ │ │ │ │ ├── CimbEncoder.h
│ │ │ │ │ │ ├── CMakeLists.txt
│ │ │ │ │ │ ├── CimbWriter.h
│ │ │ │ │ │ ├── CellDrift.cpp
│ │ │ │ │ │ ├── AdjacentCellFinder.h
│ │ │ │ │ │ ├── CellPositions.h
│ │ │ │ │ │ ├── CimbEncoder.cpp
│ │ │ │ │ │ ├── CimbReader.h
│ │ │ │ │ │ ├── Interleave.h
│ │ │ │ │ │ ├── LinearDecodePositions.h
│ │ │ │ │ │ └── FloodDecodePositions.h
│ │ │ │ │ └── chromatic_adaptation
│ │ │ │ │ │ ├── test
│ │ │ │ │ │ ├── test.cpp
│ │ │ │ │ │ └── CMakeLists.txt
│ │ │ │ │ │ ├── CMakeLists.txt
│ │ │ │ │ │ └── adaptation_transform.h
│ │ │ │ └── exe
│ │ │ │ │ ├── build_image_assets
│ │ │ │ │ └── CMakeLists.txt
│ │ │ │ │ ├── cimbar_send
│ │ │ │ │ └── CMakeLists.txt
│ │ │ │ │ ├── cimbar_recv2
│ │ │ │ │ └── CMakeLists.txt
│ │ │ │ │ ├── cimbar_extract
│ │ │ │ │ ├── CMakeLists.txt
│ │ │ │ │ └── cimbar_extract.cpp
│ │ │ │ │ ├── cimbar
│ │ │ │ │ └── CMakeLists.txt
│ │ │ │ │ └── cimbar_recv
│ │ │ │ │ └── CMakeLists.txt
│ │ │ ├── bitmap
│ │ │ │ ├── 2
│ │ │ │ │ ├── 00.png
│ │ │ │ │ ├── 01.png
│ │ │ │ │ ├── 02.png
│ │ │ │ │ └── 03.png
│ │ │ │ ├── 4
│ │ │ │ │ ├── 00.png
│ │ │ │ │ ├── 01.png
│ │ │ │ │ ├── 02.png
│ │ │ │ │ ├── 03.png
│ │ │ │ │ ├── 04.png
│ │ │ │ │ ├── 05.png
│ │ │ │ │ ├── 06.png
│ │ │ │ │ ├── 07.png
│ │ │ │ │ ├── 08.png
│ │ │ │ │ ├── 09.png
│ │ │ │ │ ├── 0a.png
│ │ │ │ │ ├── 0b.png
│ │ │ │ │ ├── 0c.png
│ │ │ │ │ ├── 0d.png
│ │ │ │ │ ├── 0e.png
│ │ │ │ │ └── 0f.png
│ │ │ │ ├── anchor-dark.png
│ │ │ │ ├── anchor-light.png
│ │ │ │ ├── guide-vertical-dark.png
│ │ │ │ ├── anchor-secondary-dark.png
│ │ │ │ ├── anchor-secondary-light.png
│ │ │ │ ├── guide-horizontal-dark.png
│ │ │ │ ├── guide-horizontal-light.png
│ │ │ │ └── guide-vertical-light.png
│ │ │ ├── web
│ │ │ │ ├── favicon.ico
│ │ │ │ ├── icon-192x192.png
│ │ │ │ ├── icon-512x512.png
│ │ │ │ ├── test
│ │ │ │ │ ├── test.md
│ │ │ │ │ └── run-in-browser.js
│ │ │ │ ├── pwa.json
│ │ │ │ ├── pwa-recv.json
│ │ │ │ ├── sw.js
│ │ │ │ ├── wasmgz.sh
│ │ │ │ ├── recv-sw.js
│ │ │ │ └── test_recv.html
│ │ │ ├── .gitmodules
│ │ │ ├── .gitignore
│ │ │ ├── package-cimbar-html.py
│ │ │ ├── package-wasm.sh
│ │ │ ├── package-portable-linux.sh
│ │ │ ├── .github
│ │ │ │ └── workflows
│ │ │ │ │ ├── release.yml
│ │ │ │ │ └── ci.yml
│ │ │ ├── CMakeLists.txt
│ │ │ └── WASM.md
│ │ ├── concurrent
│ │ │ ├── CMakeLists.txt
│ │ │ └── monitor.h
│ │ ├── cfc-cpp
│ │ │ └── CMakeLists.txt
│ │ └── CMakeLists.txt
│ └── main
│ │ ├── res
│ │ ├── drawable-hdpi
│ │ │ ├── ic_mode4c.png
│ │ │ ├── ic_modeb.png
│ │ │ ├── ic_modebm.png
│ │ │ └── ic_modeguess.png
│ │ ├── drawable-ldpi
│ │ │ ├── ic_mode4c.png
│ │ │ ├── ic_modeb.png
│ │ │ ├── ic_modebm.png
│ │ │ └── ic_modeguess.png
│ │ ├── drawable-mdpi
│ │ │ ├── ic_mode4c.png
│ │ │ ├── ic_modeb.png
│ │ │ ├── ic_modebm.png
│ │ │ └── ic_modeguess.png
│ │ ├── drawable-xhdpi
│ │ │ ├── ic_mode4c.png
│ │ │ ├── ic_modeb.png
│ │ │ ├── ic_modebm.png
│ │ │ └── ic_modeguess.png
│ │ ├── drawable-xxhdpi
│ │ │ ├── ic_modeb.png
│ │ │ ├── ic_mode4c.png
│ │ │ ├── ic_modebm.png
│ │ │ └── ic_modeguess.png
│ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher_round.png
│ │ ├── values
│ │ │ ├── strings.xml
│ │ │ ├── colors.xml
│ │ │ ├── attrs.xml
│ │ │ └── styles.xml
│ │ ├── drawable
│ │ │ └── modesel.xml
│ │ └── layout
│ │ │ └── activity_main.xml
│ │ └── AndroidManifest.xml
├── proguard-rules.pro
└── build.gradle
├── fastlane
└── metadata
│ └── android
│ ├── de
│ └── short_description.txt
│ ├── ru
│ ├── short_description.txt
│ └── full_description.txt
│ └── en-US
│ ├── short_description.txt
│ ├── images
│ ├── icon.png
│ ├── featureGraphic.png
│ └── phoneScreenshots
│ │ ├── 1.jpg
│ │ └── 2.jpg
│ └── full_description.txt
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── settings.gradle
├── .gitignore
├── LICENSE
└── gradle.properties
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/test/py/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/libcorrect/.gitignore:
--------------------------------------------------------------------------------
1 | build
2 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/de/short_description.txt:
--------------------------------------------------------------------------------
1 | Datenübertragung per Kamera – auch im Flugmodus
--------------------------------------------------------------------------------
/fastlane/metadata/android/ru/short_description.txt:
--------------------------------------------------------------------------------
1 | Передача данных через камеру, даже в авиарежиме.
2 |
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/short_description.txt:
--------------------------------------------------------------------------------
1 | use your camera to transfer data – even in airplane mode
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/bitmap/2/00.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/cpp/libcimbar/bitmap/2/00.png
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/bitmap/2/01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/cpp/libcimbar/bitmap/2/01.png
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/bitmap/2/02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/cpp/libcimbar/bitmap/2/02.png
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/bitmap/2/03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/cpp/libcimbar/bitmap/2/03.png
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/bitmap/4/00.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/cpp/libcimbar/bitmap/4/00.png
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/bitmap/4/01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/cpp/libcimbar/bitmap/4/01.png
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/bitmap/4/02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/cpp/libcimbar/bitmap/4/02.png
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/bitmap/4/03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/cpp/libcimbar/bitmap/4/03.png
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/bitmap/4/04.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/cpp/libcimbar/bitmap/4/04.png
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/bitmap/4/05.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/cpp/libcimbar/bitmap/4/05.png
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/bitmap/4/06.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/cpp/libcimbar/bitmap/4/06.png
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/bitmap/4/07.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/cpp/libcimbar/bitmap/4/07.png
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/bitmap/4/08.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/cpp/libcimbar/bitmap/4/08.png
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/bitmap/4/09.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/cpp/libcimbar/bitmap/4/09.png
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/bitmap/4/0a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/cpp/libcimbar/bitmap/4/0a.png
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/bitmap/4/0b.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/cpp/libcimbar/bitmap/4/0b.png
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/bitmap/4/0c.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/cpp/libcimbar/bitmap/4/0c.png
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/bitmap/4/0d.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/cpp/libcimbar/bitmap/4/0d.png
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/bitmap/4/0e.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/cpp/libcimbar/bitmap/4/0e.png
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/bitmap/4/0f.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/cpp/libcimbar/bitmap/4/0f.png
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/web/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/cpp/libcimbar/web/favicon.ico
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/web/icon-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/cpp/libcimbar/web/icon-192x192.png
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/web/icon-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/cpp/libcimbar/web/icon-512x512.png
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/bitmap/anchor-dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/cpp/libcimbar/bitmap/anchor-dark.png
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/bitmap/anchor-light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/cpp/libcimbar/bitmap/anchor-light.png
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/gui/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | add_library(gui INTERFACE)
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_mode4c.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/main/res/drawable-hdpi/ic_mode4c.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_modeb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/main/res/drawable-hdpi/ic_modeb.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_modebm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/main/res/drawable-hdpi/ic_modebm.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-ldpi/ic_mode4c.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/main/res/drawable-ldpi/ic_mode4c.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-ldpi/ic_modeb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/main/res/drawable-ldpi/ic_modeb.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-ldpi/ic_modebm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/main/res/drawable-ldpi/ic_modebm.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_mode4c.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/main/res/drawable-mdpi/ic_mode4c.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_modeb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/main/res/drawable-mdpi/ic_modeb.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_modebm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/main/res/drawable-mdpi/ic_modebm.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_mode4c.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/main/res/drawable-xhdpi/ic_mode4c.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_modeb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/main/res/drawable-xhdpi/ic_modeb.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_modebm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/main/res/drawable-xhdpi/ic_modebm.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_modeb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/main/res/drawable-xxhdpi/ic_modeb.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-hdpi/ic_modeguess.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/main/res/drawable-hdpi/ic_modeguess.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-ldpi/ic_modeguess.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/main/res/drawable-ldpi/ic_modeguess.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-mdpi/ic_modeguess.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/main/res/drawable-mdpi/ic_modeguess.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_mode4c.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/main/res/drawable-xxhdpi/ic_mode4c.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_modebm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/main/res/drawable-xxhdpi/ic_modebm.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/fastlane/metadata/android/en-US/images/icon.png
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/libcorrect/src/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | add_subdirectory(convolutional)
2 | add_subdirectory(reed-solomon)
3 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_modeguess.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/main/res/drawable-xhdpi/ic_modeguess.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_modeguess.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/main/res/drawable-xxhdpi/ic_modeguess.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "samples"]
2 | path = samples
3 | url = https://github.com/sz3/cimbar-samples
4 | ignore = dirty
5 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/bitmap/guide-vertical-dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/cpp/libcimbar/bitmap/guide-vertical-dark.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/bitmap/anchor-secondary-dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/cpp/libcimbar/bitmap/anchor-secondary-dark.png
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/bitmap/anchor-secondary-light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/cpp/libcimbar/bitmap/anchor-secondary-light.png
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/bitmap/guide-horizontal-dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/cpp/libcimbar/bitmap/guide-horizontal-dark.png
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/bitmap/guide-horizontal-light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/cpp/libcimbar/bitmap/guide-horizontal-light.png
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/bitmap/guide-vertical-light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/cpp/libcimbar/bitmap/guide-vertical-light.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/featureGraphic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/fastlane/metadata/android/en-US/images/featureGraphic.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/phoneScreenshots/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/fastlane/metadata/android/en-US/images/phoneScreenshots/1.jpg
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/phoneScreenshots/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sz3/cfc/HEAD/fastlane/metadata/android/en-US/images/phoneScreenshots/2.jpg
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name='CameraFileCopy'
2 | include ':app'
3 |
4 | include ':opencv'
5 | project(':opencv').projectDir = new File(opencvsdk + '/sdk')
6 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/intx/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | set(SOURCES
4 | intx.hpp
5 | )
6 |
7 | add_library(intx INTERFACE)
8 |
9 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/base91/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | set(SOURCES
4 | base.hpp
5 | )
6 |
7 | add_library(base91 INTERFACE)
8 |
9 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/web/test/test.md:
--------------------------------------------------------------------------------
1 | # (cd .. && python3 -m http.server 8080 &)
2 | # (cd .. && npx http-server &)
3 | npm install --save-dev puppeteer qunit
4 | node run-in-browser.js
5 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/cxxopts/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | set(SOURCES
4 | cxxopts.hpp
5 | )
6 |
7 | add_library(cxxopts INTERFACE)
8 |
9 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/libpopcnt/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | set(SOURCES
4 | libpopcnt.h
5 | )
6 |
7 | add_library(libpopcnt INTERFACE)
8 |
9 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/libcorrect/src/reed-solomon/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | set(SRCFILES polynomial.c reed-solomon.c encode.c decode.c)
2 | add_library(correct-reed-solomon OBJECT ${SRCFILES})
3 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/libcorrect/src/convolutional/sse/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | set(SRCFILES lookup.c convolutional.c encode.c decode.c)
2 | add_library(correct-convolutional-sse OBJECT ${SRCFILES})
3 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | CameraFileCopy
3 | Mode 4C
4 | Mode B
5 |
6 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/bit_file/test/test.cpp:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #define CATCH_CONFIG_MAIN
3 | #include "catch.hpp"
4 |
5 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/encoder/test/test.cpp:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #define CATCH_CONFIG_MAIN
3 | #include "catch.hpp"
4 |
5 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/fountain/test/test.cpp:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #define CATCH_CONFIG_MAIN
3 | #include "catch.hpp"
4 |
5 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/serialize/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | set(SOURCES
4 | format.h
5 | str.h
6 | str_join.h
7 | )
8 |
9 | add_library(serialize INTERFACE)
10 |
11 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/util/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | set(SOURCES
4 | File.h
5 | MakeTempDirectory.h
6 | Timer.h
7 | )
8 |
9 | add_library(util INTERFACE)
10 |
11 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/libcorrect/include/correct/reed-solomon/decode.h:
--------------------------------------------------------------------------------
1 | #include "correct/reed-solomon.h"
2 | #include "correct/reed-solomon/field.h"
3 | #include "correct/reed-solomon/polynomial.h"
4 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/libcorrect/include/correct/reed-solomon/encode.h:
--------------------------------------------------------------------------------
1 | #include "correct/reed-solomon.h"
2 | #include "correct/reed-solomon/field.h"
3 | #include "correct/reed-solomon/polynomial.h"
4 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/cimbar_js/test/test.cpp:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #define CATCH_CONFIG_MAIN
3 | #include "catch.hpp"
4 |
5 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/compression/test/test.cpp:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #define CATCH_CONFIG_MAIN
3 | #include "catch.hpp"
4 |
5 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/extractor/test/test.cpp:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #define CATCH_CONFIG_MAIN
3 | #include "catch.hpp"
4 |
5 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/image_hash/test/test.cpp:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #define CATCH_CONFIG_MAIN
3 | #include "catch.hpp"
4 |
5 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/libcorrect/include/correct/reed-solomon/reed-solomon.h:
--------------------------------------------------------------------------------
1 | #include "correct/reed-solomon.h"
2 | #include "correct/reed-solomon/field.h"
3 | #include "correct/reed-solomon/polynomial.h"
4 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/cimb_translator/test/test.cpp:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #define CATCH_CONFIG_MAIN
3 | #include "catch.hpp"
4 |
5 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/chromatic_adaptation/test/test.cpp:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #define CATCH_CONFIG_MAIN
3 | #include "catch.hpp"
4 |
5 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/serialize/format.h:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #pragma once
3 |
4 | #define FMT_HEADER_ONLY
5 | #include "fmt/format.h"
6 |
7 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #6200EE
4 | #3700B3
5 | #03DAC5
6 |
7 |
--------------------------------------------------------------------------------
/app/src/cpp/concurrent/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | set(SOURCES
4 | monitor.h
5 | thread_pool.h
6 | )
7 |
8 | include_directories(
9 | ${CMAKE_CURRENT_SOURCE_DIR}
10 | )
11 |
12 | add_library(concurrent INTERFACE)
13 |
14 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/bit_file/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | set(SOURCES
4 | bitreader.h
5 | bitbuffer.h
6 | )
7 |
8 | add_library(bit_file INTERFACE)
9 |
10 | if(NOT DEFINED DISABLE_TESTS)
11 | add_subdirectory(test)
12 | endif()
13 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 | .cxx
15 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/cimb_translator/PositionData.h:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #pragma once
3 |
4 | struct PositionData
5 | {
6 | unsigned i = 0;
7 | int x = 0;
8 | int y = 0;
9 | };
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/libcorrect/src/convolutional/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | set(SRCFILES bit.c metric.c history_buffer.c error_buffer.c lookup.c convolutional.c encode.c decode.c)
2 | add_library(correct-convolutional OBJECT ${SRCFILES})
3 | if(HAVE_SSE)
4 | add_subdirectory(sse)
5 | endif()
6 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/.gitignore:
--------------------------------------------------------------------------------
1 | .cmake/
2 | CMakeFiles/
3 | Testing/
4 | build*/
5 | dist/
6 | opencv4/
7 | web/test/node_modules/
8 | web/cimbar_js.js
9 | web/cimbar_js.wasm
10 | CMakeCache.txt
11 | CMakeLists.txt.*
12 | CTestTestfile.cmake
13 | Makefile
14 | callgrind.out*
15 | cmake_install.cmake
16 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/chromatic_adaptation/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | set(SOURCES
4 | adaptation_transform.h
5 | color_correction.h
6 | )
7 |
8 | add_library(chromatic_adaptation INTERFACE)
9 |
10 | if(NOT DEFINED DISABLE_TESTS)
11 | add_subdirectory(test)
12 | endif()
13 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/libcorrect/.travis.yml:
--------------------------------------------------------------------------------
1 | language: c
2 | matrix:
3 | include:
4 | - os: linux
5 | dist: trusty
6 | - os: osx
7 | script:
8 | - mkdir build
9 | - cd build
10 | - cmake ..
11 | - make shim
12 | - make check CTEST_OUTPUT_ON_FAILURE=TRUE
13 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/compression/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | set(SOURCES
4 | zstd_compressor.h
5 | zstd_decompressor.h
6 | zstd_header_check.h
7 | )
8 |
9 | add_library(compression INTERFACE)
10 |
11 | if(NOT DEFINED DISABLE_TESTS)
12 | add_subdirectory(test)
13 | endif()
14 |
15 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/image_hash/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | set(SOURCES
4 | ahash_result.h
5 | average_hash.h
6 | bit_extractor.h
7 | hamming_distance.h
8 | )
9 |
10 | add_library(image_hash INTERFACE)
11 |
12 | if(NOT DEFINED DISABLE_TESTS)
13 | add_subdirectory(test)
14 | endif()
15 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/exe/build_image_assets/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | project(build_image_assets)
4 |
5 | set (SOURCES
6 | build_image_assets.cpp
7 | )
8 |
9 | add_executable (
10 | build_image_assets
11 | ${SOURCES}
12 | )
13 |
14 | target_link_libraries(build_image_assets
15 |
16 |
17 | )
18 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/fountain/FountainInit.h:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #pragma once
3 |
4 | #include "wirehair/wirehair.h"
5 |
6 | namespace FountainInit {
7 | static bool init()
8 | {
9 | static WirehairResult res = wirehair_init();
10 | return !res;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/zstd/decompress/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | set(SRCFILES huf_decompress.c zstd_ddict.h zstd_decompress_block.h zstd_decompress_internal.h
2 | huf_decompress_amd64.S zstd_ddict.c zstd_decompress_block.c zstd_decompress.c)
3 | add_library(zstd-decompress OBJECT ${SRCFILES})
4 |
5 | target_compile_options(zstd-decompress PUBLIC "-DZSTD_DISABLE_ASM")
6 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/util/bytebuf.h:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #pragma once
3 |
4 | #include
5 |
6 | namespace cimbar {
7 |
8 | struct bytebuf : public std::streambuf
9 | {
10 | bytebuf(char* data, size_t len)
11 | {
12 | setg(data, data, data + len);
13 | }
14 | };
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/libcorrect/util/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | add_library(error_sim OBJECT error-sim.c)
2 |
3 | add_library(error_sim_shim OBJECT error-sim.c error-sim-shim.c)
4 |
5 | if(HAVE_LIBFEC)
6 | add_library(error_sim_fec OBJECT error-sim.c error-sim-fec.c)
7 | endif()
8 |
9 | if(HAVE_SSE)
10 | add_library(error_sim_sse OBJECT error-sim.c error-sim-sse.c)
11 | endif()
12 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/encoder/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | set(SOURCES
4 | Decoder.h
5 | DecoderPlus.h
6 | Encoder.h
7 | EncoderPlus.h
8 | ReedSolomon.h
9 | aligned_stream.h
10 | escrow_buffer_writer.h
11 | reed_solomon_stream.h
12 | )
13 |
14 | add_library(encoder INTERFACE)
15 |
16 | if(NOT DEFINED DISABLE_TESTS)
17 | add_subdirectory(test)
18 | endif()
19 |
20 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/image_hash/hamming_distance.h:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #pragma once
3 |
4 | #include "libpopcnt/libpopcnt.h"
5 |
6 | namespace image_hash
7 | {
8 | template
9 | inline unsigned hamming_distance(Integer a, Integer b)
10 | {
11 | return popcnt64(a xor b);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/libcorrect/include/correct/util/error-sim-sse.h:
--------------------------------------------------------------------------------
1 | #include "correct/util/error-sim.h"
2 |
3 | #include "correct-sse.h"
4 |
5 | size_t conv_correct_sse_enclen(void *conv_v, size_t msg_len);
6 | void conv_correct_sse_encode(void *conv_v, uint8_t *msg, size_t msg_len, uint8_t *encoded);
7 | ssize_t conv_correct_sse_decode(void *conv_v, uint8_t *soft, size_t soft_len, uint8_t *msg);
8 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/util/vec_xy.h:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #pragma once
3 |
4 | namespace cimbar {
5 |
6 | struct vec_xy
7 | {
8 | unsigned x = 0;
9 | unsigned y = 0;
10 |
11 | unsigned width() const
12 | {
13 | return x;
14 | };
15 |
16 | unsigned height() const
17 | {
18 | return y;
19 | }
20 | };
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/web/pwa.json:
--------------------------------------------------------------------------------
1 | {
2 | "lang": "en",
3 | "dir": "ltr",
4 | "name": "cimbar.org Send",
5 | "short_name": "cimbar.org",
6 | "icons": [{"src":"icon-192x192.png","sizes":"192x192","type":"image/png"},{"src":"icon-512x512.png","sizes":"512x512","type":"image/png"}],
7 | "scope": "/",
8 | "start_url": "index.html",
9 | "display": "fullscreen",
10 | "theme_color": "aliceblue",
11 | "background_color": "black"
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/zstd/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 | project(zstd C)
3 |
4 | add_subdirectory(common)
5 | add_subdirectory(compress)
6 | add_subdirectory(decompress)
7 |
8 | set(zstd_obj_files $ $ $)
9 |
10 | add_library(zstd ${zstd_obj_files})
11 |
12 | target_compile_options(zstd PUBLIC "-DZSTD_STATIC_LINKING_ONLY")
13 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/fountain/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | set(SOURCES
4 | concurrent_fountain_decoder_sink.h
5 | FountainDecoder.h
6 | FountainEncoder.h
7 | FountainInit.h
8 | FountainMetadata.h
9 | fountain_decoder_sink.h
10 | fountain_decoder_stream.h
11 | fountain_encoder_stream.h
12 | )
13 |
14 | add_library(fountain INTERFACE)
15 |
16 | if(NOT DEFINED DISABLE_TESTS)
17 | add_subdirectory(test)
18 | endif()
19 |
20 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/util/byte_istream.h:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #pragma once
3 |
4 | #include "bytebuf.h"
5 | #include
6 |
7 | namespace cimbar {
8 |
9 | struct byte_istream : std::istream
10 | {
11 | byte_istream(const char* data, unsigned len)
12 | : std::istream(&_buf)
13 | , _buf((char*)data, len)
14 | {
15 | }
16 |
17 | bytebuf _buf;
18 | };
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/bit_file/test/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | project(bit_file_test)
4 |
5 | set (SOURCES
6 | test.cpp
7 | bitbufferTest.cpp
8 | bitreaderTest.cpp
9 | )
10 |
11 | include_directories(
12 | ${libcimbar_SOURCE_DIR}/test
13 | ${libcimbar_SOURCE_DIR}/test/lib
14 | ${CMAKE_CURRENT_SOURCE_DIR}/..
15 | )
16 |
17 | add_executable (
18 | bit_file_test
19 | ${SOURCES}
20 | )
21 |
22 | add_test(bit_file_test bit_file_test)
23 |
24 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/libcorrect/include/correct/util/error-sim-fec.h:
--------------------------------------------------------------------------------
1 | #include "correct/util/error-sim.h"
2 |
3 | #include
4 |
5 | void conv_fec27_decode(void *conv_v, uint8_t *soft, size_t soft_len, uint8_t *msg);
6 | void conv_fec29_decode(void *conv_v, uint8_t *soft, size_t soft_len, uint8_t *msg);
7 | void conv_fec39_decode(void *conv_v, uint8_t *soft, size_t soft_len, uint8_t *msg);
8 | void conv_fec615_decode(void *conv_v, uint8_t *soft, size_t soft_len, uint8_t *msg);
9 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/libcorrect/include/correct/convolutional/sse/convolutional.h:
--------------------------------------------------------------------------------
1 | #include "correct/convolutional/convolutional.h"
2 | #include "correct/convolutional/sse/lookup.h"
3 | // BIG HEAPING TODO sort out the include mess
4 | #include "correct-sse.h"
5 | #ifdef _MSC_VER
6 | #include
7 | #else
8 | #include
9 | #endif
10 |
11 |
12 | struct correct_convolutional_sse {
13 | correct_convolutional base_conv;
14 | oct_lookup_t oct_lookup;
15 | };
16 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/test/py/helpers.py:
--------------------------------------------------------------------------------
1 | from os.path import join, realpath, dirname
2 | from tempfile import TemporaryDirectory
3 |
4 | CIMBAR_SRC = realpath(join(dirname(realpath(__file__)), '..', '..'))
5 | BIN_DIR = join(CIMBAR_SRC, 'dist', 'bin')
6 |
7 |
8 | class TestDirMixin():
9 | def setUp(self):
10 | self.working_dir = TemporaryDirectory()
11 | super().setUp()
12 |
13 | def tearDown(self):
14 | super().tearDown()
15 | with self.working_dir:
16 | pass
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/libcorrect/include/correct/util/error-sim-shim.h:
--------------------------------------------------------------------------------
1 | #include "correct/util/error-sim.h"
2 | #include "fec_shim.h"
3 |
4 | ssize_t conv_shim27_decode(void *conv_v, uint8_t *soft, size_t soft_len, uint8_t *msg);
5 | ssize_t conv_shim29_decode(void *conv_v, uint8_t *soft, size_t soft_len, uint8_t *msg);
6 | ssize_t conv_shim39_decode(void *conv_v, uint8_t *soft, size_t soft_len, uint8_t *msg);
7 | ssize_t conv_shim615_decode(void *conv_v, uint8_t *soft, size_t soft_len, uint8_t *msg);
8 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/wirehair/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/zstd/common/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | set(SRCFILES allocations.h debug.c error_private.c fse.h pool.c threading.c xxhash.h zstd_internal.h
2 | bits.h compiler.h debug.h error_private.h huf.h pool.h threading.h zstd_common.c zstd_trace.h
3 | bitstream.h cpu.h entropy_common.c fse_decompress.c mem.h portability_macros.h xxhash.c zstd_deps.h
4 | )
5 | add_library(zstd-common OBJECT ${SRCFILES})
6 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/util/ConfigScope.h:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #pragma once
3 |
4 | #include "cimb_translator/Config.h"
5 |
6 | class ConfigScope : cimbar::Config
7 | {
8 | public:
9 | using cimbar::Config::active_conf;
10 |
11 | ConfigScope(int mode_val=0)
12 | {
13 | cimbar::Config::update(mode_val);
14 | }
15 |
16 | ~ConfigScope()
17 | {
18 | // reset
19 | cimbar::Config::update();
20 | }
21 |
22 | protected:
23 | };
24 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/libcorrect/tests/include/rs_tester_fec.h:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include
5 | #include
6 | void rs_fec_encode(void *encoder, uint8_t *msg, size_t msg_length,
7 | uint8_t *msg_out);
8 | void rs_fec_decode(void *decoder, uint8_t *encoded, size_t encoded_length,
9 | uint8_t *erasure_locations, size_t erasure_length,
10 | uint8_t *msg, size_t pad_length, size_t num_roots);
11 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/libcorrect/tests/include/rs_tester_fec_shim.h:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include
5 | #include "fec_shim.h"
6 | void rs_fec_encode(void *encoder, uint8_t *msg, size_t msg_length,
7 | uint8_t *msg_out);
8 | void rs_fec_decode(void *decoder, uint8_t *encoded, size_t encoded_length,
9 | uint8_t *erasure_locations, size_t erasure_length,
10 | uint8_t *msg, size_t pad_length, size_t num_roots);
11 |
--------------------------------------------------------------------------------
/app/src/cpp/cfc-cpp/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.4.1)
2 |
3 | add_library(cfc-cpp
4 | SHARED
5 |
6 | jni.cpp
7 | MultiThreadedDecoder.h
8 | )
9 |
10 | find_library(log-lib
11 |
12 | log
13 | )
14 |
15 | target_link_libraries(cfc-cpp
16 |
17 | cimb_translator
18 | extractor
19 |
20 | correct_static
21 | wirehair
22 | zstd
23 | ${OPENCV_LIBS}
24 | ${log-lib}
25 | )
26 |
27 | target_compile_options(cfc-cpp PUBLIC "-DZSTD_STATIC_LINKING_ONLY")
28 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/util/null_stream.h:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #pragma once
3 |
4 | class null_stream
5 | {
6 | public:
7 | null_stream()
8 | {}
9 |
10 | null_stream& write(const char*, unsigned length)
11 | {
12 | _count += length;
13 | return *this;
14 | }
15 |
16 | bool good() const
17 | {
18 | return true;
19 | }
20 |
21 | long tellp() const
22 | {
23 | return _count;
24 | }
25 |
26 | protected:
27 | long _count = 0;
28 | };
29 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/libcorrect/src/convolutional/sse/encode.c:
--------------------------------------------------------------------------------
1 | #include "correct/convolutional/sse/convolutional.h"
2 |
3 | size_t correct_convolutional_sse_encode_len(correct_convolutional_sse *conv, size_t msg_len) {
4 | return correct_convolutional_encode_len(&conv->base_conv, msg_len);
5 | }
6 |
7 | size_t correct_convolutional_sse_encode(correct_convolutional_sse *conv, const uint8_t *msg, size_t msg_len, uint8_t *encoded) {
8 | return correct_convolutional_encode(&conv->base_conv, msg, msg_len, encoded);
9 | }
10 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/web/pwa-recv.json:
--------------------------------------------------------------------------------
1 | {
2 | "lang": "en",
3 | "dir": "ltr",
4 | "name": "cimbar.org Receiver",
5 | "short_name": "cimbar recv",
6 | "icons": [{"src":"icon-192x192.png","sizes":"192x192","type":"image/png"},{"src":"icon-512x512.png","sizes":"512x512","type":"image/png","purpose": "any"},{"src":"icon-512x512-maskable.png","sizes":"512x512","type":"image/png","purpose": "maskable"}],
7 | "scope": "/",
8 | "start_url": "recv.html",
9 | "display": "fullscreen",
10 | "theme_color": "aliceblue",
11 | "background_color": "black"
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/extractor/Deskewer.cpp:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #include "Deskewer.h"
3 | #include "cimb_translator/Config.h"
4 |
5 | Deskewer::Deskewer(cimbar::vec_xy image_size, unsigned anchor_size)
6 | : _imageSize({
7 | image_size.width()? image_size.width() : cimbar::Config::image_size_x(),
8 | image_size.height()? image_size.height() : cimbar::Config::image_size_y()})
9 | , _anchorSize(anchor_size? anchor_size : cimbar::Config::anchor_size())
10 | {
11 | }
12 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/libcorrect/include/correct/convolutional/error_buffer.h:
--------------------------------------------------------------------------------
1 | #include "correct/convolutional.h"
2 |
3 | typedef struct {
4 | unsigned int index;
5 | distance_t *errors[2];
6 | unsigned int num_states;
7 |
8 | const distance_t *read_errors;
9 | distance_t *write_errors;
10 | } error_buffer_t;
11 |
12 | error_buffer_t *error_buffer_create(unsigned int num_states);
13 | void error_buffer_destroy(error_buffer_t *buf);
14 | void error_buffer_reset(error_buffer_t *buf);
15 | void error_buffer_swap(error_buffer_t *buf);
16 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/extractor/Extractor.cpp:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #include "Extractor.h"
3 |
4 | #include "cimb_translator/Config.h"
5 |
6 | Extractor::Extractor(cimbar::vec_xy image_size, unsigned anchor_size)
7 | : _imageSize({
8 | image_size.width()? image_size.width() : cimbar::Config::image_size_x(),
9 | image_size.height()? image_size.height() : cimbar::Config::image_size_y()})
10 | , _anchorSize(anchor_size? anchor_size : cimbar::Config::anchor_size())
11 | {
12 | }
13 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/extractor/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | set(SOURCES
4 | Anchor.h
5 | Corners.h
6 | Deskewer.cpp
7 | Deskewer.h
8 | DistortionParameters.h
9 | EdgeScanState.h
10 | Extractor.cpp
11 | Extractor.h
12 | Geometry.h
13 | Midpoints.h
14 | Point.h
15 | ScanState.h
16 | Scanner.cpp
17 | Scanner.h
18 | SimpleCameraCalibration.cpp
19 | SimpleCameraCalibration.h
20 | Undistort.h
21 | )
22 |
23 | add_library(extractor STATIC ${SOURCES})
24 |
25 | if(NOT DEFINED DISABLE_TESTS)
26 | add_subdirectory(test)
27 | endif()
28 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/exe/cimbar_send/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | project(cimbar_send)
4 |
5 | set (SOURCES
6 | send.cpp
7 | )
8 |
9 | add_executable (
10 | cimbar_send
11 | ${SOURCES}
12 | )
13 |
14 | target_link_libraries(cimbar_send
15 |
16 | cimbar_js
17 | )
18 |
19 | add_custom_command(
20 | TARGET cimbar_send POST_BUILD
21 | COMMAND ${CMAKE_COMMAND} -E copy $ cimbar_send.dbg
22 | COMMAND ${CMAKE_STRIP} -g $
23 | )
24 |
25 | install(
26 | TARGETS cimbar_send
27 | DESTINATION bin
28 | )
29 |
30 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/exe/cimbar_recv2/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | project(cimbar_recv2)
4 |
5 | set (SOURCES
6 | recv2.cpp
7 | )
8 |
9 | add_executable (
10 | cimbar_recv2
11 | ${SOURCES}
12 | )
13 |
14 | target_link_libraries(cimbar_recv2
15 |
16 | cimbar_js
17 | extractor
18 |
19 | GL
20 | glfw
21 | ${OPENCV_LIBS}
22 | opencv_videoio
23 | )
24 |
25 | add_custom_command(
26 | TARGET cimbar_recv2 POST_BUILD
27 | COMMAND ${CMAKE_COMMAND} -E copy $ cimbar_recv2.dbg
28 | COMMAND ${CMAKE_STRIP} -g $
29 | )
30 |
31 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/chromatic_adaptation/test/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | project(chromatic_adaptation_test)
4 |
5 | set (SOURCES
6 | test.cpp
7 | color_correctionTest.cpp
8 | )
9 |
10 | include_directories(
11 | ${libcimbar_SOURCE_DIR}/test
12 | ${libcimbar_SOURCE_DIR}/test/lib
13 | ${CMAKE_CURRENT_SOURCE_DIR}/..
14 | )
15 |
16 | add_executable (
17 | chromatic_adaptation_test
18 | ${SOURCES}
19 | )
20 |
21 | add_test(chromatic_adaptation_test chromatic_adaptation_test)
22 |
23 | target_link_libraries(chromatic_adaptation_test
24 |
25 | ${OPENCV_LIBS}
26 | )
27 |
28 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/cimb_translator/Common.h:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #pragma once
3 |
4 | #include
5 | #include
6 |
7 | namespace cimbar
8 | {
9 | using RGB = std::tuple;
10 |
11 | cv::Mat load_img(std::string path);
12 |
13 | std::tuple getColor(unsigned index, unsigned num_colors, unsigned color_mode);
14 | cv::Mat getTile(unsigned symbol_bits, unsigned symbol, bool dark=true, unsigned num_colors=4, unsigned color=0, unsigned color_mode=1);
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/image_hash/test/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | project(image_hash_test)
4 |
5 | set (SOURCES
6 | test.cpp
7 | averageHashTest.cpp
8 | bitExtractorTest.cpp
9 | fuzzyAhashTest.cpp
10 | )
11 |
12 | include_directories(
13 | ${libcimbar_SOURCE_DIR}/test
14 | ${libcimbar_SOURCE_DIR}/test/lib
15 | ${CMAKE_CURRENT_SOURCE_DIR}/..
16 | )
17 |
18 | add_executable (
19 | image_hash_test
20 | ${SOURCES}
21 | )
22 |
23 | add_test(image_hash_test image_hash_test)
24 |
25 | target_link_libraries(image_hash_test
26 | cimb_translator
27 |
28 | ${OPENCV_LIBS}
29 | )
30 |
31 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/test/TestHelpers.h:
--------------------------------------------------------------------------------
1 |
2 | #include
3 | #include "serialize/format.h"
4 | #include
5 |
6 | namespace TestCimbar
7 | {
8 | inline std::string getSample(std::string filename)
9 | {
10 | return std::string(LIBCIMBAR_PROJECT_ROOT) + "/samples/" + filename;
11 | }
12 |
13 | inline cv::Mat loadSample(std::string filename)
14 | {
15 | cv::Mat mat = cv::imread(getSample(filename));
16 | cv::cvtColor(mat, mat, cv::COLOR_BGR2RGB);
17 | return mat;
18 | }
19 |
20 | inline std::string getProjectDir()
21 | {
22 | return std::string(LIBCIMBAR_PROJECT_ROOT);
23 | }
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/compression/test/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | project(compression_test)
4 |
5 | set (SOURCES
6 | test.cpp
7 | zstd_compressorTest.cpp
8 | zstd_decompressorTest.cpp
9 | zstd_header_checkTest.cpp
10 | )
11 |
12 | include_directories(
13 | ${libcimbar_SOURCE_DIR}/test
14 | ${libcimbar_SOURCE_DIR}/test/lib
15 | ${CMAKE_CURRENT_SOURCE_DIR}/..
16 | )
17 |
18 | add_executable (
19 | compression_test
20 | ${SOURCES}
21 | )
22 |
23 | add_test(compression_test compression_test)
24 |
25 | target_link_libraries(compression_test
26 | zstd
27 |
28 | ${CPPFILESYSTEM}
29 | )
30 |
31 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/libcorrect/include/correct/portable.h:
--------------------------------------------------------------------------------
1 | #ifdef __GNUC__
2 | #define HAVE_BUILTINS
3 | #endif
4 |
5 |
6 | #ifdef HAVE_BUILTINS
7 | #define popcount __builtin_popcount
8 | #define prefetch __builtin_prefetch
9 | #else
10 |
11 | static inline int popcount(int x) {
12 | /* taken from the helpful http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel */
13 | x = x - ((x >> 1) & 0x55555555);
14 | x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
15 | return ((x + (x >> 4) & 0x0f0f0f0f) * 0x01010101) >> 24;
16 | }
17 |
18 | static inline void prefetch(void *x) {}
19 |
20 | #endif
21 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/exe/cimbar_extract/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | project(cimbar_extract)
4 |
5 | set (SOURCES
6 | cimbar_extract.cpp
7 | )
8 |
9 | add_executable (
10 | cimbar_extract
11 | ${SOURCES}
12 | )
13 |
14 | target_link_libraries(cimbar_extract
15 |
16 | extractor
17 |
18 | ${OPENCV_LIBS}
19 | )
20 |
21 | add_custom_command(
22 | TARGET cimbar_extract POST_BUILD
23 | COMMAND ${CMAKE_COMMAND} -E copy $ cimbar_extract.dbg
24 | COMMAND ${CMAKE_STRIP} -g $
25 | )
26 |
27 | install(
28 | TARGETS cimbar_extract
29 | DESTINATION bin
30 | )
31 |
32 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/extractor/DistortionParameters.h:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #pragma once
3 |
4 | #include
5 |
6 | class DistortionParameters
7 | {
8 | public:
9 | cv::Mat camera;
10 | cv::Mat distortion;
11 |
12 | public:
13 | DistortionParameters()
14 | : camera()
15 | , distortion()
16 | {}
17 |
18 | DistortionParameters(const cv::Mat& camera, const cv::Mat& distortion)
19 | : camera(camera)
20 | , distortion(distortion)
21 | {}
22 |
23 | operator bool() const
24 | {
25 | return camera.cols > 0;
26 | }
27 | };
28 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/exe/cimbar/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | project(cimbar_decode)
4 |
5 | set (SOURCES
6 | cimbar.cpp
7 | )
8 |
9 | add_executable (
10 | cimbar
11 | ${SOURCES}
12 | )
13 |
14 | target_link_libraries(cimbar
15 |
16 | cimb_translator
17 | extractor
18 |
19 | correct_static
20 | wirehair
21 | zstd
22 | ${OPENCV_LIBS}
23 | ${CPPFILESYSTEM}
24 | )
25 |
26 | add_custom_command(
27 | TARGET cimbar POST_BUILD
28 | COMMAND ${CMAKE_COMMAND} -E copy $ cimbar.dbg
29 | COMMAND ${CMAKE_STRIP} -g $
30 | )
31 |
32 | install(
33 | TARGETS cimbar
34 | DESTINATION bin
35 | )
36 |
37 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/exe/cimbar_recv/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | project(cimbar_recv)
4 |
5 | set (SOURCES
6 | recv.cpp
7 | )
8 |
9 | add_executable (
10 | cimbar_recv
11 | ${SOURCES}
12 | )
13 |
14 | target_link_libraries(cimbar_recv
15 |
16 | cimbar_js
17 | extractor
18 |
19 | GL
20 | glfw
21 | ${OPENCV_LIBS}
22 | opencv_videoio
23 | )
24 |
25 | add_custom_command(
26 | TARGET cimbar_recv POST_BUILD
27 | COMMAND ${CMAKE_COMMAND} -E copy $ cimbar_recv.dbg
28 | COMMAND ${CMAKE_STRIP} -g $
29 | )
30 |
31 | install(
32 | TARGETS cimbar_recv
33 | DESTINATION bin
34 | )
35 |
36 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/cimbar_js/test/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | project(cimbar_js_test)
4 |
5 | set (SOURCES
6 | test.cpp
7 | cimbar_jsTest.cpp
8 | cimbar_recv_jsTest.cpp
9 | )
10 |
11 | include_directories(
12 | ${libcimbar_SOURCE_DIR}/test
13 | ${libcimbar_SOURCE_DIR}/test/lib
14 | ${CMAKE_CURRENT_SOURCE_DIR}/..
15 | )
16 |
17 | add_executable (
18 | cimbar_js_test
19 | ${SOURCES}
20 | )
21 |
22 | add_test(cimbar_js_test cimbar_js_test)
23 |
24 | target_link_libraries(cimbar_js_test
25 |
26 | cimbar_js
27 | cimb_translator
28 | extractor
29 |
30 | correct_static
31 | wirehair
32 | zstd
33 | ${OPENCV_LIBS}
34 | )
35 |
36 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/zstd/compress/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | set(SRCFILES clevels.h huf_compress.c zstd_compress_sequences.c zstd_double_fast.c zstd_lazy.h zstdmt_compress.h
2 | zstd_compress.c zstd_compress_sequences.h zstd_double_fast.h zstd_ldm.c zstd_opt.c
3 | fse_compress.c zstd_compress_internal.h zstd_compress_superblock.c zstd_fast.c zstd_ldm_geartab.h zstd_opt.h
4 | hist.c zstd_compress_literals.c zstd_compress_superblock.h zstd_fast.h zstd_ldm.h
5 | hist.h zstd_compress_literals.h zstd_cwksp.h zstd_lazy.c zstdmt_compress.c)
6 | add_library(zstd-compress OBJECT ${SRCFILES})
7 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/fountain/test/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | project(fountain_test)
4 |
5 | set (SOURCES
6 | test.cpp
7 | FountainEncodingTest.cpp
8 | FountainMetadataTest.cpp
9 | fountain_sinkTest.cpp
10 | fountain_sinkSpecialTest.cpp
11 | fountain_streamTest.cpp
12 | )
13 |
14 | include_directories(
15 | ${libcimbar_SOURCE_DIR}/test
16 | ${libcimbar_SOURCE_DIR}/test/lib
17 | ${CMAKE_CURRENT_SOURCE_DIR}/..
18 | )
19 |
20 | add_executable (
21 | fountain_test
22 | ${SOURCES}
23 | )
24 |
25 | add_test(fountain_test fountain_test)
26 |
27 | target_link_libraries(fountain_test
28 | wirehair
29 | zstd
30 |
31 | ${CPPFILESYSTEM}
32 | )
33 |
34 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/libcorrect/util/error-sim-sse.c:
--------------------------------------------------------------------------------
1 | #include "correct/util/error-sim-sse.h"
2 |
3 | size_t conv_correct_sse_enclen(void *conv_v, size_t msg_len) {
4 | return correct_convolutional_sse_encode_len((correct_convolutional_sse *)conv_v, msg_len);
5 | }
6 |
7 | void conv_correct_sse_encode(void *conv_v, uint8_t *msg, size_t msg_len, uint8_t *encoded) {
8 | correct_convolutional_sse_encode((correct_convolutional_sse *)conv_v, msg, msg_len, encoded);
9 | }
10 |
11 | ssize_t conv_correct_sse_decode(void *conv_v, uint8_t *soft, size_t soft_len, uint8_t *msg) {
12 | return correct_convolutional_sse_decode_soft((correct_convolutional_sse *)conv_v, soft, soft_len, msg);
13 | }
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/modesel.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
8 |
9 |
12 |
13 |
15 |
16 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/cimb_translator/CellDrift.h:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #pragma once
3 |
4 | #include
5 | #include
6 | #include
7 |
8 | class CellDrift
9 | {
10 | public:
11 | CellDrift(int x=0, int y=0);
12 |
13 | inline static const std::array, 9> driftPairs = {{
14 | {-1, -1}, {0, -1}, {1, -1}, {-1, 0}, {0, 0}, {1, 0}, {-1, 1}, {0, 1}, {1, 1}
15 | }};
16 |
17 | static uint8_t calculate_cooldown(uint8_t previous, uint8_t idx);
18 |
19 | int x() const;
20 | int y() const;
21 |
22 | void updateDrift(int dx, int dy);
23 |
24 | protected:
25 | int _x;
26 | int _y;
27 | };
28 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/extractor/test/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | project(extractor_test)
4 |
5 | set (SOURCES
6 | test.cpp
7 | CornersTest.cpp
8 | DeskewerTest.cpp
9 | ExtractorTest.cpp
10 | ScanStateTest.cpp
11 | ScannerTest.cpp
12 | SimpleCameraCalibrationTest.cpp
13 | UndistortTest.cpp
14 | )
15 |
16 | include_directories(
17 | ${libcimbar_SOURCE_DIR}/test
18 | ${libcimbar_SOURCE_DIR}/test/lib
19 | ${CMAKE_CURRENT_SOURCE_DIR}/..
20 | )
21 |
22 | add_executable (
23 | extractor_test
24 | ${SOURCES}
25 | )
26 |
27 | add_test(extractor_test extractor_test)
28 |
29 | target_link_libraries(extractor_test
30 | extractor
31 |
32 | ${OPENCV_LIBS}
33 | ${CPPFILESYSTEM}
34 | )
35 |
36 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/cimb_translator/CimbEncoder.h:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #pragma once
3 |
4 | #include
5 |
6 | #include
7 | #include
8 |
9 | class CimbEncoder
10 | {
11 | public:
12 | CimbEncoder(unsigned symbol_bits, unsigned color_bits, bool dark=true, unsigned color_mode=1);
13 |
14 | cv::Mat load_tile(unsigned symbol_bits, unsigned index);
15 | bool load_tiles(unsigned symbol_bits);
16 |
17 | const cv::Mat& encode(unsigned bits) const;
18 |
19 | protected:
20 | std::vector _tiles;
21 | unsigned _numSymbols;
22 | unsigned _numColors;
23 | bool _dark;
24 | unsigned _colorMode;
25 | };
26 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/extractor/test/DeskewerTest.cpp:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #include "unittest.h"
3 | #include "TestHelpers.h"
4 |
5 | #include "DeskewerPlus.h"
6 | #include "image_hash/average_hash.h"
7 | #include
8 |
9 | TEST_CASE( "DeskewerTest/testSimple", "[unit]" )
10 | {
11 | Corners corners({312, 519}, {323, 2586}, {2405, 461}, {2425, 2594});
12 | DeskewerPlus de({1024, 1024}, 30);
13 |
14 | cv::Mat actual = de.deskew(TestCimbar::getSample("6bit/4_30_f0_big.jpg"), corners);
15 | assertEquals(cv::Size(1024, 1024), actual.size());
16 |
17 | assertEquals( 0x6e483730782fee5c, image_hash::average_hash(actual) );
18 | }
19 |
20 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/serialize/str_join.h:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #pragma once
3 |
4 | #include
5 |
6 | namespace turbo {
7 | namespace str
8 | {
9 | template
10 | inline std::string join(const Iter& start, const Iter& end, char delim=' ')
11 | {
12 | std::stringstream ss;
13 | Iter it = start;
14 | if (it != end)
15 | ss << *it++;
16 | for (; it != end; ++it)
17 | ss << delim << *it;
18 | return ss.str();
19 | }
20 |
21 | template
22 | inline std::string join(const Type& container, char delim=' ')
23 | {
24 | return join(container.begin(), container.end(), delim);
25 | }
26 | }
27 | }// namespace turbo
28 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/libcorrect/src/convolutional/metric.c:
--------------------------------------------------------------------------------
1 | #include "correct/convolutional/metric.h"
2 |
3 | // measure the square of the euclidean distance between x and y
4 | // since euclidean dist is sqrt(a^2 + b^2 + ... + n^2), the square is just
5 | // a^2 + b^2 + ... + n^2
6 | distance_t metric_soft_distance_quadratic(unsigned int hard_x, const uint8_t *soft_y, size_t len) {
7 | distance_t dist = 0;
8 | for (unsigned int i = 0; i < len; i++) {
9 | // first, convert hard_x to a soft measurement (0 -> 0, 1 - > 255)
10 | unsigned int soft_x = (hard_x & 1) ? 255 : 0;
11 | hard_x >>= 1;
12 | int d = soft_y[i] - soft_x;
13 | dist += d*d;
14 | }
15 | return dist >> 3;
16 | }
17 |
18 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/cimb_translator/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | set(SOURCES
4 | bitmaps.h
5 | AdjacentCellFinder.cpp
6 | AdjacentCellFinder.h
7 | Cell.h
8 | CellDrift.cpp
9 | CellDrift.h
10 | CellPositions.cpp
11 | CellPositions.h
12 | CimbDecoder.cpp
13 | CimbDecoder.h
14 | CimbEncoder.cpp
15 | CimbEncoder.h
16 | CimbReader.cpp
17 | CimbReader.h
18 | CimbWriter.cpp
19 | CimbWriter.h
20 | Common.cpp
21 | Common.h
22 | Config.h
23 | FloodDecodePositions.cpp
24 | FloodDecodePositions.h
25 | GridConf.h
26 | Interleave.h
27 | LinearDecodePositions.h
28 | PositionData.h
29 | )
30 |
31 | add_library(cimb_translator STATIC ${SOURCES})
32 |
33 | if(NOT DEFINED DISABLE_TESTS)
34 | add_subdirectory(test)
35 | endif()
36 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/encoder/test/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | project(encoder_test)
4 |
5 | set (SOURCES
6 | test.cpp
7 | DecoderTest.cpp
8 | EncoderTest.cpp
9 | EncoderRoundTripTest.cpp
10 | aligned_streamTest.cpp
11 | escrow_buffer_writerTest.cpp
12 | reed_solomon_streamTest.cpp
13 | )
14 |
15 | include_directories(
16 | ${libcimbar_SOURCE_DIR}/test
17 | ${libcimbar_SOURCE_DIR}/test/lib
18 | ${CMAKE_CURRENT_SOURCE_DIR}/..
19 | )
20 |
21 | add_executable (
22 | encoder_test
23 | ${SOURCES}
24 | )
25 |
26 | add_test(encoder_test encoder_test)
27 |
28 | target_link_libraries(encoder_test
29 |
30 | cimb_translator
31 | extractor
32 |
33 | correct_static
34 | wirehair
35 | zstd
36 | ${OPENCV_LIBS}
37 | ${CPPFILESYSTEM}
38 | )
39 |
40 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/util/MakeTempDirectory.h:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #pragma once
3 |
4 | #include
5 | #include
6 | #include
7 |
8 | class MakeTempDirectory
9 | {
10 | public:
11 | MakeTempDirectory(bool cleanup=true)
12 | : _cleanup(cleanup)
13 | {
14 | _path = std::tmpnam(nullptr);
15 | std::filesystem::create_directory(_path);
16 | }
17 |
18 | ~MakeTempDirectory()
19 | {
20 | if (_cleanup)
21 | {
22 | std::error_code ec;
23 | std::filesystem::remove_all(_path, ec);
24 | }
25 | }
26 |
27 | std::filesystem::path path() const
28 | {
29 | return _path;
30 | }
31 |
32 | protected:
33 | bool _cleanup;
34 | std::filesystem::path _path;
35 | };
36 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/libcorrect/include/correct/convolutional.h:
--------------------------------------------------------------------------------
1 | #ifndef CORRECT_CONVOLUTIONAL
2 | #define CORRECT_CONVOLUTIONAL
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 |
12 | #include "correct.h"
13 | #include "correct/portable.h"
14 |
15 | typedef unsigned int shift_register_t;
16 | typedef uint16_t polynomial_t;
17 | typedef uint64_t path_t;
18 | typedef uint8_t soft_t;
19 | static const soft_t soft_max = UINT8_MAX;
20 |
21 | typedef uint16_t distance_t;
22 | static const distance_t distance_max = UINT16_MAX;
23 |
24 | typedef enum {
25 | CORRECT_SOFT_LINEAR,
26 | CORRECT_SOFT_QUADRATIC,
27 | } soft_measurement_t;
28 | #endif
29 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/cimb_translator/CimbWriter.h:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #pragma once
3 |
4 | #include "CellPositions.h"
5 | #include "CimbEncoder.h"
6 | #include "util/vec_xy.h"
7 |
8 | class CimbWriter
9 | {
10 | public:
11 | CimbWriter(unsigned symbol_bits, unsigned color_bits, bool dark=true, unsigned color_mode=1, cimbar::vec_xy size={});
12 |
13 | bool write(unsigned bits);
14 | bool done() const;
15 |
16 | cv::Mat image() const;
17 |
18 | unsigned num_cells() const;
19 |
20 | protected:
21 | void paste(const cv::Mat& img, int x, int y);
22 |
23 | protected:
24 | cv::Mat _image;
25 | CellPositions _positions;
26 | CimbEncoder _encoder;
27 | unsigned _offsetX = 0;
28 | unsigned _offsetY = 0;
29 | };
30 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/compression/zstd_header_check.h:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #pragma once
3 |
4 | #include "zstd/zstd.h"
5 | #include
6 |
7 | namespace cimbar {
8 |
9 | class zstd_header_check
10 | {
11 | public:
12 | static std::string get_filename(const unsigned char* data, size_t len)
13 | {
14 | if (!ZSTD_isSkippableFrame(data, len))
15 | return "";
16 |
17 | std::string res;
18 | res.resize(500, '\0');
19 | size_t sz = ZSTD_readSkippableFrame(res.data(), res.size(), nullptr, data, len);
20 | if (sz <= 1)
21 | return "";
22 |
23 | switch (res[0])
24 | {
25 | case 1:
26 | return std::string(&res[1], sz-1);
27 | default:
28 | break;
29 | }
30 | return "";
31 | }
32 |
33 | };
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/cimb_translator/test/CellPositionsTest.cpp:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #include "unittest.h"
3 |
4 | #include "CellPositions.h"
5 |
6 | #include
7 | #include
8 | #include
9 |
10 | TEST_CASE( "CellPositionsTest/testSimple", "[unit]" )
11 | {
12 | CellPositions cells(cimbar::vec_xy{9, 9}, cimbar::vec_xy{112, 112}, 8, cimbar::vec_xy{6, 6});
13 |
14 | // test first coordinate. We'll just count the rest.
15 | assertFalse( cells.done() );
16 | CellPositions::coordinate xy = cells.next();
17 | assertEquals(62, xy.first);
18 | assertEquals(8, xy.second);
19 |
20 | unsigned count = 1;
21 | while (!cells.done())
22 | {
23 | cells.next();
24 | ++count;
25 | }
26 |
27 | assertEquals(12400, count);
28 | }
29 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/libcorrect/include/correct/convolutional/metric.h:
--------------------------------------------------------------------------------
1 | #include "correct/convolutional.h"
2 |
3 | // measure the hamming distance of two bit strings
4 | // implemented as population count of x XOR y
5 | static inline distance_t metric_distance(unsigned int x, unsigned int y) {
6 | return popcount(x ^ y);
7 | }
8 |
9 | static inline distance_t metric_soft_distance_linear(unsigned int hard_x, const uint8_t *soft_y, size_t len) {
10 | distance_t dist = 0;
11 | for (unsigned int i = 0; i < len; i++) {
12 | unsigned int soft_x = ((int8_t)(0) - (hard_x & 1)) & 0xff;
13 | hard_x >>= 1;
14 | int d = soft_y[i] - soft_x;
15 | dist += (d < 0) ? -d : d;
16 | }
17 | return dist;
18 | }
19 |
20 | distance_t metric_soft_distance_quadratic(unsigned int hard_x, const uint8_t *soft_y, size_t len);
21 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/cimb_translator/test/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.10)
2 |
3 | project(cimb_translator_test)
4 |
5 | set (SOURCES
6 | test.cpp
7 | AdjacentCellFinderTest.cpp
8 | CellTest.cpp
9 | CellDriftTest.cpp
10 | CellPositionsTest.cpp
11 | CimbDecoderTest.cpp
12 | CimbEncoderTest.cpp
13 | CimbReaderTest.cpp
14 | CimbWriterTest.cpp
15 | FloodDecodePositionsTest.cpp
16 | InterleaveTest.cpp
17 | LinearDecodePositionsTest.cpp
18 | )
19 |
20 | include_directories(
21 | ${libcimbar_SOURCE_DIR}/test
22 | ${libcimbar_SOURCE_DIR}/test/lib
23 | ${CMAKE_CURRENT_SOURCE_DIR}/..
24 | )
25 |
26 | add_executable (
27 | cimb_translator_test
28 | ${SOURCES}
29 | )
30 |
31 | add_test(cimb_translator_test cimb_translator_test)
32 |
33 | target_link_libraries(cimb_translator_test
34 | cimb_translator
35 |
36 | ${OPENCV_LIBS}
37 | )
38 |
39 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/cimbar_js/cimbar_js.h:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #ifndef CIMBAR_JS_API_H
3 | #define CIMBAR_JS_API_H
4 |
5 | #ifdef __cplusplus
6 | extern "C" {
7 | #endif
8 |
9 | int cimbare_init_window(int width, int height);
10 | int cimbare_rotate_window(bool rotate);
11 | int cimbare_render();
12 | int cimbare_next_frame();
13 | int cimbare_init_encode(const char* filename, unsigned fnsize, int encode_id);
14 | int cimbare_encode_bufsize();
15 | int cimbare_encode(const unsigned char* buffer, unsigned size);
16 | int cimbare_configure(int mode_val, int compression);
17 | float cimbare_get_aspect_ratio();
18 |
19 | // internal usage
20 | bool cimbare_auto_scale_window();
21 | int cimbare_get_frame_buff(unsigned char** buff);
22 |
23 | #ifdef __cplusplus
24 | }
25 | #endif
26 |
27 | #endif // CIMBAR_JS_API_H
28 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/zstd/common/xxhash.c:
--------------------------------------------------------------------------------
1 | /*
2 | * xxHash - Fast Hash algorithm
3 | * Copyright (c) Meta Platforms, Inc. and affiliates.
4 | *
5 | * You can contact the author at :
6 | * - xxHash homepage: https://cyan4973.github.io/xxHash/
7 | * - xxHash source repository : https://github.com/Cyan4973/xxHash
8 | *
9 | * This source code is licensed under both the BSD-style license (found in the
10 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found
11 | * in the COPYING file in the root directory of this source tree).
12 | * You may select, at your option, one of the above-listed licenses.
13 | */
14 |
15 |
16 |
17 | /*
18 | * xxhash.c instantiates functions defined in xxhash.h
19 | */
20 |
21 | #define XXH_STATIC_LINKING_ONLY /* access advanced declarations */
22 | #define XXH_IMPLEMENTATION /* access definitions */
23 |
24 | #include "xxhash.h"
25 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/util/Timer.h:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #pragma once
3 |
4 | #include
5 |
6 | class TimeAccumulator
7 | {
8 | public:
9 | TimeAccumulator()
10 | {}
11 |
12 | void increment(clock_t num)
13 | {
14 | _total += num;
15 | _ticks += 1;
16 | }
17 |
18 | double avg() const
19 | {
20 | if (_ticks == 0)
21 | return 0;
22 | return _total/_ticks;
23 | }
24 |
25 | clock_t ticks() const
26 | {
27 | return _ticks;
28 | }
29 |
30 | protected:
31 | clock_t _total = 0;
32 | clock_t _ticks = 0;
33 | };
34 |
35 | class Timer
36 | {
37 | public:
38 | Timer(TimeAccumulator& accum)
39 | : _accum(accum)
40 | , _start(clock())
41 | {}
42 |
43 | ~Timer()
44 | {
45 | _accum.increment(clock() - _start);
46 | }
47 |
48 | protected:
49 | TimeAccumulator& _accum;
50 | clock_t _start;
51 | };
52 |
--------------------------------------------------------------------------------
/app/src/cpp/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.4.1)
2 |
3 | project ( cfc )
4 |
5 | set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -mllvm -inline-threshold=1500 -flto=thin")
6 | set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -mllvm -inline-threshold=1500 -flto=thin")
7 |
8 | # opencv stuff
9 | add_library( lib_opencv SHARED IMPORTED )
10 | set_target_properties(lib_opencv PROPERTIES IMPORTED_LOCATION ${OpenCV_DIR}/libs/${ANDROID_ABI}/libopencv_java4.so)
11 |
12 | set( DISABLE_TESTS true )
13 | set( OPENCV_LIBS "lib_opencv" )
14 |
15 | # our stuff
16 | set (PROJECTS
17 | cfc-cpp
18 | concurrent
19 | libcimbar
20 | )
21 |
22 | include_directories(
23 | ${OpenCV_DIR}/jni/include
24 | .
25 | libcimbar/src/lib
26 | libcimbar/src/third_party_lib
27 | )
28 |
29 | foreach(proj ${PROJECTS})
30 | add_subdirectory(${proj} build/${proj})
31 | endforeach()
32 |
33 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/extractor/DeskewerPlus.h:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #pragma once
3 |
4 | #include "Deskewer.h"
5 |
6 | #include
7 |
8 | class DeskewerPlus : public Deskewer
9 | {
10 | public:
11 | using Deskewer::Deskewer;
12 | using Deskewer::deskew;
13 |
14 | cv::Mat deskew(std::string img, const Corners& corners);
15 | bool save(const cv::Mat& img, std::string path);
16 |
17 | protected:
18 | };
19 |
20 | inline cv::Mat DeskewerPlus::deskew(std::string img, const Corners& corners)
21 | {
22 | cv::Mat mat = cv::imread(img);
23 | cv::cvtColor(mat, mat, cv::COLOR_BGR2RGB);
24 | return Deskewer::deskew(mat, corners);
25 | }
26 |
27 | inline bool DeskewerPlus::save(const cv::Mat& img, std::string path)
28 | {
29 | cv::Mat bgr;
30 | cv::cvtColor(img, bgr, cv::COLOR_RGB2BGR);
31 | return cv::imwrite(path, img);
32 | }
33 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/cimb_translator/test/LinearDecodePositionsTest.cpp:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #include "unittest.h"
3 |
4 | #include "LinearDecodePositions.h"
5 |
6 | #include
7 | #include
8 | #include
9 |
10 | TEST_CASE( "LinearDecodePositionsTest/testSimple", "[unit]" )
11 | {
12 | LinearDecodePositions cells(cimbar::vec_xy{9, 9}, cimbar::vec_xy{112, 112}, 8, cimbar::vec_xy{6, 6});
13 |
14 | // test first coordinate. We'll just count the rest.
15 | assertFalse( cells.done() );
16 | auto [i, xy, drift] = cells.next();
17 | assertEquals(62, xy.first);
18 | assertEquals(8, xy.second);
19 | assertEquals(i, 0);
20 |
21 | unsigned count = 1;
22 | while (!cells.done())
23 | {
24 | auto [i, xy, drift] = cells.next();
25 | assertEquals(i, count);
26 | ++count;
27 | }
28 |
29 | assertEquals(12400, count);
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/test/unittest.h:
--------------------------------------------------------------------------------
1 | #include "catch.hpp"
2 |
3 | #define assertMsg(expr,msg) {bool _res_ = expr; if(!_res_) FAIL(msg); REQUIRE(_res_);}
4 | #define assertTrue(expr) REQUIRE(expr)
5 | #define assertFalse(expr) REQUIRE_FALSE(expr)
6 | #define assertEquals(x,y) REQUIRE((x) == (y))
7 | #define assertMatch(x,y) assertMsg(std::regex_match(y, std::regex(x)), x + std::string(" does not match ") + y)
8 | #define assertIn(x,y) REQUIRE(std::find(y.begin(), y.end(), x) != y.end())
9 | #define assertStringsEqual(x,y) REQUIRE(std::string(x) == std::string(y))
10 | #define assertStringContains(x,y) assertMsg(std::string(y).find(x) != std::string::npos, std::string(y) + " did not contain " + std::string(x))
11 | #define assertInRange(x,y,z) REQUIRE(x <= y); REQUIRE(y <= z)
12 | #define assertAlmostEquals(x,y) assertInRange(x-1,y,x+1)
13 | #define assertNull(expr) REQUIRE(expr == (void*)NULL)
14 | #define assertNotNull(expr) REQUIRE(expr != (void*)NULL)
15 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/chromatic_adaptation/adaptation_transform.h:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #pragma once
3 |
4 | #include
5 |
6 | namespace adaptation_transform
7 | {
8 | struct bradford
9 | {
10 | const cv::Matx& operator()() const
11 | {
12 | static cv::Matx transform(
13 | 0.8951000, 0.2664000, -0.1614000,
14 | -0.7502000, 1.7135000, 0.0367000,
15 | 0.0389000, -0.0685000, 1.0296000
16 | );
17 | return transform;
18 | }
19 | };
20 |
21 | struct von_kries
22 | {
23 | const cv::Matx& operator()() const
24 | {
25 | static cv::Matx transform(
26 | 0.4002400, 0.7076000, -0.0808100,
27 | -0.2263000, 1.1653200, 0.0457000,
28 | 0.0000000, 0.0000000, 0.9182200
29 | );
30 | return transform;
31 | }
32 | };
33 | }
34 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/lib/cimb_translator/test/CimbEncoderTest.cpp:
--------------------------------------------------------------------------------
1 | /* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */
2 | #include "unittest.h"
3 |
4 | #include "CimbEncoder.h"
5 |
6 | #include "cimb_translator/Common.h"
7 | #include
8 |
9 | #include
10 | #include
11 | #include
12 | using std::string;
13 |
14 | TEST_CASE( "CimbEncoderTest/testSimple", "[unit]" )
15 | {
16 | CimbEncoder cw(4, 0);
17 | cv::Mat res = cw.encode(14);
18 |
19 | cv::Mat expected = cimbar::getTile(4, 14, true);
20 | REQUIRE(cv::sum(expected != res) == cv::Scalar(0,0,0,0));
21 | }
22 |
23 | TEST_CASE( "CimbEncoderTest/testColor", "[unit]" )
24 | {
25 | CimbEncoder cw(4, 3);
26 | cv::Mat res = cw.encode(55);
27 |
28 | cv::Mat expected = cimbar::getTile(4, 7, true, 8, 3); // 3*16 + 7 == 55
29 | REQUIRE(cv::sum(expected != res) == cv::Scalar(0,0,0,0));
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/libcorrect/src/convolutional/sse/convolutional.c:
--------------------------------------------------------------------------------
1 | #include "correct/convolutional/sse/convolutional.h"
2 |
3 | correct_convolutional_sse *correct_convolutional_sse_create(size_t rate,
4 | size_t order,
5 | const polynomial_t *poly) {
6 | correct_convolutional_sse *conv = malloc(sizeof(correct_convolutional_sse));
7 | correct_convolutional *init_conv = _correct_convolutional_init(&conv->base_conv, rate, order, poly);
8 | if (!init_conv) {
9 | free(conv);
10 | conv = NULL;
11 | }
12 | return conv;
13 | }
14 |
15 | void correct_convolutional_sse_destroy(correct_convolutional_sse *conv) {
16 | if (conv->base_conv.has_init_decode) {
17 | oct_lookup_destroy(conv->oct_lookup);
18 | }
19 | _correct_convolutional_teardown(&conv->base_conv);
20 | free(conv);
21 | }
22 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/src/third_party_lib/base91/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2011..2016 r-lyeh (https://github.com/r-lyeh)
2 |
3 | This software is provided 'as-is', without any express or implied
4 | warranty. In no event will the authors be held liable for any damages
5 | arising from the use of this software.
6 |
7 | Permission is granted to anyone to use this software for any purpose,
8 | including commercial applications, and to alter it and redistribute it
9 | freely, subject to the following restrictions:
10 |
11 | 1. The origin of this software must not be misrepresented; you must not
12 | claim that you wrote the original software. If you use this software
13 | in a product, an acknowledgment in the product documentation would be
14 | appreciated but is not required.
15 | 2. Altered source versions must be plainly marked as such, and must not be
16 | misrepresented as being the original software.
17 | 3. This notice may not be removed or altered from any source distribution.
18 |
--------------------------------------------------------------------------------
/app/src/cpp/libcimbar/package-cimbar-html.py:
--------------------------------------------------------------------------------
1 |
2 | def get_path(name):
3 | fns = {
4 | 'index': 'web/index.html',
5 | 'cimbar_js': 'web/cimbar_js.js',
6 | 'main_js': 'web/main.js',
7 | 'output': 'web/cimbar_js.html',
8 | }
9 | return fns[name]
10 |
11 |
12 | def read_file(name):
13 | with open(get_path(name), 'rt') as f:
14 | return f.read()
15 |
16 |
17 | def read_script(name):
18 | script = read_file(name)
19 | return '
26 |
27 |
28 |
40 |
41 |
42 |
43 |
44 |
45 |