Commit graph

169 commits

Author SHA1 Message Date
flyashi ca1cf153d6 GreyscaleRotatedLuminanceSource: implemented getMatrix()
BitMatrix: implemented getRow


git-svn-id: https://zxing.googlecode.com/svn/trunk@1551 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-08-20 20:24:20 +00:00
smparkes@smparkes.net 124ef03ca9 Allow a few build-time arguments to the C++ build
Add DEBUG and PIC flags to scons so you can now build without debug, e.g.,
  scons DEBUG=false lib
or with -fPIC forced, e.g,.
  scons PIC=true lib

Defaults haven't changed.


git-svn-id: https://zxing.googlecode.com/svn/trunk@1550 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-08-20 18:46:05 +00:00
smparkes@smparkes.net dd1336d0cf Tweak svn/git ignores
Add OS X libzxing.a project
Include a copy of scons-local for cpp


git-svn-id: https://zxing.googlecode.com/svn/trunk@1549 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-08-20 00:41:26 +00:00
dswitkin@google.com f9bc448926 Fixed a bug I introduced while removing exceptions, which caused the
x coordinate of 1D barcodes to always be flipped, as if they had been
read upside down.


git-svn-id: https://zxing.googlecode.com/svn/trunk@1547 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-08-18 18:31:49 +00:00
smparkes@smparkes.net 3f8639c67e Issue 520
git-svn-id: https://zxing.googlecode.com/svn/trunk@1545 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-08-17 20:12:10 +00:00
smparkes@smparkes.net a251967f55 Issue 519
git-svn-id: https://zxing.googlecode.com/svn/trunk@1543 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-08-17 16:19:57 +00:00
dswitkin@google.com 56e9cef5b3 Fixed the double delete problem remaining in issue 503.
git-svn-id: https://zxing.googlecode.com/svn/trunk@1536 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-08-16 15:34:00 +00:00
dswitkin@google.com e68b2951f4 Removed as many exceptions as possible from the C++ product readers
to improve performance. There is no change in the number of images
which pass the unit tests.


git-svn-id: https://zxing.googlecode.com/svn/trunk@1535 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-08-16 15:17:39 +00:00
dswitkin@google.com 2476762007 Changed OneDReader::recordPattern to not throw exceptions. For now it just
moves them up a level to the callers.


git-svn-id: https://zxing.googlecode.com/svn/trunk@1531 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-08-13 19:47:13 +00:00
dswitkin@google.com 56ad5f5554 Began removing the excessive use of exceptions in the 1D readers by drawing
a line in the sand: no one may throw an exception from decodeRow(). Next up
is to throw fewer exceptions internally.


git-svn-id: https://zxing.googlecode.com/svn/trunk@1527 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-08-13 16:20:03 +00:00
srowen b868c6e3ae Issue 509
git-svn-id: https://zxing.googlecode.com/svn/trunk@1525 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-08-12 20:54:54 +00:00
srowen 00322f3873 Issue 505
git-svn-id: https://zxing.googlecode.com/svn/trunk@1524 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-08-12 20:51:09 +00:00
srowen 0a6cac9820 Issue 508
git-svn-id: https://zxing.googlecode.com/svn/trunk@1523 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-08-12 20:24:38 +00:00
srowen 6c9812e9bb Issue 511
git-svn-id: https://zxing.googlecode.com/svn/trunk@1522 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-08-12 20:18:08 +00:00
dswitkin@google.com b7f70012ca Fixed issue 503, adding support for getMatrix() in GreyscaleLuminanceSource. Also clarified
that getRow() and getMatrix() require the caller to delete the allocated memory.


git-svn-id: https://zxing.googlecode.com/svn/trunk@1521 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-08-11 22:10:29 +00:00
dswitkin@google.com be31406b94 Removed an extra BitArray, honored the result of LuminanceSource.getRow(), and fixed
a bunch of formatting.


git-svn-id: https://zxing.googlecode.com/svn/trunk@1520 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-08-11 15:17:35 +00:00
srowen 438746649d Issue 497
git-svn-id: https://zxing.googlecode.com/svn/trunk@1515 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-08-07 13:22:47 +00:00
dswitkin ffb33d4c74 Slight refinement to last change - a cached row which
failed should throw an exception, not return NULL.


git-svn-id: https://zxing.googlecode.com/svn/trunk@1513 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-08-07 12:50:16 +00:00
dswitkin a2226af690 Fixed a bug which prevented this binarizer from caching rows.
git-svn-id: https://zxing.googlecode.com/svn/trunk@1512 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-08-06 23:33:48 +00:00
flyashi 2eb3d191b5 C++ port: add header file change
Commit the matching header for the Code39Reader.cpp change in r1510

git-svn-id: https://zxing.googlecode.com/svn/trunk@1511 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-08-06 19:04:19 +00:00
flyashi 5a4f5c901d C++ port: some memory leak cleanups
Closes Issue 499 and Issue 496.

git-svn-id: https://zxing.googlecode.com/svn/trunk@1510 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-08-06 18:59:07 +00:00
flyashi 2de913d220 Fixes two virtual calls and one local variable reference. Closes issue 493 and issue 498 and makes UPC-E work.
git-svn-id: https://zxing.googlecode.com/svn/trunk@1509 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-08-06 14:28:47 +00:00
flyashi 17b9952822 C++ port: add changes to HybridBinarizer
This closes Issue 490.

git-svn-id: https://zxing.googlecode.com/svn/trunk@1507 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-08-04 14:09:09 +00:00
flyashi 313fc8e90e C++ port: Make sure #indef/#define/#endif's and copyright information on all header files is in a common format.
git-svn-id: https://zxing.googlecode.com/svn/trunk@1506 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-08-04 13:36:20 +00:00
flyashi c3b1380ad8 C++ port: Hints infrastructure was added in r1499. This changeset implements reader selection support.
git-svn-id: https://zxing.googlecode.com/svn/trunk@1505 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-08-04 13:35:44 +00:00
srowen 249d75b2e8 Issue 488
git-svn-id: https://zxing.googlecode.com/svn/trunk@1503 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-08-02 10:57:11 +00:00
srowen 4f4aea47ca Issue 489 update the port
git-svn-id: https://zxing.googlecode.com/svn/trunk@1501 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-08-02 04:52:06 +00:00
flyashi 0cfc8f2ab5 C++ port: update test binary with more flags and add barcode format names next to the enum for printing (right know the only way to tell what result->getBarcodeFormat() is is by comparing one by one against the enum entries.)
git-svn-id: https://zxing.googlecode.com/svn/trunk@1499 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-07-29 19:41:52 +00:00
flyashi 7bba1c4680 C++ port: add decode hints system
git-svn-id: https://zxing.googlecode.com/svn/trunk@1498 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-07-29 19:39:44 +00:00
flyashi f7392b3ffe C++ port: fix memory leak in LuminanceSource::getMatrix()
git-svn-id: https://zxing.googlecode.com/svn/trunk@1497 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-07-29 19:01:45 +00:00
flyashi 2cd81bae2a C++ port: UPCEAN reader fixes
- make UPCEANReader fail if there's no quiet zone after the end marker, vastly reducing UPC_E false positives

git-svn-id: https://zxing.googlecode.com/svn/trunk@1495 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-07-29 18:52:24 +00:00
flyashi 52f0822076 C++ port: minor code and comment cleanups all over the place
git-svn-id: https://zxing.googlecode.com/svn/trunk@1494 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-07-29 18:50:33 +00:00
flyashi d2499c38bb C++: ITFReader.cpp was throwing wrong exception
ITFReader.cpp:75 was catching and re-throwing Exception instead of ReaderException, causing scanning to terminate prematurely in some cases (i.e. core/test/data/blackbox/ean13-1/23.JPG). The calling function, MultiFormatOneDReader::doDecode, is only catching ReaderException's. An Exception would be passed all the way up to the caller, even if scanning hasn't finished yet for other decoders for other rows.

git-svn-id: https://zxing.googlecode.com/svn/trunk@1493 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-07-27 23:02:28 +00:00
flyashi 348ebf3adc C++: binarizer updates
- ported the HybridBinarizer from Java for improved 2D binarization
 - updated BinaryBitmap to report if it supports cropping and rotation
 - test binary updates to compare both binarizers like it used to

git-svn-id: https://zxing.googlecode.com/svn/trunk@1489 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-07-19 20:56:17 +00:00
flyashi 8266b61f17 C++: added GreyscaleLuminanceSource
It takes a block of greyscale data, width, height, and cropping parameters, and provides a LuminanceSource interface, with rotation (although only 1D is supported for the rotated object at the moment.)

git-svn-id: https://zxing.googlecode.com/svn/trunk@1488 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-07-19 20:53:17 +00:00
flyashi 5632ab619f Some updates to the C++ test binary:
- calls MultiFormatReader directly
 - code cleanup, removing parts of the QR-specific framework
 - associated change to blackboxtest

git-svn-id: https://zxing.googlecode.com/svn/trunk@1482 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-07-14 18:38:59 +00:00
flyashi 5a36cea5af Updates to C++ port:
- updated Binarizer, BinaryBitmap, and LuminanceSource implementations to match Java
 - updated Magick client

git-svn-id: https://zxing.googlecode.com/svn/trunk@1480 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-07-13 18:43:54 +00:00
flyashi ecbf50da87 C++ port Binarizer and BinaryBitmap weren't caching rows correctly.
git-svn-id: https://zxing.googlecode.com/svn/trunk@1473 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-07-09 15:15:01 +00:00
flyashi b1032ceba4 Fixed C++ port's handling of reversed barcodes:
- BitArray.reverse() was inverting, not reversing, bits.
 - OneDReader wasn't reversing x coordinates of the result points.
 - OneDReader wasn't catching Binarizer exceptions properly.

Issue 470 can be closed by this.

git-svn-id: https://zxing.googlecode.com/svn/trunk@1472 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-07-09 15:12:46 +00:00
rpechayr 2959549f83 [cpp] added const qualifiers that had been removed (accidentaly\?) to LuminanceSourse pure virtual methods. Fixed build problem of ScanTest. Please check that ScanTest builds if you revert this, it will consist of removing const qualifyers to implementation these methods in sublass of LuminancesSource
git-svn-id: https://zxing.googlecode.com/svn/trunk@1461 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-06-24 05:04:36 +00:00
luizcroc dc9fcff5cb Fixing some issues in C++ port regarding 1D barcode readers
git-svn-id: https://zxing.googlecode.com/svn/trunk@1454 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-06-23 03:05:34 +00:00
luizcroc a4e93f905e Same change as Revision r1395 for C++ port: Small speedup, per issue 422
git-svn-id: https://zxing.googlecode.com/svn/trunk@1404 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-05-31 20:58:49 +00:00
rpechayr 71eda605bc [iPhone] Minor Corrections: ZXingWidgets now also builds on release mode. Typo corrected that made compile error
git-svn-id: https://zxing.googlecode.com/svn/trunk@1362 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-05-14 17:21:12 +00:00
luizcroc 9f9096b98e Memory leak in MultiFormatReader fixed and a better fix for the memory leak in MonochromeRectangleDetector
git-svn-id: https://zxing.googlecode.com/svn/trunk@1355 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-05-12 22:11:18 +00:00
dmaclach 52e6d56a63 Added David Phillip Oster's fixes for compiling and getting the Barcodes app to scan for barcodes.
git-svn-id: https://zxing.googlecode.com/svn/trunk@1343 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-05-07 17:10:06 +00:00
dmaclach 505af10197 Cleaned up the iPhone code so that it compiles with the 3.1.2 SDK. Also tightened up warnings and cleaned up the C++ code that violated the warnings.
Fixed up some memory issues.



git-svn-id: https://zxing.googlecode.com/svn/trunk@1334 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-05-04 21:44:53 +00:00
srowen 4c91a1279a Issue 396
git-svn-id: https://zxing.googlecode.com/svn/trunk@1333 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-05-04 09:25:18 +00:00
ralf.kistner@gmail.com 416b2e58ac Fixed things broken in the last commit.
git-svn-id: https://zxing.googlecode.com/svn/trunk@1272 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-04-02 17:17:31 +00:00
ralf.kistner@gmail.com d2aacefff2 C++ port made more compatible with uSTL (no functional changes).
git-svn-id: https://zxing.googlecode.com/svn/trunk@1271 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-04-02 14:11:53 +00:00
luizcroc 2bef6a98d5 #ADD: DataMatrix reader.
#CHANGE: MultiFormatReader can read DataMatrix.

git-svn-id: https://zxing.googlecode.com/svn/trunk@1217 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-02-23 23:50:08 +00:00
ralf.kistner@gmail.com 997c485a35 Fixed the C++ port to compile on a Linux system.
git-svn-id: https://zxing.googlecode.com/svn/trunk@1211 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-02-15 17:00:07 +00:00
warcholuke 76272e8525 One-D barcodes reader port on c++
git-svn-id: https://zxing.googlecode.com/svn/trunk@1196 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-02-02 20:38:25 +00:00
ralf.kistner@gmail.com a1083bebd4 C++ port: fixed warnings for Symbian build
git-svn-id: https://zxing.googlecode.com/svn/trunk@1145 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-12-09 11:06:01 +00:00
ralf.kistner 5472325ffe C++ port:
- Added experimental QR edge detector.
 - Modified pattern finder tolerance levels, as in the Java code.
 - Adjusted the local block binarizer slightly.
 - Added a simple example application.
 - Modified MagickBitmapSource to compute the luminance in the same way as the Java BufferedImageLuminanceSource.


git-svn-id: https://zxing.googlecode.com/svn/trunk@1144 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-12-08 21:16:43 +00:00
ralf.kistner@gmail.com 4c51e618e3 C++ Port:
- Fixed to be able to build for the Symbian emulator (variable-sized arrays cannot be created on the stack).
- Fixed bug only present on Symbian phones that prevented the alignment patterns from being found (the Symbian implementation of valarray does not initialize its values to 0, unless it is explicitly specified as the default value).
- Fixed an include.

git-svn-id: https://zxing.googlecode.com/svn/trunk@1100 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-11-05 22:11:15 +00:00
ralf.kistner@gmail.com 34607d71ee Many changes to the C++ port.
- Refactoring:
 - All the files are now in a zxing folder,
 - Changed the namespaces so that everything is either in zxing or
zxing::qrcode.
 - Moved most function implementations from the headers to source
files.
- Ported the new design from the Java code with LuminanceSource,
BinaryBitmap, Binarizer, GlobalHistogramBinarizer and
LocalBlockBinarizer.
- Fixed two rare segmentation faults: one in
GridSampler::checkAndNudgePoints, and one in
ReedSolomonDecoder::decode. These would simply cause
ArrayIndexOutOfBoundsExceptions in Java, but have to be checked
explicitly in C++.
- With help from Erno Mäkinen, used std::vector instead of ArrayRef in
many places, as ArrayRef causes problems on Symbian phones.
- Added scons build files.
- Added a test application using ImageMagick.
- More small changes.



git-svn-id: https://zxing.googlecode.com/svn/trunk@1092 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-11-01 17:30:30 +00:00
christian.brunschen f09b742ea2 * Throw the actual exception objects, rather than pointers to them, i.e.:
- replace |throw new FooException()| with |throw FooException()|
  - replace |catch (FooException *ex)| with |catch (FooExceptio ex)|
  - update all uses of caught exceptions appropriately:
    . replace |ex->foo| with |ex.foo|
    . remove all attempts to delete the caught exception(s)
* Add 'const' to the 'char *' declarations for character encoding names



git-svn-id: https://zxing.googlecode.com/svn/trunk@1002 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-27 13:22:03 +00:00
srowen 1c243335a6 Remove some DEBUG blocks that apparently do not compile
git-svn-id: https://zxing.googlecode.com/svn/trunk@941 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-05-21 14:33:23 +00:00
srowen 58705e7b91 Issue 166
git-svn-id: https://zxing.googlecode.com/svn/trunk@902 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-04-06 21:59:03 +00:00
srowen f743341043 Issue 165
git-svn-id: https://zxing.googlecode.com/svn/trunk@901 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-04-06 21:56:31 +00:00
srowen 3530bb1d4b Issue 164
git-svn-id: https://zxing.googlecode.com/svn/trunk@899 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-04-06 21:51:33 +00:00
srowen 938f5cf618 Issue 163
git-svn-id: https://zxing.googlecode.com/svn/trunk@897 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-04-06 21:41:21 +00:00
srowen 086cdca094 Issue 161
git-svn-id: https://zxing.googlecode.com/svn/trunk@896 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-04-06 21:38:48 +00:00
christian.brunschen 7b8b7e67d1 initialize valarrays with explicit contents (zero)
git-svn-id: https://zxing.googlecode.com/svn/trunk@636 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-24 09:53:01 +00:00
christian.brunschen a63fb3b9a6 Added 'About' screen, localized application name
git-svn-id: https://zxing.googlecode.com/svn/trunk@561 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-08-14 11:00:48 +00:00
christian.brunschen 0fe5931684 fixed CountedTest compilation problem attempting to access a private variable. Also fixed TestRunner exit status.
git-svn-id: https://zxing.googlecode.com/svn/trunk@543 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-08-02 08:36:54 +00:00
christian.brunschen 753ca4afbf debug printout cleanup
git-svn-id: https://zxing.googlecode.com/svn/trunk@472 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-24 16:27:52 +00:00
srowen e0db8f9271 Standardize and update all copyright statements to name "ZXing authors" as suggested by open-source team to correctly attribute copyright in a project with contributions from several sources.
git-svn-id: https://zxing.googlecode.com/svn/trunk@455 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-19 20:56:24 +00:00
christian.brunschen d02ea4bd84 First version of the iphone client that actually works, for at least a subset
of the intended functionality.



git-svn-id: https://zxing.googlecode.com/svn/trunk@444 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-19 08:52:37 +00:00