The core image-processing and machine-learning code for card.io, which is shared between iOS and Android.
C++ HTML C Python CMake Objective-C++
Clone or download
Latest commit 0aac4a0 Mar 2, 2017
Permalink
Failed to load latest commit information.
.github Standardize ISSUE_TEMPLATE.md Feb 25, 2017
Eigen fix: Android-source issue #60 Apr 20, 2016
Resources and one more asset for README.md Aug 4, 2014
cv clarify row2_index calculation May 29, 2015
cython_dmz Cython: update dmz.pyxbld re `SCAN_EXPIRY` Apr 18, 2015
docs expiry_segmentation.md: grammar pedantry May 13, 2015
models improve generated code for convolutional model Feb 19, 2015
opencv2 opencv2 README.md: fix a typo Mar 20, 2015
scan Forward-declare struct ScannerState for compatibility with the iOS pr… Sep 24, 2016
.gitignore Initial commit Jul 31, 2014
CONTRIBUTING.md Update CONTRIBUTING to be platform agnostic Jan 5, 2015
LICENSE.md Update license year and company May 16, 2016
README.md README.md: add pointers to some documentation May 11, 2016
compile.h Initial commit Jul 31, 2014
dmz.cpp Forward-declare struct ScannerState for compatibility with the iOS pr… Sep 24, 2016
dmz.h Forward-declare struct ScannerState for compatibility with the iOS pr… Sep 24, 2016
dmz_all.cpp update the fabfile.py script that makes dmz_all.cpp Feb 10, 2015
dmz_constants.h Initial commit Jul 31, 2014
dmz_debug.h Expiry: initial commit Nov 25, 2014
dmz_macros.h Expiry: initial commit Nov 25, 2014
dmz_olm.cpp Add MasterCard 2-Series Aug 16, 2016
dmz_olm.h Initial commit Jul 31, 2014
eigen.h enable Eigen assertions etc, for Debug builds Feb 19, 2015
fabfile.py fabfile: remove extraneous whitespace Jun 26, 2015
geometry.cpp Initial commit Jul 31, 2014
geometry.h Initial commit Jul 31, 2014
mz.cpp Expiry: more Cython work Dec 17, 2014
mz.h Expiry: fix a "merge" bug Nov 25, 2014
mz_android.cpp add mz_prepare_for_backgrounding to mz_android Jan 5, 2015
mz_android.h remove old DMZ_MANGLE_NAME references from mz_android.* Jan 5, 2015
mz_ios.h expiry debug: collect illustrative images Apr 27, 2015
mz_ios.mm expiry debug: collect illustrative images Apr 27, 2015
neon.h Initial commit Jul 31, 2014
processor_support.cpp add x86-64 Sep 25, 2015
processor_support.h add note re arm64 vs. NEON settings Apr 16, 2015
requirements.txt Initial commit Jul 31, 2014

README.md

card.io logo

card.io-dmz is intended to be used as a submodule of the main card.io SDK, card.io-iOS-source or card.io-Android-source.

The card.io-dmz submodule includes the core, client-side image processing code which is shared between iOS and Android.

As with the main card.io source repos, this repo does not yet contain is much in the way of documentation. 😿 So please feel free to ask any questions by creating github issues -- we'll gradually build our documentation based on the discussions there.

Note that this is actual production code, which has been iterated upon by multiple developers over several years. If you see something that could benefit from being tidied up, rewritten, or otherwise improved, your Pull Requests will be welcome! See CONTRIBUTING.md for details.

Brought to you by
PayPal logo

Why "dmz?"

dmz stands for "demilitarized zone" -- code that is not platform-specific to iOS, Android, nor any other OS.

Some platform specific code did sneak in, but you'll note that it is in files called mz. 😸 A dmz_context structure allows each platform to associate its specific data as needed.

Documentation

The dmz code contains many helpful comments, and variable and function names are usually meaningful, but otherwise we have not prepared much in the way of documentation.

A very informative resource is this talk that Josh Bleecher Snyder gave in 2015. He provides a fairly detailed overview of the steps followed by the card.io pipeline, and the thinking behind them.

There are also some useful documents in the docs folder.

Some notes on writing dmz code

  • All functions that do not need to be called from outside the dmz should be declared and implemented prefixed by DMZ_INTERNAL. (This should be as much of the dmz as possible.)
  • If you add a new implementation file to the dmz, run fab concat to regenerate dmz_all.cpp, which is the only file that actually gets compiled.

If you're a client of the dmz, you should only ever compile dmz_all.cpp. You should run fab concat before every build.

Contributors

card.io was created by Josh Bleecher Snyder.

Subsequent help has come from Brent Fitzgerald, Tom Whipple, Dave Goldman, and Roman Punskyy.

And from you! Pull requests and new issues are welcome. See CONTRIBUTING.md for details.