qrscanner 0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +2 -0
- data/Manifest +478 -0
- data/README +41 -0
- data/Rakefile +9 -0
- data/bin/qrscanner +9 -0
- data/ext/qrscanner/extconf.rb +70 -0
- data/ext/qrscanner/qrscanner.c +32 -0
- data/ext/qrscanner/zxing/README +43 -0
- data/ext/qrscanner/zxing/SConscript +55 -0
- data/ext/qrscanner/zxing/SConstruct +7 -0
- data/ext/qrscanner/zxing/astyle-options +12 -0
- data/ext/qrscanner/zxing/blackboxtest.sh +45 -0
- data/ext/qrscanner/zxing/core/src/zxing/BarcodeFormat.cpp +38 -0
- data/ext/qrscanner/zxing/core/src/zxing/BarcodeFormat.h +42 -0
- data/ext/qrscanner/zxing/core/src/zxing/Binarizer.cpp +36 -0
- data/ext/qrscanner/zxing/core/src/zxing/Binarizer.h +46 -0
- data/ext/qrscanner/zxing/core/src/zxing/BinaryBitmap.cpp +67 -0
- data/ext/qrscanner/zxing/core/src/zxing/BinaryBitmap.h +57 -0
- data/ext/qrscanner/zxing/core/src/zxing/DecodeHints.cpp +111 -0
- data/ext/qrscanner/zxing/core/src/zxing/DecodeHints.h +69 -0
- data/ext/qrscanner/zxing/core/src/zxing/Exception.cpp +25 -0
- data/ext/qrscanner/zxing/core/src/zxing/Exception.h +39 -0
- data/ext/qrscanner/zxing/core/src/zxing/LuminanceSource.cpp +47 -0
- data/ext/qrscanner/zxing/core/src/zxing/LuminanceSource.h +49 -0
- data/ext/qrscanner/zxing/core/src/zxing/MultiFormatReader.cpp +102 -0
- data/ext/qrscanner/zxing/core/src/zxing/MultiFormatReader.h +49 -0
- data/ext/qrscanner/zxing/core/src/zxing/Reader.cpp +31 -0
- data/ext/qrscanner/zxing/core/src/zxing/Reader.h +40 -0
- data/ext/qrscanner/zxing/core/src/zxing/ReaderException.cpp +32 -0
- data/ext/qrscanner/zxing/core/src/zxing/ReaderException.h +34 -0
- data/ext/qrscanner/zxing/core/src/zxing/Result.cpp +59 -0
- data/ext/qrscanner/zxing/core/src/zxing/Result.h +53 -0
- data/ext/qrscanner/zxing/core/src/zxing/ResultPoint.cpp +27 -0
- data/ext/qrscanner/zxing/core/src/zxing/ResultPoint.h +39 -0
- data/ext/qrscanner/zxing/core/src/zxing/ResultPointCallback.cpp +26 -0
- data/ext/qrscanner/zxing/core/src/zxing/ResultPointCallback.h +39 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/Array.cpp +22 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/Array.h +207 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/BitArray.cpp +129 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/BitArray.h +55 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/BitMatrix.cpp +178 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/BitMatrix.h +65 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/BitSource.cpp +75 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/BitSource.h +67 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/Counted.cpp +32 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/Counted.h +205 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/DecoderResult.cpp +37 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/DecoderResult.h +43 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/DetectorResult.cpp +41 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/DetectorResult.h +46 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/EdgeDetector.cpp +191 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/EdgeDetector.h +38 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/GlobalHistogramBinarizer.cpp +209 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/GlobalHistogramBinarizer.h +47 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/GreyscaleLuminanceSource.cpp +70 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/GreyscaleLuminanceSource.h +62 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/GreyscaleRotatedLuminanceSource.cpp +65 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/GreyscaleRotatedLuminanceSource.h +60 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/GridSampler.cpp +101 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/GridSampler.h +43 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/HybridBinarizer.cpp +168 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/HybridBinarizer.h +55 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/IllegalArgumentException.cpp +31 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/IllegalArgumentException.h +33 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/PerspectiveTransform.cpp +107 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/PerspectiveTransform.h +49 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/Point.h +47 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/Str.cpp +38 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/Str.h +40 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/reedsolomon/GF256.cpp +136 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/reedsolomon/GF256.h +68 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/reedsolomon/GF256Poly.cpp +198 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/reedsolomon/GF256Poly.h +53 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/reedsolomon/ReedSolomonDecoder.cpp +193 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/reedsolomon/ReedSolomonDecoder.h +46 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/reedsolomon/ReedSolomonException.cpp +30 -0
- data/ext/qrscanner/zxing/core/src/zxing/common/reedsolomon/ReedSolomonException.h +33 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/DataMatrixReader.cpp +82 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/DataMatrixReader.h +45 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/Version.cpp +199 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/Version.h +87 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/decoder/BitMatrixParser.cpp +364 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/decoder/BitMatrixParser.h +59 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/decoder/DataBlock.cpp +113 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/decoder/DataBlock.h +49 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/decoder/DecodedBitStreamParser.cpp +404 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/decoder/DecodedBitStreamParser.h +103 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/decoder/Decoder.cpp +96 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/decoder/Decoder.h +50 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/detector/CornerPoint.cpp +54 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/detector/CornerPoint.h +47 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/detector/Detector.cpp +315 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/detector/Detector.h +79 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/detector/MonochromeRectangleDetector.cpp +172 -0
- data/ext/qrscanner/zxing/core/src/zxing/datamatrix/detector/MonochromeRectangleDetector.h +61 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/Code128Reader.cpp +490 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/Code128Reader.h +63 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/Code39Reader.cpp +352 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/Code39Reader.h +58 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/EAN13Reader.cpp +95 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/EAN13Reader.h +44 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/EAN8Reader.cpp +73 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/EAN8Reader.h +41 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/ITFReader.cpp +363 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/ITFReader.h +56 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/MultiFormatOneDReader.cpp +66 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/MultiFormatOneDReader.h +38 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/MultiFormatUPCEANReader.cpp +87 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/MultiFormatUPCEANReader.h +38 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/OneDReader.cpp +206 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/OneDReader.h +50 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/OneDResultPoint.cpp +36 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/OneDResultPoint.h +40 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/UPCAReader.cpp +65 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/UPCAReader.h +49 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/UPCEANReader.cpp +311 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/UPCEANReader.h +77 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/UPCEReader.cpp +143 -0
- data/ext/qrscanner/zxing/core/src/zxing/oned/UPCEReader.h +47 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/ErrorCorrectionLevel.cpp +49 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/ErrorCorrectionLevel.h +46 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/FormatInformation.cpp +108 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/FormatInformation.h +54 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/QRCodeReader.cpp +82 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/QRCodeReader.h +43 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/Version.cpp +557 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/Version.h +85 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/decoder/BitMatrixParser.cpp +191 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/decoder/BitMatrixParser.h +56 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/decoder/DataBlock.cpp +118 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/decoder/DataBlock.h +50 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/decoder/DataMask.cpp +159 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/decoder/DataMask.h +50 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/decoder/DecodedBitStreamParser.cpp +353 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/decoder/DecodedBitStreamParser.h +59 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/decoder/Decoder.cpp +103 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/decoder/Decoder.h +47 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/decoder/Mode.cpp +73 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/decoder/Mode.h +50 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/detector/AlignmentPattern.cpp +46 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/detector/AlignmentPattern.h +45 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/detector/AlignmentPatternFinder.cpp +209 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/detector/AlignmentPatternFinder.h +68 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/detector/Detector.cpp +286 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/detector/Detector.h +64 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/detector/FinderPattern.cpp +58 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/detector/FinderPattern.h +48 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/detector/FinderPatternFinder.cpp +540 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/detector/FinderPatternFinder.h +69 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/detector/FinderPatternInfo.cpp +41 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/detector/FinderPatternInfo.h +47 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/detector/QREdgeDetector.cpp +169 -0
- data/ext/qrscanner/zxing/core/src/zxing/qrcode/detector/QREdgeDetector.h +48 -0
- data/ext/qrscanner/zxing/core/tests/src/TestRunner.cpp +30 -0
- data/ext/qrscanner/zxing/core/tests/src/common/BitArrayTest.cpp +96 -0
- data/ext/qrscanner/zxing/core/tests/src/common/BitArrayTest.h +50 -0
- data/ext/qrscanner/zxing/core/tests/src/common/BitMatrixTest.cpp +107 -0
- data/ext/qrscanner/zxing/core/tests/src/common/BitMatrixTest.h +55 -0
- data/ext/qrscanner/zxing/core/tests/src/common/BitSourceTest.cpp +49 -0
- data/ext/qrscanner/zxing/core/tests/src/common/BitSourceTest.h +42 -0
- data/ext/qrscanner/zxing/core/tests/src/common/BlackPointEstimatorTest.cpp +47 -0
- data/ext/qrscanner/zxing/core/tests/src/common/BlackPointEstimatorTest.h +45 -0
- data/ext/qrscanner/zxing/core/tests/src/common/CountedTest.cpp +54 -0
- data/ext/qrscanner/zxing/core/tests/src/common/CountedTest.h +46 -0
- data/ext/qrscanner/zxing/core/tests/src/common/PerspectiveTransformTest.cpp +69 -0
- data/ext/qrscanner/zxing/core/tests/src/common/PerspectiveTransformTest.h +47 -0
- data/ext/qrscanner/zxing/core/tests/src/common/reedsolomon/ReedSolomonTest.cpp +130 -0
- data/ext/qrscanner/zxing/core/tests/src/common/reedsolomon/ReedSolomonTest.h +62 -0
- data/ext/qrscanner/zxing/core/tests/src/qrcode/ErrorCorrectionLevelTest.cpp +47 -0
- data/ext/qrscanner/zxing/core/tests/src/qrcode/ErrorCorrectionLevelTest.h +45 -0
- data/ext/qrscanner/zxing/core/tests/src/qrcode/FormatInformationTest.cpp +70 -0
- data/ext/qrscanner/zxing/core/tests/src/qrcode/FormatInformationTest.h +47 -0
- data/ext/qrscanner/zxing/core/tests/src/qrcode/VersionTest.cpp +88 -0
- data/ext/qrscanner/zxing/core/tests/src/qrcode/VersionTest.h +49 -0
- data/ext/qrscanner/zxing/core/tests/src/qrcode/decoder/DataMaskTest.cpp +134 -0
- data/ext/qrscanner/zxing/core/tests/src/qrcode/decoder/DataMaskTest.h +91 -0
- data/ext/qrscanner/zxing/core/tests/src/qrcode/decoder/ModeTest.cpp +52 -0
- data/ext/qrscanner/zxing/core/tests/src/qrcode/decoder/ModeTest.h +47 -0
- data/ext/qrscanner/zxing/format +2 -0
- data/ext/qrscanner/zxing/magick/src/MagickBitmapSource.cpp +99 -0
- data/ext/qrscanner/zxing/magick/src/MagickBitmapSource.h +49 -0
- data/ext/qrscanner/zxing/magick/src/example.cpp +83 -0
- data/ext/qrscanner/zxing/magick/src/main.cpp +241 -0
- data/ext/qrscanner/zxing/magick/src/qrscanner.cpp +188 -0
- data/ext/qrscanner/zxing/osx.xcodeproj/project.pbxproj +1045 -0
- data/ext/qrscanner/zxing/scons/scons-LICENSE +25 -0
- data/ext/qrscanner/zxing/scons/scons-README +204 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Action.py +1241 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Action.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Builder.py +877 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Builder.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/CacheDir.py +216 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/CacheDir.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Conftest.py +793 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Conftest.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Debug.py +220 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Debug.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Defaults.py +480 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Defaults.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Environment.py +2318 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Environment.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Errors.py +205 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Errors.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Executor.py +633 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Executor.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Job.py +435 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Job.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Memoize.py +244 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Memoize.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Node/Alias.py +152 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Node/Alias.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Node/FS.py +3142 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Node/FS.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Node/Python.py +128 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Node/Python.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Node/__init__.py +1328 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Node/__init__.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Options/BoolOption.py +50 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Options/BoolOption.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Options/EnumOption.py +50 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Options/EnumOption.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Options/ListOption.py +50 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Options/ListOption.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Options/PackageOption.py +50 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Options/PackageOption.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Options/PathOption.py +76 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Options/PathOption.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Options/__init__.py +67 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Options/__init__.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/PathList.py +231 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/PathList.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Platform/__init__.py +241 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Platform/__init__.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Platform/aix.py +69 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Platform/cygwin.py +55 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Platform/darwin.py +46 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Platform/hpux.py +46 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Platform/irix.py +44 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Platform/os2.py +58 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Platform/posix.py +263 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Platform/posix.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Platform/sunos.py +50 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Platform/win32.py +385 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConf.py +1030 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConf.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.py +383 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Scanner/C.py +132 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Scanner/C.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Scanner/D.py +73 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Scanner/D.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Scanner/Dir.py +109 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Scanner/Dir.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Scanner/Fortran.py +316 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Scanner/Fortran.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Scanner/IDL.py +48 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Scanner/LaTeX.py +362 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Scanner/LaTeX.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Scanner/Prog.py +101 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Scanner/Prog.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Scanner/RC.py +55 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Scanner/__init__.py +413 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Scanner/__init__.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Script/Interactive.py +384 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Script/Interactive.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Script/Main.py +1334 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Script/Main.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Script/SConsOptions.py +939 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Script/SConsOptions.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Script/SConscript.py +640 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Script/SConscript.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Script/__init__.py +412 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Script/__init__.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Sig.py +63 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Subst.py +904 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Subst.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Taskmaster.py +1017 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Taskmaster.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/386asm.py +61 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/BitKeeper.py +67 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/BitKeeper.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/CVS.py +73 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/CVS.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/FortranCommon.py +246 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/FortranCommon.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/JavaCommon.py +323 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/JavaCommon.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/MSCommon/__init__.py +56 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/MSCommon/arch.py +61 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/MSCommon/common.py +240 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/MSCommon/netframework.py +82 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/MSCommon/sdk.py +391 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/MSCommon/vc.py +456 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/MSCommon/vs.py +499 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/Perforce.py +103 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/Perforce.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/PharLapCommon.py +137 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/PharLapCommon.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/RCS.py +64 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/RCS.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/SCCS.py +64 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/SCCS.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/Subversion.py +71 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/__init__.py +681 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/__init__.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/aixc++.py +82 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/aixcc.py +74 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/aixf77.py +80 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/aixlink.py +76 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/applelink.py +71 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/ar.py +63 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/ar.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/as.py +78 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/as.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/bcc32.py +81 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/c++.py +99 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/c++.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/cc.py +102 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/cc.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/cvf.py +58 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/default.py +50 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/default.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/dmd.py +223 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/dmd.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/dvi.py +64 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/dvipdf.py +124 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/dvipdf.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/dvips.py +94 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/dvips.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/f77.py +62 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/f77.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/f90.py +62 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/f90.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/f95.py +63 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/f95.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/filesystem.py +98 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/filesystem.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/fortran.py +62 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/fortran.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/g++.py +90 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/g++.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/g77.py +73 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/g77.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/gas.py +53 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/gas.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/gcc.py +80 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/gcc.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/gfortran.py +64 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/gfortran.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/gnulink.py +63 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/gnulink.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/gs.py +81 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/gs.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/hpc++.py +84 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/hpcc.py +53 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/hplink.py +77 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/icc.py +59 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/icl.py +52 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/ifl.py +72 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/ifl.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/ifort.py +88 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/ifort.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/ilink.py +59 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/ilink32.py +60 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/install.py +229 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/install.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/intelc.py +482 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/ipkg.py +67 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/jar.py +110 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/jar.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/javac.py +230 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/javac.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/javah.py +137 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/javah.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/latex.py +79 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/latex.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/lex.py +97 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/lex.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/link.py +121 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/link.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/linkloc.py +112 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/m4.py +63 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/m4.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/masm.py +77 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/midl.py +88 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/mingw.py +158 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/mslib.py +64 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/mslink.py +266 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/mssdk.py +50 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/msvc.py +268 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/msvs.py +1388 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/mwcc.py +207 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/mwld.py +107 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/nasm.py +72 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/packaging/__init__.py +312 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/packaging/ipk.py +185 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/packaging/msi.py +527 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/packaging/rpm.py +365 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/packaging/src_tarbz2.py +43 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/packaging/src_targz.py +43 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/packaging/src_zip.py +43 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/packaging/tarbz2.py +44 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/packaging/targz.py +44 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/packaging/zip.py +44 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/pdf.py +78 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/pdf.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/pdflatex.py +83 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/pdflatex.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/pdftex.py +108 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/pdftex.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/qt.py +336 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/rmic.py +120 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/rmic.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/rpcgen.py +70 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/rpcgen.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/rpm.py +132 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/rpm.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/sgiar.py +68 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/sgic++.py +58 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/sgicc.py +53 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/sgilink.py +63 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/sunar.py +67 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/sunc++.py +142 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/suncc.py +58 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/sunf77.py +63 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/sunf90.py +64 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/sunf95.py +64 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/sunlink.py +77 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/swig.py +182 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/swig.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/tar.py +73 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/tar.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/tex.py +807 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/tex.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/textfile.py +175 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/tlib.py +53 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/wix.py +99 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/wix.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/yacc.py +130 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/yacc.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/zip.py +99 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Tool/zip.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Util.py +1496 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Util.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Variables/BoolVariable.py +89 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Variables/BoolVariable.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Variables/EnumVariable.py +103 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Variables/EnumVariable.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Variables/ListVariable.py +135 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Variables/ListVariable.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Variables/PackageVariable.py +106 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Variables/PackageVariable.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Variables/PathVariable.py +147 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Variables/PathVariable.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Variables/__init__.py +312 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Variables/__init__.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Warnings.py +246 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/Warnings.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/__init__.py +49 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/__init__.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/compat/__init__.py +237 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/compat/__init__.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/compat/_scons_builtins.py +150 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/compat/_scons_builtins.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/compat/_scons_collections.py +45 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/compat/_scons_dbm.py +45 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/compat/_scons_hashlib.py +76 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/compat/_scons_io.py +45 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/compat/_scons_sets.py +563 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/compat/_scons_subprocess.py +1281 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/cpp.py +589 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/cpp.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/dblite.py +251 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/dblite.pyc +0 -0
- data/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/exitfuncs.py +77 -0
- data/ext/qrscanner/zxing/scons/scons-time.py +1544 -0
- data/ext/qrscanner/zxing/scons/scons.py +196 -0
- data/ext/qrscanner/zxing/scons/sconsign.py +513 -0
- data/qrscanner.gemspec +33 -0
- metadata +1023 -0
@@ -0,0 +1,79 @@
|
|
1
|
+
#ifndef __DETECTOR_H__
|
2
|
+
#define __DETECTOR_H__
|
3
|
+
|
4
|
+
/*
|
5
|
+
* Detector.h
|
6
|
+
* zxing
|
7
|
+
*
|
8
|
+
* Created by Luiz Silva on 09/02/2010.
|
9
|
+
* Copyright 2010 ZXing authors All rights reserved.
|
10
|
+
*
|
11
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
12
|
+
* you may not use this file except in compliance with the License.
|
13
|
+
* You may obtain a copy of the License at
|
14
|
+
*
|
15
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
16
|
+
*
|
17
|
+
* Unless required by applicable law or agreed to in writing, software
|
18
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
19
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
20
|
+
* See the License for the specific language governing permissions and
|
21
|
+
* limitations under the License.
|
22
|
+
*/
|
23
|
+
|
24
|
+
|
25
|
+
#include <zxing/common/Counted.h>
|
26
|
+
#include <zxing/common/DetectorResult.h>
|
27
|
+
#include <zxing/common/BitMatrix.h>
|
28
|
+
#include <zxing/common/PerspectiveTransform.h>
|
29
|
+
#include <zxing/datamatrix/detector/MonochromeRectangleDetector.h>
|
30
|
+
|
31
|
+
|
32
|
+
namespace zxing {
|
33
|
+
namespace datamatrix {
|
34
|
+
|
35
|
+
class ResultPointsAndTransitions : public Counted {
|
36
|
+
private:
|
37
|
+
Ref<CornerPoint> to_;
|
38
|
+
Ref<CornerPoint> from_;
|
39
|
+
int transitions_;
|
40
|
+
|
41
|
+
public:
|
42
|
+
ResultPointsAndTransitions();
|
43
|
+
ResultPointsAndTransitions(Ref<CornerPoint> from, Ref<CornerPoint> to, int transitions);
|
44
|
+
Ref<CornerPoint> getFrom();
|
45
|
+
Ref<CornerPoint> getTo();
|
46
|
+
int getTransitions();
|
47
|
+
};
|
48
|
+
|
49
|
+
class Detector : public Counted {
|
50
|
+
private:
|
51
|
+
Ref<BitMatrix> image_;
|
52
|
+
|
53
|
+
protected:
|
54
|
+
Ref<BitMatrix> sampleGrid(Ref<BitMatrix> image, int dimension, Ref<PerspectiveTransform> transform);
|
55
|
+
|
56
|
+
void insertionSort(std::vector<Ref<ResultPointsAndTransitions> >& vector);
|
57
|
+
|
58
|
+
Ref<ResultPointsAndTransitions> transitionsBetween(Ref<CornerPoint> from, Ref<CornerPoint> to);
|
59
|
+
int min(int a, int b) { return a > b ? b : a; };
|
60
|
+
|
61
|
+
public:
|
62
|
+
Ref<BitMatrix> getImage();
|
63
|
+
Detector(Ref<BitMatrix> image);
|
64
|
+
|
65
|
+
virtual Ref<PerspectiveTransform> createTransform(Ref<ResultPoint> topLeft, Ref<ResultPoint> topRight, Ref <
|
66
|
+
ResultPoint > bottomLeft, Ref<ResultPoint> bottomRight, int dimension);
|
67
|
+
|
68
|
+
Ref<DetectorResult> detect();
|
69
|
+
void orderBestPatterns(std::vector<Ref<CornerPoint> > &patterns);
|
70
|
+
float distance(float x1, float x2, float y1, float y2);
|
71
|
+
private:
|
72
|
+
int compare(Ref<ResultPointsAndTransitions> a, Ref<ResultPointsAndTransitions> b);
|
73
|
+
float crossProductZ(Ref<ResultPoint> pointA, Ref<ResultPoint> pointB, Ref<ResultPoint> pointC);
|
74
|
+
};
|
75
|
+
|
76
|
+
}
|
77
|
+
}
|
78
|
+
|
79
|
+
#endif // __DETECTOR_H__
|
@@ -0,0 +1,172 @@
|
|
1
|
+
/*
|
2
|
+
* MonochromeRectangleDetector.cpp
|
3
|
+
* zxing
|
4
|
+
*
|
5
|
+
* Created by Luiz Silva on 09/02/2010.
|
6
|
+
* Copyright 2010 ZXing authors All rights reserved.
|
7
|
+
*
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
* you may not use this file except in compliance with the License.
|
10
|
+
* You may obtain a copy of the License at
|
11
|
+
*
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
*
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
* See the License for the specific language governing permissions and
|
18
|
+
* limitations under the License.
|
19
|
+
*/
|
20
|
+
|
21
|
+
#include <zxing/ReaderException.h>
|
22
|
+
#include <zxing/datamatrix/detector/MonochromeRectangleDetector.h>
|
23
|
+
#include <sstream>
|
24
|
+
|
25
|
+
namespace zxing {
|
26
|
+
namespace datamatrix {
|
27
|
+
|
28
|
+
std::vector<Ref<CornerPoint> > MonochromeRectangleDetector::detect() {
|
29
|
+
int height = image_->getHeight();
|
30
|
+
int width = image_->getWidth();
|
31
|
+
int halfHeight = height >> 1;
|
32
|
+
int halfWidth = width >> 1;
|
33
|
+
int deltaY = max(1, height / (MAX_MODULES << 3));
|
34
|
+
int deltaX = max(1, width / (MAX_MODULES << 3));
|
35
|
+
|
36
|
+
int top = 0;
|
37
|
+
int bottom = height;
|
38
|
+
int left = 0;
|
39
|
+
int right = width;
|
40
|
+
Ref<CornerPoint> pointA(findCornerFromCenter(halfWidth, 0, left, right,
|
41
|
+
halfHeight, -deltaY, top, bottom, halfWidth >> 1));
|
42
|
+
top = (int) pointA->getY() - 1;
|
43
|
+
Ref<CornerPoint> pointB(findCornerFromCenter(halfWidth, -deltaX, left, right,
|
44
|
+
halfHeight, 0, top, bottom, halfHeight >> 1));
|
45
|
+
left = (int) pointB->getX() - 1;
|
46
|
+
Ref<CornerPoint> pointC(findCornerFromCenter(halfWidth, deltaX, left, right,
|
47
|
+
halfHeight, 0, top, bottom, halfHeight >> 1));
|
48
|
+
right = (int) pointC->getX() + 1;
|
49
|
+
Ref<CornerPoint> pointD(findCornerFromCenter(halfWidth, 0, left, right,
|
50
|
+
halfHeight, deltaY, top, bottom, halfWidth >> 1));
|
51
|
+
bottom = (int) pointD->getY() + 1;
|
52
|
+
|
53
|
+
// Go try to find point A again with better information -- might have been off at first.
|
54
|
+
pointA.reset(findCornerFromCenter(halfWidth, 0, left, right,
|
55
|
+
halfHeight, -deltaY, top, bottom, halfWidth >> 2));
|
56
|
+
std::vector<Ref<CornerPoint> > corners(4);
|
57
|
+
|
58
|
+
corners[0].reset(pointA);
|
59
|
+
corners[1].reset(pointB);
|
60
|
+
corners[2].reset(pointC);
|
61
|
+
corners[3].reset(pointD);
|
62
|
+
return corners;
|
63
|
+
}
|
64
|
+
|
65
|
+
Ref<CornerPoint> MonochromeRectangleDetector::findCornerFromCenter(int centerX, int deltaX, int left, int right,
|
66
|
+
int centerY, int deltaY, int top, int bottom, int maxWhiteRun) {
|
67
|
+
Ref<TwoInts> lastRange(NULL);
|
68
|
+
for (int y = centerY, x = centerX;
|
69
|
+
y < bottom && y >= top && x < right && x >= left;
|
70
|
+
y += deltaY, x += deltaX) {
|
71
|
+
Ref<TwoInts> range(NULL);
|
72
|
+
if (deltaX == 0) {
|
73
|
+
// horizontal slices, up and down
|
74
|
+
range = blackWhiteRange(y, maxWhiteRun, left, right, true);
|
75
|
+
} else {
|
76
|
+
// vertical slices, left and right
|
77
|
+
range = blackWhiteRange(x, maxWhiteRun, top, bottom, false);
|
78
|
+
}
|
79
|
+
if (range == NULL) {
|
80
|
+
if (lastRange == NULL) {
|
81
|
+
throw ReaderException("Couldn't find corners (lastRange = NULL) ");
|
82
|
+
} else {
|
83
|
+
// lastRange was found
|
84
|
+
if (deltaX == 0) {
|
85
|
+
int lastY = y - deltaY;
|
86
|
+
if (lastRange->start < centerX) {
|
87
|
+
if (lastRange->end > centerX) {
|
88
|
+
// straddle, choose one or the other based on direction
|
89
|
+
Ref<CornerPoint> result(new CornerPoint(deltaY > 0 ? lastRange->start : lastRange->end, lastY));
|
90
|
+
return result;
|
91
|
+
}
|
92
|
+
Ref<CornerPoint> result(new CornerPoint(lastRange->start, lastY));
|
93
|
+
return result;
|
94
|
+
} else {
|
95
|
+
Ref<CornerPoint> result(new CornerPoint(lastRange->end, lastY));
|
96
|
+
return result;
|
97
|
+
}
|
98
|
+
} else {
|
99
|
+
int lastX = x - deltaX;
|
100
|
+
if (lastRange->start < centerY) {
|
101
|
+
if (lastRange->end > centerY) {
|
102
|
+
Ref<CornerPoint> result(new CornerPoint(lastX, deltaX < 0 ? lastRange->start : lastRange->end));
|
103
|
+
return result;
|
104
|
+
}
|
105
|
+
Ref<CornerPoint> result(new CornerPoint(lastX, lastRange->start));
|
106
|
+
return result;
|
107
|
+
} else {
|
108
|
+
Ref<CornerPoint> result(new CornerPoint(lastX, lastRange->end));
|
109
|
+
return result;
|
110
|
+
}
|
111
|
+
}
|
112
|
+
}
|
113
|
+
}
|
114
|
+
lastRange = range;
|
115
|
+
}
|
116
|
+
throw ReaderException("Couldn't find corners");
|
117
|
+
}
|
118
|
+
|
119
|
+
Ref<TwoInts> MonochromeRectangleDetector::blackWhiteRange(int fixedDimension, int maxWhiteRun, int minDim, int maxDim,
|
120
|
+
bool horizontal) {
|
121
|
+
|
122
|
+
int center = (minDim + maxDim) >> 1;
|
123
|
+
|
124
|
+
// Scan left/up first
|
125
|
+
int start = center;
|
126
|
+
while (start >= minDim) {
|
127
|
+
if (horizontal ? image_->get(start, fixedDimension) : image_->get(fixedDimension, start)) {
|
128
|
+
start--;
|
129
|
+
} else {
|
130
|
+
int whiteRunStart = start;
|
131
|
+
do {
|
132
|
+
start--;
|
133
|
+
} while (start >= minDim && !(horizontal ? image_->get(start, fixedDimension) :
|
134
|
+
image_->get(fixedDimension, start)));
|
135
|
+
int whiteRunSize = whiteRunStart - start;
|
136
|
+
if (start < minDim || whiteRunSize > maxWhiteRun) {
|
137
|
+
start = whiteRunStart;
|
138
|
+
break;
|
139
|
+
}
|
140
|
+
}
|
141
|
+
}
|
142
|
+
start++;
|
143
|
+
|
144
|
+
// Then try right/down
|
145
|
+
int end = center;
|
146
|
+
while (end < maxDim) {
|
147
|
+
if (horizontal ? image_->get(end, fixedDimension) : image_->get(fixedDimension, end)) {
|
148
|
+
end++;
|
149
|
+
} else {
|
150
|
+
int whiteRunStart = end;
|
151
|
+
do {
|
152
|
+
end++;
|
153
|
+
} while (end < maxDim && !(horizontal ? image_->get(end, fixedDimension) :
|
154
|
+
image_->get(fixedDimension, end)));
|
155
|
+
int whiteRunSize = end - whiteRunStart;
|
156
|
+
if (end >= maxDim || whiteRunSize > maxWhiteRun) {
|
157
|
+
end = whiteRunStart;
|
158
|
+
break;
|
159
|
+
}
|
160
|
+
}
|
161
|
+
}
|
162
|
+
end--;
|
163
|
+
Ref<TwoInts> result(NULL);
|
164
|
+
if (end > start) {
|
165
|
+
result = new TwoInts;
|
166
|
+
result->start = start;
|
167
|
+
result->end = end;
|
168
|
+
}
|
169
|
+
return result;
|
170
|
+
}
|
171
|
+
}
|
172
|
+
}
|
@@ -0,0 +1,61 @@
|
|
1
|
+
#ifndef __MONOCHROMERECTANGLEDETECTOR_H__
|
2
|
+
#define __MONOCHROMERECTANGLEDETECTOR_H__
|
3
|
+
|
4
|
+
/*
|
5
|
+
* MonochromeRectangleDetector.h
|
6
|
+
* zxing
|
7
|
+
*
|
8
|
+
* Created by Luiz Silva on 09/02/2010.
|
9
|
+
* Copyright 2010 ZXing authors All rights reserved.
|
10
|
+
*
|
11
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
12
|
+
* you may not use this file except in compliance with the License.
|
13
|
+
* You may obtain a copy of the License at
|
14
|
+
*
|
15
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
16
|
+
*
|
17
|
+
* Unless required by applicable law or agreed to in writing, software
|
18
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
19
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
20
|
+
* See the License for the specific language governing permissions and
|
21
|
+
* limitations under the License.
|
22
|
+
*/
|
23
|
+
|
24
|
+
#include <vector>
|
25
|
+
#include <zxing/ReaderException.h>
|
26
|
+
#include <zxing/ResultPoint.h>
|
27
|
+
#include <zxing/common/BitMatrix.h>
|
28
|
+
#include <zxing/common/Counted.h>
|
29
|
+
#include <zxing/datamatrix/detector/CornerPoint.h>
|
30
|
+
|
31
|
+
namespace zxing {
|
32
|
+
namespace datamatrix {
|
33
|
+
|
34
|
+
struct TwoInts: public Counted {
|
35
|
+
int start;
|
36
|
+
int end;
|
37
|
+
};
|
38
|
+
|
39
|
+
class MonochromeRectangleDetector : public Counted {
|
40
|
+
private:
|
41
|
+
static const int MAX_MODULES = 32;
|
42
|
+
Ref<BitMatrix> image_;
|
43
|
+
|
44
|
+
public:
|
45
|
+
MonochromeRectangleDetector(Ref<BitMatrix> image) : image_(image) { };
|
46
|
+
|
47
|
+
std::vector<Ref<CornerPoint> > detect();
|
48
|
+
|
49
|
+
private:
|
50
|
+
Ref<CornerPoint> findCornerFromCenter(int centerX, int deltaX, int left, int right,
|
51
|
+
int centerY, int deltaY, int top, int bottom, int maxWhiteRun);
|
52
|
+
|
53
|
+
Ref<TwoInts> blackWhiteRange(int fixedDimension, int maxWhiteRun, int minDim, int maxDim,
|
54
|
+
bool horizontal);
|
55
|
+
|
56
|
+
int max(int a, float b) { return (float) a > b ? a : (int) b;};
|
57
|
+
};
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
#endif // __MONOCHROMERECTANGLEDETECTOR_H__
|
@@ -0,0 +1,490 @@
|
|
1
|
+
/*
|
2
|
+
* Code128Reader.cpp
|
3
|
+
* ZXing
|
4
|
+
*
|
5
|
+
* Copyright 2010 ZXing authors All rights reserved.
|
6
|
+
*
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
* you may not use this file except in compliance with the License.
|
9
|
+
* You may obtain a copy of the License at
|
10
|
+
*
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
*
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
* See the License for the specific language governing permissions and
|
17
|
+
* limitations under the License.
|
18
|
+
*/
|
19
|
+
|
20
|
+
#include "Code128Reader.h"
|
21
|
+
#include <zxing/oned/OneDResultPoint.h>
|
22
|
+
#include <zxing/common/Array.h>
|
23
|
+
#include <zxing/ReaderException.h>
|
24
|
+
#include <math.h>
|
25
|
+
#include <string.h>
|
26
|
+
#include <sstream>
|
27
|
+
|
28
|
+
namespace zxing {
|
29
|
+
namespace oned {
|
30
|
+
|
31
|
+
const int CODE_PATTERNS_LENGTH = 107;
|
32
|
+
const int countersLength = 6;
|
33
|
+
static const int CODE_PATTERNS[CODE_PATTERNS_LENGTH][countersLength] = {
|
34
|
+
{2, 1, 2, 2, 2, 2}, /* 0 */
|
35
|
+
{2, 2, 2, 1, 2, 2},
|
36
|
+
{2, 2, 2, 2, 2, 1},
|
37
|
+
{1, 2, 1, 2, 2, 3},
|
38
|
+
{1, 2, 1, 3, 2, 2},
|
39
|
+
{1, 3, 1, 2, 2, 2}, /* 5 */
|
40
|
+
{1, 2, 2, 2, 1, 3},
|
41
|
+
{1, 2, 2, 3, 1, 2},
|
42
|
+
{1, 3, 2, 2, 1, 2},
|
43
|
+
{2, 2, 1, 2, 1, 3},
|
44
|
+
{2, 2, 1, 3, 1, 2}, /* 10 */
|
45
|
+
{2, 3, 1, 2, 1, 2},
|
46
|
+
{1, 1, 2, 2, 3, 2},
|
47
|
+
{1, 2, 2, 1, 3, 2},
|
48
|
+
{1, 2, 2, 2, 3, 1},
|
49
|
+
{1, 1, 3, 2, 2, 2}, /* 15 */
|
50
|
+
{1, 2, 3, 1, 2, 2},
|
51
|
+
{1, 2, 3, 2, 2, 1},
|
52
|
+
{2, 2, 3, 2, 1, 1},
|
53
|
+
{2, 2, 1, 1, 3, 2},
|
54
|
+
{2, 2, 1, 2, 3, 1}, /* 20 */
|
55
|
+
{2, 1, 3, 2, 1, 2},
|
56
|
+
{2, 2, 3, 1, 1, 2},
|
57
|
+
{3, 1, 2, 1, 3, 1},
|
58
|
+
{3, 1, 1, 2, 2, 2},
|
59
|
+
{3, 2, 1, 1, 2, 2}, /* 25 */
|
60
|
+
{3, 2, 1, 2, 2, 1},
|
61
|
+
{3, 1, 2, 2, 1, 2},
|
62
|
+
{3, 2, 2, 1, 1, 2},
|
63
|
+
{3, 2, 2, 2, 1, 1},
|
64
|
+
{2, 1, 2, 1, 2, 3}, /* 30 */
|
65
|
+
{2, 1, 2, 3, 2, 1},
|
66
|
+
{2, 3, 2, 1, 2, 1},
|
67
|
+
{1, 1, 1, 3, 2, 3},
|
68
|
+
{1, 3, 1, 1, 2, 3},
|
69
|
+
{1, 3, 1, 3, 2, 1}, /* 35 */
|
70
|
+
{1, 1, 2, 3, 1, 3},
|
71
|
+
{1, 3, 2, 1, 1, 3},
|
72
|
+
{1, 3, 2, 3, 1, 1},
|
73
|
+
{2, 1, 1, 3, 1, 3},
|
74
|
+
{2, 3, 1, 1, 1, 3}, /* 40 */
|
75
|
+
{2, 3, 1, 3, 1, 1},
|
76
|
+
{1, 1, 2, 1, 3, 3},
|
77
|
+
{1, 1, 2, 3, 3, 1},
|
78
|
+
{1, 3, 2, 1, 3, 1},
|
79
|
+
{1, 1, 3, 1, 2, 3}, /* 45 */
|
80
|
+
{1, 1, 3, 3, 2, 1},
|
81
|
+
{1, 3, 3, 1, 2, 1},
|
82
|
+
{3, 1, 3, 1, 2, 1},
|
83
|
+
{2, 1, 1, 3, 3, 1},
|
84
|
+
{2, 3, 1, 1, 3, 1}, /* 50 */
|
85
|
+
{2, 1, 3, 1, 1, 3},
|
86
|
+
{2, 1, 3, 3, 1, 1},
|
87
|
+
{2, 1, 3, 1, 3, 1},
|
88
|
+
{3, 1, 1, 1, 2, 3},
|
89
|
+
{3, 1, 1, 3, 2, 1}, /* 55 */
|
90
|
+
{3, 3, 1, 1, 2, 1},
|
91
|
+
{3, 1, 2, 1, 1, 3},
|
92
|
+
{3, 1, 2, 3, 1, 1},
|
93
|
+
{3, 3, 2, 1, 1, 1},
|
94
|
+
{3, 1, 4, 1, 1, 1}, /* 60 */
|
95
|
+
{2, 2, 1, 4, 1, 1},
|
96
|
+
{4, 3, 1, 1, 1, 1},
|
97
|
+
{1, 1, 1, 2, 2, 4},
|
98
|
+
{1, 1, 1, 4, 2, 2},
|
99
|
+
{1, 2, 1, 1, 2, 4}, /* 65 */
|
100
|
+
{1, 2, 1, 4, 2, 1},
|
101
|
+
{1, 4, 1, 1, 2, 2},
|
102
|
+
{1, 4, 1, 2, 2, 1},
|
103
|
+
{1, 1, 2, 2, 1, 4},
|
104
|
+
{1, 1, 2, 4, 1, 2}, /* 70 */
|
105
|
+
{1, 2, 2, 1, 1, 4},
|
106
|
+
{1, 2, 2, 4, 1, 1},
|
107
|
+
{1, 4, 2, 1, 1, 2},
|
108
|
+
{1, 4, 2, 2, 1, 1},
|
109
|
+
{2, 4, 1, 2, 1, 1}, /* 75 */
|
110
|
+
{2, 2, 1, 1, 1, 4},
|
111
|
+
{4, 1, 3, 1, 1, 1},
|
112
|
+
{2, 4, 1, 1, 1, 2},
|
113
|
+
{1, 3, 4, 1, 1, 1},
|
114
|
+
{1, 1, 1, 2, 4, 2}, /* 80 */
|
115
|
+
{1, 2, 1, 1, 4, 2},
|
116
|
+
{1, 2, 1, 2, 4, 1},
|
117
|
+
{1, 1, 4, 2, 1, 2},
|
118
|
+
{1, 2, 4, 1, 1, 2},
|
119
|
+
{1, 2, 4, 2, 1, 1}, /* 85 */
|
120
|
+
{4, 1, 1, 2, 1, 2},
|
121
|
+
{4, 2, 1, 1, 1, 2},
|
122
|
+
{4, 2, 1, 2, 1, 1},
|
123
|
+
{2, 1, 2, 1, 4, 1},
|
124
|
+
{2, 1, 4, 1, 2, 1}, /* 90 */
|
125
|
+
{4, 1, 2, 1, 2, 1},
|
126
|
+
{1, 1, 1, 1, 4, 3},
|
127
|
+
{1, 1, 1, 3, 4, 1},
|
128
|
+
{1, 3, 1, 1, 4, 1},
|
129
|
+
{1, 1, 4, 1, 1, 3}, /* 95 */
|
130
|
+
{1, 1, 4, 3, 1, 1},
|
131
|
+
{4, 1, 1, 1, 1, 3},
|
132
|
+
{4, 1, 1, 3, 1, 1},
|
133
|
+
{1, 1, 3, 1, 4, 1},
|
134
|
+
{1, 1, 4, 1, 3, 1}, /* 100 */
|
135
|
+
{3, 1, 1, 1, 4, 1},
|
136
|
+
{4, 1, 1, 1, 3, 1},
|
137
|
+
{2, 1, 1, 4, 1, 2},
|
138
|
+
{2, 1, 1, 2, 1, 4},
|
139
|
+
{2, 1, 1, 2, 3, 2}, /* 105 */
|
140
|
+
{2, 3, 3, 1, 1, 1}
|
141
|
+
};
|
142
|
+
|
143
|
+
|
144
|
+
Code128Reader::Code128Reader(){
|
145
|
+
}
|
146
|
+
|
147
|
+
int* Code128Reader::findStartPattern(Ref<BitArray> row){
|
148
|
+
int width = row->getSize();
|
149
|
+
int rowOffset = 0;
|
150
|
+
while (rowOffset < width) {
|
151
|
+
if (row->get(rowOffset)) {
|
152
|
+
break;
|
153
|
+
}
|
154
|
+
rowOffset++;
|
155
|
+
}
|
156
|
+
|
157
|
+
int counterPosition = 0;
|
158
|
+
int counters[countersLength] = {0,0,0,0,0,0};
|
159
|
+
int patternStart = rowOffset;
|
160
|
+
bool isWhite = false;
|
161
|
+
int patternLength = sizeof(counters) / sizeof(int);
|
162
|
+
|
163
|
+
for (int i = rowOffset; i < width; i++) {
|
164
|
+
bool pixel = row->get(i);
|
165
|
+
if (pixel ^ isWhite) {
|
166
|
+
counters[counterPosition]++;
|
167
|
+
} else {
|
168
|
+
if (counterPosition == patternLength - 1) {
|
169
|
+
unsigned int bestVariance = MAX_AVG_VARIANCE;
|
170
|
+
int bestMatch = -1;
|
171
|
+
for (int startCode = CODE_START_A; startCode <= CODE_START_C; startCode++) {
|
172
|
+
unsigned int variance = patternMatchVariance(counters, sizeof(counters) / sizeof(int),
|
173
|
+
CODE_PATTERNS[startCode], MAX_INDIVIDUAL_VARIANCE);
|
174
|
+
if (variance < bestVariance) {
|
175
|
+
bestVariance = variance;
|
176
|
+
bestMatch = startCode;
|
177
|
+
}
|
178
|
+
}
|
179
|
+
if (bestMatch >= 0) {
|
180
|
+
// Look for whitespace before start pattern, >= 50% of width of start pattern
|
181
|
+
if (row->isRange(fmaxl(0, patternStart - (i - patternStart) / 2), patternStart,
|
182
|
+
false)) {
|
183
|
+
int* resultValue = new int[3];
|
184
|
+
resultValue[0] = patternStart;
|
185
|
+
resultValue[1] = i;
|
186
|
+
resultValue[2] = bestMatch;
|
187
|
+
return resultValue;
|
188
|
+
}
|
189
|
+
}
|
190
|
+
patternStart += counters[0] + counters[1];
|
191
|
+
for (int y = 2; y < patternLength; y++) {
|
192
|
+
counters[y - 2] = counters[y];
|
193
|
+
}
|
194
|
+
counters[patternLength - 2] = 0;
|
195
|
+
counters[patternLength - 1] = 0;
|
196
|
+
counterPosition--;
|
197
|
+
} else {
|
198
|
+
counterPosition++;
|
199
|
+
}
|
200
|
+
counters[counterPosition] = 1;
|
201
|
+
isWhite = !isWhite;
|
202
|
+
}
|
203
|
+
}
|
204
|
+
throw ReaderException("");
|
205
|
+
}
|
206
|
+
|
207
|
+
int Code128Reader::decodeCode(Ref<BitArray> row, int counters[], int countersCount,
|
208
|
+
int rowOffset) {
|
209
|
+
if (!recordPattern(row, rowOffset, counters, countersCount)) {
|
210
|
+
throw ReaderException("");
|
211
|
+
}
|
212
|
+
unsigned int bestVariance = MAX_AVG_VARIANCE; // worst variance we'll accept
|
213
|
+
int bestMatch = -1;
|
214
|
+
for (int d = 0; d < CODE_PATTERNS_LENGTH; d++) {
|
215
|
+
int pattern[countersLength];
|
216
|
+
|
217
|
+
for(int ind = 0; ind< countersLength; ind++){
|
218
|
+
pattern[ind] = CODE_PATTERNS[d][ind];
|
219
|
+
}
|
220
|
+
// memcpy(pattern, CODE_PATTERNS[d], countersLength);
|
221
|
+
unsigned int variance = patternMatchVariance(counters, countersCount, pattern,
|
222
|
+
MAX_INDIVIDUAL_VARIANCE);
|
223
|
+
if (variance < bestVariance) {
|
224
|
+
bestVariance = variance;
|
225
|
+
bestMatch = d;
|
226
|
+
}
|
227
|
+
}
|
228
|
+
// TODO We're overlooking the fact that the STOP pattern has 7 values, not 6.
|
229
|
+
if (bestMatch >= 0) {
|
230
|
+
return bestMatch;
|
231
|
+
} else {
|
232
|
+
throw ReaderException("");
|
233
|
+
}
|
234
|
+
}
|
235
|
+
|
236
|
+
Ref<Result> Code128Reader::decodeRow(int rowNumber, Ref<BitArray> row) {
|
237
|
+
int* startPatternInfo = NULL;
|
238
|
+
try {
|
239
|
+
startPatternInfo = findStartPattern(row);
|
240
|
+
int startCode = startPatternInfo[2];
|
241
|
+
int codeSet;
|
242
|
+
switch (startCode) {
|
243
|
+
case CODE_START_A:
|
244
|
+
codeSet = CODE_CODE_A;
|
245
|
+
break;
|
246
|
+
case CODE_START_B:
|
247
|
+
codeSet = CODE_CODE_B;
|
248
|
+
break;
|
249
|
+
case CODE_START_C:
|
250
|
+
codeSet = CODE_CODE_C;
|
251
|
+
break;
|
252
|
+
default:
|
253
|
+
throw ReaderException("");
|
254
|
+
}
|
255
|
+
|
256
|
+
bool done = false;
|
257
|
+
bool isNextShifted = false;
|
258
|
+
|
259
|
+
std::string tmpResultString;
|
260
|
+
std::stringstream tmpResultSStr; // used if its Code 128C
|
261
|
+
|
262
|
+
int lastStart = startPatternInfo[0];
|
263
|
+
int nextStart = startPatternInfo[1];
|
264
|
+
int counters[countersLength] = {0,0,0,0,0,0};
|
265
|
+
|
266
|
+
int lastCode = 0;
|
267
|
+
int code = 0;
|
268
|
+
int checksumTotal = startCode;
|
269
|
+
int multiplier = 0;
|
270
|
+
bool lastCharacterWasPrintable = true;
|
271
|
+
|
272
|
+
while (!done) {
|
273
|
+
bool unshift = isNextShifted;
|
274
|
+
isNextShifted = false;
|
275
|
+
|
276
|
+
// Save off last code
|
277
|
+
lastCode = code;
|
278
|
+
|
279
|
+
// Decode another code from image
|
280
|
+
try {
|
281
|
+
code = decodeCode(row, counters, sizeof(counters)/sizeof(int), nextStart);
|
282
|
+
} catch (ReaderException re) {
|
283
|
+
throw re;
|
284
|
+
}
|
285
|
+
|
286
|
+
// Remember whether the last code was printable or not (excluding CODE_STOP)
|
287
|
+
if (code != CODE_STOP) {
|
288
|
+
lastCharacterWasPrintable = true;
|
289
|
+
}
|
290
|
+
|
291
|
+
// Add to checksum computation (if not CODE_STOP of course)
|
292
|
+
if (code != CODE_STOP) {
|
293
|
+
multiplier++;
|
294
|
+
checksumTotal += multiplier * code;
|
295
|
+
}
|
296
|
+
|
297
|
+
// Advance to where the next code will to start
|
298
|
+
lastStart = nextStart;
|
299
|
+
int _countersLength = sizeof(counters) / sizeof(int);
|
300
|
+
for (int i = 0; i < _countersLength; i++) {
|
301
|
+
nextStart += counters[i];
|
302
|
+
}
|
303
|
+
|
304
|
+
// Take care of illegal start codes
|
305
|
+
switch (code) {
|
306
|
+
case CODE_START_A:
|
307
|
+
case CODE_START_B:
|
308
|
+
case CODE_START_C:
|
309
|
+
throw ReaderException("");
|
310
|
+
}
|
311
|
+
|
312
|
+
switch (codeSet) {
|
313
|
+
|
314
|
+
case CODE_CODE_A:
|
315
|
+
if (code < 64) {
|
316
|
+
tmpResultString.append(1, (char) (' ' + code));
|
317
|
+
} else if (code < 96) {
|
318
|
+
tmpResultString.append(1, (char) (code - 64));
|
319
|
+
} else {
|
320
|
+
// Don't let CODE_STOP, which always appears, affect whether whether we think the
|
321
|
+
// last code was printable or not.
|
322
|
+
if (code != CODE_STOP) {
|
323
|
+
lastCharacterWasPrintable = false;
|
324
|
+
}
|
325
|
+
switch (code) {
|
326
|
+
case CODE_FNC_1:
|
327
|
+
case CODE_FNC_2:
|
328
|
+
case CODE_FNC_3:
|
329
|
+
case CODE_FNC_4_A:
|
330
|
+
// do nothing?
|
331
|
+
break;
|
332
|
+
case CODE_SHIFT:
|
333
|
+
isNextShifted = true;
|
334
|
+
codeSet = CODE_CODE_B;
|
335
|
+
break;
|
336
|
+
case CODE_CODE_B:
|
337
|
+
codeSet = CODE_CODE_B;
|
338
|
+
break;
|
339
|
+
case CODE_CODE_C:
|
340
|
+
codeSet = CODE_CODE_C;
|
341
|
+
break;
|
342
|
+
case CODE_STOP:
|
343
|
+
done = true;
|
344
|
+
break;
|
345
|
+
}
|
346
|
+
}
|
347
|
+
break;
|
348
|
+
case CODE_CODE_B:
|
349
|
+
if (code < 96) {
|
350
|
+
tmpResultString.append(1, (char) (' ' + code));
|
351
|
+
} else {
|
352
|
+
if (code != CODE_STOP) {
|
353
|
+
lastCharacterWasPrintable = false;
|
354
|
+
}
|
355
|
+
switch (code) {
|
356
|
+
case CODE_FNC_1:
|
357
|
+
case CODE_FNC_2:
|
358
|
+
case CODE_FNC_3:
|
359
|
+
case CODE_FNC_4_B:
|
360
|
+
// do nothing?
|
361
|
+
break;
|
362
|
+
case CODE_SHIFT:
|
363
|
+
isNextShifted = true;
|
364
|
+
codeSet = CODE_CODE_C;
|
365
|
+
break;
|
366
|
+
case CODE_CODE_A:
|
367
|
+
codeSet = CODE_CODE_A;
|
368
|
+
break;
|
369
|
+
case CODE_CODE_C:
|
370
|
+
codeSet = CODE_CODE_C;
|
371
|
+
break;
|
372
|
+
case CODE_STOP:
|
373
|
+
done = true;
|
374
|
+
break;
|
375
|
+
}
|
376
|
+
}
|
377
|
+
break;
|
378
|
+
case CODE_CODE_C:
|
379
|
+
// the code read in this case is the number encoded directly
|
380
|
+
if (code < 100) {
|
381
|
+
if (code < 10)
|
382
|
+
tmpResultSStr << '0';
|
383
|
+
tmpResultSStr << code;
|
384
|
+
} else {
|
385
|
+
if (code != CODE_STOP) {
|
386
|
+
lastCharacterWasPrintable = false;
|
387
|
+
}
|
388
|
+
switch (code) {
|
389
|
+
case CODE_FNC_1:
|
390
|
+
// do nothing?
|
391
|
+
break;
|
392
|
+
case CODE_CODE_A:
|
393
|
+
codeSet = CODE_CODE_A;
|
394
|
+
break;
|
395
|
+
case CODE_CODE_B:
|
396
|
+
codeSet = CODE_CODE_B;
|
397
|
+
break;
|
398
|
+
case CODE_STOP:
|
399
|
+
done = true;
|
400
|
+
break;
|
401
|
+
}
|
402
|
+
}
|
403
|
+
break;
|
404
|
+
}
|
405
|
+
|
406
|
+
// Unshift back to another code set if we were shifted
|
407
|
+
if (unshift) {
|
408
|
+
switch (codeSet) {
|
409
|
+
case CODE_CODE_A:
|
410
|
+
codeSet = CODE_CODE_C;
|
411
|
+
break;
|
412
|
+
case CODE_CODE_B:
|
413
|
+
codeSet = CODE_CODE_A;
|
414
|
+
break;
|
415
|
+
case CODE_CODE_C:
|
416
|
+
codeSet = CODE_CODE_B;
|
417
|
+
break;
|
418
|
+
}
|
419
|
+
}
|
420
|
+
|
421
|
+
}
|
422
|
+
|
423
|
+
// Check for ample whitespace following pattern, but, to do this we first need to remember that
|
424
|
+
// we fudged decoding CODE_STOP since it actually has 7 bars, not 6. There is a black bar left
|
425
|
+
// to read off. Would be slightly better to properly read. Here we just skip it:
|
426
|
+
int width = row->getSize();
|
427
|
+
while (nextStart < width && row->get(nextStart)) {
|
428
|
+
nextStart++;
|
429
|
+
}
|
430
|
+
if (!row->isRange(nextStart, fminl(width, nextStart + (nextStart - lastStart) / 2), false)) {
|
431
|
+
throw ReaderException("");
|
432
|
+
}
|
433
|
+
|
434
|
+
// Pull out from sum the value of the penultimate check code
|
435
|
+
checksumTotal -= multiplier * lastCode;
|
436
|
+
// lastCode is the checksum then:
|
437
|
+
if (checksumTotal % 103 != lastCode) {
|
438
|
+
throw ReaderException("");
|
439
|
+
}
|
440
|
+
|
441
|
+
if (codeSet == CODE_CODE_C)
|
442
|
+
tmpResultString.append(tmpResultSStr.str());
|
443
|
+
|
444
|
+
// Need to pull out the check digits from string
|
445
|
+
int resultLength = tmpResultString.length();
|
446
|
+
// Only bother if the result had at least one character, and if the checksum digit happened to
|
447
|
+
// be a printable character. If it was just interpreted as a control code, nothing to remove.
|
448
|
+
if (resultLength > 0 && lastCharacterWasPrintable) {
|
449
|
+
if (codeSet == CODE_CODE_C) {
|
450
|
+
tmpResultString.erase(resultLength - 2, resultLength);
|
451
|
+
} else {
|
452
|
+
tmpResultString.erase(resultLength - 1, resultLength);
|
453
|
+
}
|
454
|
+
}
|
455
|
+
|
456
|
+
Ref<String> resultString(new String(tmpResultString));
|
457
|
+
if (tmpResultString.length() == 0) {
|
458
|
+
// Almost surely a false positive
|
459
|
+
throw ReaderException("");
|
460
|
+
}
|
461
|
+
|
462
|
+
float left = (float) (startPatternInfo[1] + startPatternInfo[0]) / 2.0f;
|
463
|
+
float right = (float) (nextStart + lastStart) / 2.0f;
|
464
|
+
|
465
|
+
std::vector< Ref<ResultPoint> > resultPoints(2);
|
466
|
+
Ref<OneDResultPoint> resultPoint1(new OneDResultPoint(left, (float) rowNumber));
|
467
|
+
Ref<OneDResultPoint> resultPoint2(new OneDResultPoint(right, (float) rowNumber));
|
468
|
+
resultPoints[0] = resultPoint1;
|
469
|
+
resultPoints[1] = resultPoint2;
|
470
|
+
|
471
|
+
delete [] startPatternInfo;
|
472
|
+
ArrayRef<unsigned char> resultBytes(1);
|
473
|
+
return Ref<Result>(new Result(resultString, resultBytes, resultPoints,
|
474
|
+
BarcodeFormat_CODE_128));
|
475
|
+
} catch (ReaderException const& re) {
|
476
|
+
delete [] startPatternInfo;
|
477
|
+
return Ref<Result>();
|
478
|
+
}
|
479
|
+
}
|
480
|
+
|
481
|
+
void Code128Reader::append(char* s, char c){
|
482
|
+
int len = strlen(s);
|
483
|
+
s[len] = c;
|
484
|
+
s[len + 1] = '\0';
|
485
|
+
}
|
486
|
+
|
487
|
+
Code128Reader::~Code128Reader(){
|
488
|
+
}
|
489
|
+
}
|
490
|
+
}
|