Commit graph

414 commits

Author SHA1 Message Date
dswitkin fabdd40edf Huge progress on the Encoder. I'm down to StringPiece errors (that class hasn't been replaced yet) and a few nasty methods, which call into Reed Solomon (not done yet).
git-svn-id: https://zxing.googlecode.com/svn/trunk@704 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-14 18:43:54 +00:00
srowen f80cd1ff51 More enhancements to Reed-Solomon tests
git-svn-id: https://zxing.googlecode.com/svn/trunk@703 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-14 18:34:19 +00:00
dswitkin b625c6f7e5 Got MatrixUtil to compile, and refactored some methods out of it, and into Matrix where they belong.
git-svn-id: https://zxing.googlecode.com/svn/trunk@702 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-14 16:21:05 +00:00
dswitkin 97ffa36734 Did a bunch of comments cleanup.
git-svn-id: https://zxing.googlecode.com/svn/trunk@701 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-14 15:40:38 +00:00
srowen 7cae0d4cc9 Added Reed-Solomon encoder, suitable for QR Code encoding
git-svn-id: https://zxing.googlecode.com/svn/trunk@699 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-14 12:40:55 +00:00
dswitkin 5dba28fc86 Wrote a reasonable implementation of BitVector which now compiles.
git-svn-id: https://zxing.googlecode.com/svn/trunk@698 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-13 21:59:08 +00:00
dswitkin 6f4898c68f Wrote a Matrix class and fixed all uses of it, as well as other small fixes like StringBuffer. MaskUtil and QRCode now compile with no errors.
git-svn-id: https://zxing.googlecode.com/svn/trunk@697 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-13 21:18:56 +00:00
srowen 8666ac2f8f Comment out QR code encoder package for the moment
git-svn-id: https://zxing.googlecode.com/svn/trunk@696 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-13 19:08:25 +00:00
dswitkin 60f3af2607 Converted the Mode and ECLevel enums in QRCode.java.
git-svn-id: https://zxing.googlecode.com/svn/trunk@695 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-13 17:12:53 +00:00
dswitkin f50305895d Began porting the QR Code encoder from ChartServer to Java/ZXing. Some important comments are flagged with JAVAPORT. I've done the following so far:
- Created Java files with our headers, packages, etc.
- Converted includes to imports, or commented out the unresolved dependencies
- Merged all the .h and .cpp contents into Java classes
- Fixed most of the formatting
- Did all the simple transformations (bool, NULL, const, struct, string, ::, ->)
- Created a Debug class to handle all the asserts and logging
- Fixed about half of the static arrays
- Removed some pthread cruft

IMPORTANT:

- Please do not start hacking this code up as I'm going to keep making large changes to it. In particular, we need to leave the trailing underscores on member variables for now. Once everything is compiling with no errors, we can revisit stylistic issues.
- There will be a number of similar classes within the encoder and in the rest of ZXing. We should refactor those later (BitVector and BitArray come to mind). In the mean time, I want to get everything working and the tests passing before we do that.

git-svn-id: https://zxing.googlecode.com/svn/trunk@694 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-13 16:14:44 +00:00
dswitkin cd0ff37fdb Made a small change to the KDDI AU parsing code to handle pronunciation (aka Furigana) specifically.
git-svn-id: https://zxing.googlecode.com/svn/trunk@692 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-12 16:21:19 +00:00
srowen 977c2e38ca Updates from sanfordsquires to fix RS decoding for Datamatrix
git-svn-id: https://zxing.googlecode.com/svn/trunk@689 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-12 13:47:45 +00:00
srowen d56fb38427 Updates from sanfordsquires to fix RS decoding for Datamatrix
git-svn-id: https://zxing.googlecode.com/svn/trunk@688 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-12 12:59:47 +00:00
dswitkin e9a6e8e906 Added support for Furigana using the SOUND field in MECARD. AddressBookParsedResult now has a pronunciation field to represent this. I'm not aware of whether this is supported in other formats like VCARD, so they all pass null for now.
git-svn-id: https://zxing.googlecode.com/svn/trunk@686 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-11 16:31:27 +00:00
srowen ae46d12d21 Partially addressed Reed-Solomon decoding issue for Datamatrix, but not entirely. Still some small issue that prevents correcting as many errors as possible.
git-svn-id: https://zxing.googlecode.com/svn/trunk@680 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-09 16:22:43 +00:00
srowen 04f17f67a6 Made new array fields final
git-svn-id: https://zxing.googlecode.com/svn/trunk@679 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-09 16:20:15 +00:00
srowen 5f817c69b6 Address a small but clear bug in detector logic
git-svn-id: https://zxing.googlecode.com/svn/trunk@678 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-08 14:27:08 +00:00
srowen 41a386f04c Attempt to make encoding detection slightly more accurate -- rule out Shift_JIS in a few more cases
git-svn-id: https://zxing.googlecode.com/svn/trunk@677 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-08 14:25:36 +00:00
srowen 56644b1af2 Small additional error check in decoder
git-svn-id: https://zxing.googlecode.com/svn/trunk@674 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-06 19:14:48 +00:00
dswitkin c4a28fa4a7 Made some temporary changes to make throwing ReaderExceptions more efficient. Long term, we need to delete this class and change the decoders to return errors instead of throwing.
git-svn-id: https://zxing.googlecode.com/svn/trunk@669 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-05 19:16:27 +00:00
srowen e6e3472471 Renamed UPC result type to Product, and introduced an idea of 'product ID' and 'normalized product ID' to account for UPC-E, where the actual visible ID is different from what we may want to search for as a key. Updated clients to use this too.
git-svn-id: https://zxing.googlecode.com/svn/trunk@668 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-04 12:08:19 +00:00
dswitkin 1dc71920e9 Another round of optimization, focused on reusing arrays and small objects.
git-svn-id: https://zxing.googlecode.com/svn/trunk@665 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-02 16:07:36 +00:00
srowen 14e22bd443 Revamp the character encoding detection to use a more complicated but still crude algorithm that detects more Shift_JIS sequences correctly.
git-svn-id: https://zxing.googlecode.com/svn/trunk@664 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-02 12:22:33 +00:00
srowen 79d7b01e9e Updated qrcode-2 with corrected output for some Japanese-language results. Also standardized on UTF-8 encoding for test result files and enabled --dump_results for single-file case.
git-svn-id: https://zxing.googlecode.com/svn/trunk@663 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-02 11:06:20 +00:00
srowen 70732c334e Now more lenient in detecting Shift_JIS to detect more byte sequences as Shift_JIS
git-svn-id: https://zxing.googlecode.com/svn/trunk@662 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-02 10:30:09 +00:00
dswitkin a8b57c466d Discovered that our 1D Readers were being reallocated for every row scanned - yikes! I made them reusable across both rows and different scans. This saved 26 ms on the worst case rejection. We can now consistently reject any 240x240 image on Android in 150 ms or less, checking all 7 formats.
git-svn-id: https://zxing.googlecode.com/svn/trunk@661 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-01 02:31:05 +00:00
srowen 5a5987df88 Allow up to 3 superfluous bits at end of stream
git-svn-id: https://zxing.googlecode.com/svn/trunk@659 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-31 18:49:54 +00:00
dswitkin bf362ae853 Added 17 new, unusual QR Codes to the blackbox tests. We can decode the majority OK, but some of the contents are not agreeing with the golden results because of a text encoding issue.
git-svn-id: https://zxing.googlecode.com/svn/trunk@658 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-31 18:09:24 +00:00
dswitkin 8671371c59 Did a big refactoring on the MonochromeBitmapSource. I removed all the caching luminance calls and converted them to getting luminance data on demand. This saved another 33,000 function calls per rejected scan, good for another 15 ms savings. I also moved the luminance calls to BaseMonochromeBitmapSource and made them protected, to indicate that the decoders shouldn't use them.
Overall the recent optimizations took one rejected scan from 307 to 135 ms, which is definitely noticeable.

WARNING: I am not able to build the Bug or J2ME clients, but I believe they are correct.

git-svn-id: https://zxing.googlecode.com/svn/trunk@656 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-30 18:44:10 +00:00
dswitkin bef3c75048 Fixed a crash in calendar parsing when encountering an illegal VEVENT without newlines.
git-svn-id: https://zxing.googlecode.com/svn/trunk@655 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-30 16:35:26 +00:00
dswitkin 4f7b7d573d Made the data members of BitArray public so they will be inlined. This saves about 60,000 function calls per rejected scan. We can make these private again once we figure out the ProGuard problems with -allowaccessmodification.
git-svn-id: https://zxing.googlecode.com/svn/trunk@653 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-29 21:16:46 +00:00
dswitkin 77f41cce22 Added another target for building a debug key signed Android client, and removed the old optimized target from core.
git-svn-id: https://zxing.googlecode.com/svn/trunk@650 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-29 19:50:37 +00:00
srowen 6f6da9a04c moved ProGuard optimization into Android build file since it's the only way to fully optimize the final build product (inlining of key methods). Also always dump proguard results.
git-svn-id: https://zxing.googlecode.com/svn/trunk@649 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-29 15:42:22 +00:00
dswitkin d80cd07064 Made a change to the QR detector which cuts the worst case rejection time from 300 ms to 160 ms, with almost no penalty in decoding ability. Given that we're emphasizing continuous decoding, I feel it's much better to reject the occasional borderline image in half the time, and get on with the next scan.
git-svn-id: https://zxing.googlecode.com/svn/trunk@648 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-29 14:22:44 +00:00
srowen 78da6447b0 Inner class elements now not private since it is pointless and confuses Proguard
git-svn-id: https://zxing.googlecode.com/svn/trunk@647 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-28 15:59:51 +00:00
srowen 96f6428eea Add column caching to MonochromeBitmapSources and use it to improve Data Matrix speed
git-svn-id: https://zxing.googlecode.com/svn/trunk@631 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-22 08:43:56 +00:00
dswitkin f142a9478c Reordered the address book fields to something a little more standard/reasonable.
git-svn-id: https://zxing.googlecode.com/svn/trunk@623 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-17 20:21:29 +00:00
dswitkin 77d29c3d7a Added support for URL to MECARD and VCARD.
git-svn-id: https://zxing.googlecode.com/svn/trunk@622 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-17 16:12:10 +00:00
dswitkin 8cb804ec9e Made a change to 1D decoding which looks for 100% instead of 150% of the start and end patterns when searching for quiet zones, but in exchange for that reduction, we reject rows whose quiet zones would run off either edge of the image.
The result is complete elimination of all false positives in the new batch of 40 images I just checked in. Bettter than that, we come up with a net gain of 38 new barcodes decoded (counting rotation and try harder variations). We even get some of the reflective images that were impossible up to this point.

git-svn-id: https://zxing.googlecode.com/svn/trunk@620 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-15 19:47:34 +00:00
dswitkin edcf34f0c5 Created 40 new blackbox images which are partial shots of a very large QR code. In mobile mode we do OK, but in try harder we find bogus 1D results in almost half of these. I'm checking this in as a baseline, and will work on improving the situation in a subsequent change.
git-svn-id: https://zxing.googlecode.com/svn/trunk@618 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-14 22:08:48 +00:00
dswitkin c91f427a8b Added a bit of defensive programming in the AlignmentPattern code. There were real world examples where the width passed to AlignmentPatternFinder was zero, which causes BitArray to throw when built with a size of zero. I'm going a little bit farther and not searching extremely small areas either.
Sean, please review.

git-svn-id: https://zxing.googlecode.com/svn/trunk@617 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-14 18:24:23 +00:00
dswitkin ef2f3f8ce0 Expanded calendar parsing to allow more date formats, added some unit tests for ISBN and VEVENTS, and fixed the EAN13-1 test which was failing by one image.
git-svn-id: https://zxing.googlecode.com/svn/trunk@616 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-14 15:56:03 +00:00
dswitkin 7fe2c1c60c Prevented ISBN parsing from happening twice.
git-svn-id: https://zxing.googlecode.com/svn/trunk@610 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-09 18:46:21 +00:00
srowen 83c01f0cee Camel-cased log_table, exp_table vars
git-svn-id: https://zxing.googlecode.com/svn/trunk@609 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-09 12:17:37 +00:00
mschulkind 76b4fa1910 Fixing a comment.
git-svn-id: https://zxing.googlecode.com/svn/trunk@607 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-08 20:52:58 +00:00
mschulkind af555d2409 Renaming two member variables so they no longer share names with their getters.
git-svn-id: https://zxing.googlecode.com/svn/trunk@606 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-08 20:42:04 +00:00
dswitkin 45677f2bb2 Made calendar event parsing more robust, and also reject non-calendar contents a little faster.
git-svn-id: https://zxing.googlecode.com/svn/trunk@604 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-08 15:37:38 +00:00
dswitkin 13c08aedaf Added 13 new blackbox images.
git-svn-id: https://zxing.googlecode.com/svn/trunk@603 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-07 18:57:15 +00:00
srowen 773409ed6a Add check for minimal whitespace before/after Code 128, Code 39; a few code tweaks as well
git-svn-id: https://zxing.googlecode.com/svn/trunk@601 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-07 09:53:53 +00:00
srowen 089df8eb7b Added redundant abstract method declarations to maybe work around problems on Nokias
git-svn-id: https://zxing.googlecode.com/svn/trunk@600 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-06 11:43:19 +00:00
srowen b0b0afc172 Added redundant abstract method declarations to maybe work around problems on Nokias
git-svn-id: https://zxing.googlecode.com/svn/trunk@599 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-04 14:46:15 +00:00
srowen 8c3b727bd4 Recent bug fix uncovered some bugs in test case -- fixing those
git-svn-id: https://zxing.googlecode.com/svn/trunk@594 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-01 16:17:03 +00:00
dswitkin 16bdeac581 Added two more UPC-A blackbox images submitted by the community.
git-svn-id: https://zxing.googlecode.com/svn/trunk@593 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-01 14:17:17 +00:00
dswitkin bacd1469af - Fixed a crash when parsing a particular VCard with a blank entry.
- Trimmed whitespace around many fields to sanitize the results (this is very useful upstream, for example we hyphenate phone numbers on Android but can't tolerate extra whitespace).
- Fixed a bug with 1D result points when scanning upside down - they needed to be mirrored to draw correctly.

git-svn-id: https://zxing.googlecode.com/svn/trunk@592 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-09-29 18:45:00 +00:00
srowen 6db50e0b79 Finally actually fix the Code-128 bug and add tests
git-svn-id: https://zxing.googlecode.com/svn/trunk@588 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-09-24 12:16:41 +00:00
srowen 78af16ca34 More UPC-A tests: interesting clear but low-res images that don't decode
git-svn-id: https://zxing.googlecode.com/svn/trunk@587 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-09-23 17:24:03 +00:00
srowen e2b141e1a3 Another fix -- account for CODE_STOP. Add some comments.
git-svn-id: https://zxing.googlecode.com/svn/trunk@585 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-09-22 09:08:57 +00:00
srowen b29b4d2070 Fix bug that would cut out part of result string if final checksum value happened to be the code for a non-printable character
git-svn-id: https://zxing.googlecode.com/svn/trunk@584 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-09-21 11:14:48 +00:00
dswitkin 1ab0f14f41 Made a couple utility methods public.
git-svn-id: https://zxing.googlecode.com/svn/trunk@582 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-09-19 01:10:25 +00:00
dswitkin d45123da9e Added an ISBN parsed result type courtesy of jbreiden.
git-svn-id: https://zxing.googlecode.com/svn/trunk@576 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-09-08 20:54:52 +00:00
srowen 67d139dadb git-svn-id: https://zxing.googlecode.com/svn/trunk@574 59b500cc-1b3d-0410-9834-0bbf25fbcc57 2008-09-01 00:33:53 +00:00
dswitkin f344098895 Added a new unit test of real world QR codes. We get 29/42 - pretty good, but room for improvement.
git-svn-id: https://zxing.googlecode.com/svn/trunk@571 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-08-25 17:44:23 +00:00
srowen 8b5d15cc5c URIParsedResult now has isPossiblyMaliciousURI() to check for username in host, which may be an attempt to mask the host of the URI
git-svn-id: https://zxing.googlecode.com/svn/trunk@570 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-08-21 04:33:42 +00:00
srowen 7dbc556789 Per dominik.wild, added support for "sms:number:body" format URIs
git-svn-id: https://zxing.googlecode.com/svn/trunk@565 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-08-15 16:35:47 +00:00
srowen 966c5a8e97 (Thanks to John White) Make UPC/EAN decoder less picky about white space bordering 1D code
git-svn-id: https://zxing.googlecode.com/svn/trunk@557 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-08-12 18:29:29 +00:00
dswitkin 3371fdb4d3 Added 55 EAN-13 real world test images. For mobile we get 49/55 of these, 55/55 with try harder.
git-svn-id: https://zxing.googlecode.com/svn/trunk@554 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-08-08 15:26:21 +00:00
srowen 6c309a7247 Parallelize black box tests
git-svn-id: https://zxing.googlecode.com/svn/trunk@552 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-08-06 20:26:05 +00:00
srowen 86ce6b77b7 Use unicode escapes to avoid apparent source file encoding issues here
git-svn-id: https://zxing.googlecode.com/svn/trunk@549 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-08-06 16:21:47 +00:00
srowen 7c6276d89b Reverted inadvertent Detector changes that broke unit tests. Fixed test target to definitely exclude non-TestCase classes from tests.
git-svn-id: https://zxing.googlecode.com/svn/trunk@548 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-08-06 16:07:46 +00:00
srowen 3a1d1f1850 Initial checkin of Data Matrix detector. Still needs work, and is not enabled by default.
git-svn-id: https://zxing.googlecode.com/svn/trunk@545 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-08-04 18:37:42 +00:00
srowen 944feda925 Re-add ECI test case and groundwork for more tests of DecodedBitStreamParser
git-svn-id: https://zxing.googlecode.com/svn/trunk@539 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-07-30 23:01:37 +00:00
srowen 91b0ef1622 Some small improvements in error handling based on exceptions observed at zxing.org
git-svn-id: https://zxing.googlecode.com/svn/trunk@538 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-07-30 21:58:17 +00:00
srowen dbc1eebc49 Minor style changes; optimized nested loops at end to avoid some redundant computation
git-svn-id: https://zxing.googlecode.com/svn/trunk@537 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-07-25 15:24:59 +00:00
srowen 423f0a05ca Remove dead files
git-svn-id: https://zxing.googlecode.com/svn/trunk@536 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-07-24 21:43:40 +00:00
srowen e413ceae95 Remove dead files (why doesn't this happen automatically on a move?)
git-svn-id: https://zxing.googlecode.com/svn/trunk@535 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-07-24 21:39:34 +00:00
srowen 124130f6a3 Factor out ECI-related code for reuse with Data Matrix later.
git-svn-id: https://zxing.googlecode.com/svn/trunk@534 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-07-24 21:37:37 +00:00
srowen a43e928575 Factor out and clarify cross product computation and its use, so it can be reused elsewhere.
git-svn-id: https://zxing.googlecode.com/svn/trunk@527 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-07-23 18:54:35 +00:00
srowen cebac631ac Added support for "05 Macro" and "06 Macro" in ASCII encodation
git-svn-id: https://zxing.googlecode.com/svn/trunk@526 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-07-23 18:25:16 +00:00
dswitkin 08d44240aa Modified the library entry point in a way which lets continuous scan clients reuse the same decoding objects at each pass. This is source and semantically compatible with the previous version, so you have to choose to call decodeWithState() to get the benefits. The unit tests cannot use this because they test each image in normal and then try harder mode, which requires changing the hints object.
git-svn-id: https://zxing.googlecode.com/svn/trunk@524 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-07-22 16:16:21 +00:00
srowen a79fad4b9c Quick shortening of a method in FinderPatternFinder that I just noticed
git-svn-id: https://zxing.googlecode.com/svn/trunk@523 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-07-21 21:52:43 +00:00
srowen 5c8b0558e1 Enhance GenericResultPoint and move some logic out of qrcode packages for reuse with datamatrix soon
git-svn-id: https://zxing.googlecode.com/svn/trunk@522 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-07-21 21:48:32 +00:00
srowen 81ef86b634 More refactoring, fixed a small issue in X12 encodation of \r
git-svn-id: https://zxing.googlecode.com/svn/trunk@521 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-07-21 21:45:37 +00:00
srowen d04099f61b Tiny improvement to toString() visualization of BitMatrix
git-svn-id: https://zxing.googlecode.com/svn/trunk@520 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-07-18 22:46:26 +00:00
srowen 7fbb81a0ed Fixed problem that is unclear from spec: shift apparently resets after being used in C40/Text encodation. Introduced some locals to reduce array accesses, change char to int where we are really using a numeric type, and tweaked javadoc indentation
git-svn-id: https://zxing.googlecode.com/svn/trunk@519 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-07-18 22:40:33 +00:00
srowen ed4855ef70 More fixes to the build files after trying to build the whole thing again for release
git-svn-id: https://zxing.googlecode.com/svn/trunk@514 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-07-10 20:25:42 +00:00
dswitkin 2267be2e61 Small improvement to unit test results output.
git-svn-id: https://zxing.googlecode.com/svn/trunk@510 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-07-10 19:45:50 +00:00
dswitkin 28f6c26335 Added a reflective UPC-E unit test. We cannot decode any of these silver on silver barcodes.
git-svn-id: https://zxing.googlecode.com/svn/trunk@509 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-07-09 21:46:27 +00:00
dswitkin 13cb307965 Added 41 real world UPC-E tests. We need to improve regular decoding here: it gets 17/41, but try harder gets 28/41.
git-svn-id: https://zxing.googlecode.com/svn/trunk@508 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-07-09 21:37:09 +00:00
dswitkin 936343b221 Added some very difficult reflective UPC-A images - we get 8/21. We would probably have to do something very special to handle soda cans with those silver on silver barcodes.
git-svn-id: https://zxing.googlecode.com/svn/trunk@507 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-07-09 20:50:03 +00:00
dswitkin 251e4623e6 All the positive test cases now track normal and try harder success rates separately. This lets us monitor regressions separately, and gives an idea of how much better try harder actually is.
git-svn-id: https://zxing.googlecode.com/svn/trunk@506 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-07-09 20:15:53 +00:00
dswitkin f05d22687e Added 52 real world UPC-A greyscale test images. We get 26/52, but more with try harder. I think I'm going to break try harder results into their own test so we can track these separately.
git-svn-id: https://zxing.googlecode.com/svn/trunk@505 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-07-09 19:00:33 +00:00
srowen 4cecc3578d Oops, fix an error introduced in recent change
git-svn-id: https://zxing.googlecode.com/svn/trunk@504 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-07-09 17:25:44 +00:00
srowen 6d124e1be5 Minor style tweaks
git-svn-id: https://zxing.googlecode.com/svn/trunk@503 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-07-09 17:24:02 +00:00
srowen 42940c4580 Add iCal support, plus many small changes suggested by code inspection -- mostly making things less visible for now
git-svn-id: https://zxing.googlecode.com/svn/trunk@502 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-07-08 04:11:24 +00:00
srowen 3feb56ece3 Rename some methods so that they're not technically overloading one another -- maybe slightly better style-wise in Java but reduces complication in port to C++
git-svn-id: https://zxing.googlecode.com/svn/trunk@501 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-07-07 18:25:19 +00:00
srowen 2a9feb1f49 Added another phone type field to BIZCARD implementation
git-svn-id: https://zxing.googlecode.com/svn/trunk@499 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-07-03 20:36:06 +00:00
dswitkin 0ddf4bcf96 Don't add a newline at the front of a ParsedResult.
git-svn-id: https://zxing.googlecode.com/svn/trunk@498 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-07-03 16:35:00 +00:00
srowen 64369b3878 Add BIZCARD support and a little refactoring
git-svn-id: https://zxing.googlecode.com/svn/trunk@494 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-07-01 19:02:03 +00:00
srowen d392d57c67 Now we can support BDAY in DoCoMo MECARD format
git-svn-id: https://zxing.googlecode.com/svn/trunk@493 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-27 19:38:24 +00:00
srowen 0e311f40c9 Standardize getDisplayResult() implementation in parsed results, and fix up web site download page to show one J2ME download
git-svn-id: https://zxing.googlecode.com/svn/trunk@490 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-27 18:55:00 +00:00
srowen 1eab5aba49 Add minimal support for FNC1 mode in QR Code
git-svn-id: https://zxing.googlecode.com/svn/trunk@489 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-27 18:47:31 +00:00
srowen 90297efc57 Added mms:, mmsto: support and tests, plus basic tests for vCard format
git-svn-id: https://zxing.googlecode.com/svn/trunk@488 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-27 18:14:19 +00:00
srowen aa65741586 More refactoring of parsed results / result parsers; added basic vCard support
git-svn-id: https://zxing.googlecode.com/svn/trunk@487 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-27 17:50:47 +00:00
srowen dd57042f9a And fixed the "270" issue: logic error in computing the "skip" allowed after finding two finder patterns when the QR Code was inverted.
git-svn-id: https://zxing.googlecode.com/svn/trunk@486 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-26 22:58:08 +00:00
srowen 621a9f25e9 Switch to integer math in a critical QR Code detector method for speed and tweak a few things before I start investigating this method and the infamous "270 issue"
git-svn-id: https://zxing.googlecode.com/svn/trunk@485 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-26 22:14:53 +00:00
srowen 011e6e9cee Big refactoring of ParsedResult: now split into ResultParser and ParsedResult classes, per Christian's suggestion. This unifies the parsed results that are produced from various input, simplifying client handling of different types.
git-svn-id: https://zxing.googlecode.com/svn/trunk@482 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-26 19:49:38 +00:00
dswitkin 12a57d0baf Added new test of unsupported barcodes, to make sure we don't decode them.
git-svn-id: https://zxing.googlecode.com/svn/trunk@477 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-25 01:26:22 +00:00
dswitkin cfa10cf26c Added blackbox test of partial barcodes which should not decode.
git-svn-id: https://zxing.googlecode.com/svn/trunk@476 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-25 01:10:52 +00:00
dswitkin 67656a7ee3 Reworked the false positives unit tests to track each rotation separately, and to allow new tests to be added. I also removed four images which are going to live in another test.
git-svn-id: https://zxing.googlecode.com/svn/trunk@475 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-25 00:51:37 +00:00
srowen 584564a594 Added ECI for values 0-2 and also standardize character encoding names throughout the code to use the canonical values for java.lang and java.io
git-svn-id: https://zxing.googlecode.com/svn/trunk@468 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-23 17:11:53 +00:00
srowen c9ead4ce8a Added some degree of support for Character Set ECIs
git-svn-id: https://zxing.googlecode.com/svn/trunk@467 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-20 22:38:35 +00:00
dswitkin 72dfe0c28f Changed the core build file to run clean before building each time, which is necessary when switching between debug and optimized versions.
git-svn-id: https://zxing.googlecode.com/svn/trunk@466 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-20 21:50:46 +00:00
dswitkin d713f52437 Tuned the Code 128 parameters:
Right-side up went from 9/40 to 33/40
Upside down went from 8/40 to 34/40

and try harder now gets 39/40.

git-svn-id: https://zxing.googlecode.com/svn/trunk@462 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-20 19:57:48 +00:00
dswitkin 834bc3297a Added 40 real world Code 128 images. We decode 9/40 right-side up, and 8/40 upside down. A fix will follow shortly to get these numbers up - we overtightened the pattern matching in the first round of false positive changes.
git-svn-id: https://zxing.googlecode.com/svn/trunk@461 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-20 19:24:02 +00:00
dswitkin 40ca2706e2 Added 17 real world Code 39 images to our unit tests. We decode all 17, upside down and right-side up.
git-svn-id: https://zxing.googlecode.com/svn/trunk@460 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-20 19:20:27 +00:00
srowen ce549d76c3 More updated to build-optimized to work correctly with dex -- now really doesn't generate local var info
git-svn-id: https://zxing.googlecode.com/svn/trunk@458 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-20 15:22:45 +00:00
dswitkin 12e5d9462c Fixed a bug in patternMatchVariance() which caused the max individual variance to never eliminate any patterns. As a result, the false positives unit test dropped from 15 to 4. Also did some other minor cleanup.
git-svn-id: https://zxing.googlecode.com/svn/trunk@456 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-19 21:38:48 +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
srowen 09e6c3bbce Another possible fix for issues between ProGuard and Android's dex -- don't output local var symbols
git-svn-id: https://zxing.googlecode.com/svn/trunk@454 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-19 20:48:12 +00:00
dswitkin fb5fbccf7c Add 26.jpg back with the command line client
git-svn-id: https://zxing.googlecode.com/svn/trunk@453 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-19 20:00:13 +00:00
dswitkin d4cda3377d Delete 26.jpg again.
git-svn-id: https://zxing.googlecode.com/svn/trunk@452 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-19 19:59:23 +00:00
srowen 24e31c6a9a Correct a few more things about ECI parsing
git-svn-id: https://zxing.googlecode.com/svn/trunk@451 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-19 16:49:04 +00:00
dswitkin 466130bcf0 Added rotation to unit test output for clarification.
git-svn-id: https://zxing.googlecode.com/svn/trunk@450 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-19 16:41:40 +00:00
dswitkin 640ccb5fd2 Trying to add image 26 back to the false positives unit test.
git-svn-id: https://zxing.googlecode.com/svn/trunk@449 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-19 15:51:04 +00:00
dswitkin eea1c7fd2f Deleting image 26 which somehow arrived at the server with a length of zero bytes.
git-svn-id: https://zxing.googlecode.com/svn/trunk@448 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-19 15:49:51 +00:00
dswitkin 905d44424b Fixed the build.
git-svn-id: https://zxing.googlecode.com/svn/trunk@447 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-19 15:46:39 +00:00
srowen 9ee69fee5a Added, at least, parsing of ECI mode in QR Code
git-svn-id: https://zxing.googlecode.com/svn/trunk@443 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-19 01:37:49 +00:00
srowen 15f34edb52 Simple check in Code 39 reader to determine wide bars vary in width a lot, to cut out most false positives
git-svn-id: https://zxing.googlecode.com/svn/trunk@442 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-18 22:52:45 +00:00
srowen 180e833b3e Improved approach to 1D decoding -- better use of integer math by scaling pattern ratios up to expected number of pixels, rather than the other way. Modified constants accordingly. Also introduced notion of maxium variance that any one bar in a pattern can have and stiill be accepted. Finally, adjusted false-positives test failure limit downward due to recent improvements.
git-svn-id: https://zxing.googlecode.com/svn/trunk@441 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-18 22:12:59 +00:00
srowen 2f9e5ca32b Fix pretty clear bug on Code 128 and 39 readers: reject empty barcodes as a false positive.
git-svn-id: https://zxing.googlecode.com/svn/trunk@440 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-18 21:56:30 +00:00
srowen 593128df02 Make optimization of core.jar as a library more conservative -- no shrinking, obfuscation
git-svn-id: https://zxing.googlecode.com/svn/trunk@439 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-18 21:44:09 +00:00
srowen 6effdd4bd0 Renamed core OSGi bundle to "ZXing"; removed "level=" attribute on <jar> tasks since it singlehandly introduces a depence on Ant 1.7 and doesn't buy much. OS X for example does not ship with Ant 1.7 yet.
git-svn-id: https://zxing.googlecode.com/svn/trunk@437 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-18 17:40:14 +00:00
dswitkin 4d1229bd65 Created a library of images which do not contain barcodes, or contain barcodes we don't yet support. Wrote a new unit test designed to identify false positives, and set a benchmark which we can improve over time. Out of these 26 images, tested in all four rotations, we currently find 44/104 false positives. The Code 39 decoder in particular seems to be too lenient.
git-svn-id: https://zxing.googlecode.com/svn/trunk@436 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-17 18:35:16 +00:00
srowen c29b094932 Add support for core.jar as OSGi bundle, component in BugLabs's BUG platform
git-svn-id: https://zxing.googlecode.com/svn/trunk@435 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-16 18:25:56 +00:00
srowen b5b4351727 Final updates to use local test images rather than remote
git-svn-id: https://zxing.googlecode.com/svn/trunk@432 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-16 16:29:48 +00:00
srowen ab3a9bf493 More updates to use local test images rather than remote
git-svn-id: https://zxing.googlecode.com/svn/trunk@431 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-16 16:13:12 +00:00
srowen f66a048f5c First set of updates to use local test images rather than remote
git-svn-id: https://zxing.googlecode.com/svn/trunk@430 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-16 16:00:51 +00:00
srowen 70c64558cf Minor style tweaks
git-svn-id: https://zxing.googlecode.com/svn/trunk@428 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-13 12:15:49 +00:00
srowen 6f7a348f5d Adjust optimization options: make sure to actually exclude more unused code, but keep what Android client needs; this means tests have to run against unoptimized version
git-svn-id: https://zxing.googlecode.com/svn/trunk@427 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-12 17:11:07 +00:00
srowen 4cc490db56 Remove compile-time reference to DataMatrixReader
git-svn-id: https://zxing.googlecode.com/svn/trunk@426 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-12 16:30:01 +00:00
srowen 56c4b6a94d Added build-optimized target to produce optimized core.jar; tests now test optimized version; also removed the dependency from core to MIDP 2.0 as it was just depending on silly IllegalStateException
git-svn-id: https://zxing.googlecode.com/svn/trunk@423 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-12 15:55:42 +00:00
srowen 14895cf9b3 Now use integer math in patternMatchVariance for performance, plus a few other similar style and speed tweaks
git-svn-id: https://zxing.googlecode.com/svn/trunk@422 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-12 15:17:53 +00:00
srowen 038add9da1 Oops one more style change
git-svn-id: https://zxing.googlecode.com/svn/trunk@421 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-12 12:52:18 +00:00
srowen 31b8b3d226 Small tweaks on top of Daniel's excellent refactoring
git-svn-id: https://zxing.googlecode.com/svn/trunk@420 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-12 12:51:26 +00:00
dswitkin 7b2cafe970 Missed one place that needs to cache the luminance data.
git-svn-id: https://zxing.googlecode.com/svn/trunk@419 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-11 23:58:04 +00:00
dswitkin 9adb83bbd3 Refactored the MonochromeBitmapSource hierarchy to share a great deal of code and shrink the derived classes considerably.
git-svn-id: https://zxing.googlecode.com/svn/trunk@418 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-11 23:52:35 +00:00
srowen f5b58916c1 Fix bad logic black point estimator, improving threshold estimation performance (and adjust some == to .equals())
git-svn-id: https://zxing.googlecode.com/svn/trunk@417 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-11 19:59:38 +00:00
srowen 88afca0842 Unify UPC-A reader into EAN-13 reader since EAN-13 is a superset and we can take advantage of the commonality to improve performance.
git-svn-id: https://zxing.googlecode.com/svn/trunk@416 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-11 19:30:57 +00:00
dswitkin f431cae59f - Added support for rotation in our blackbox test framework, and refactored the ways tests are created and run.
- Turned on 0 and 180 degree rotation for all 1D formats.
- Turned on 0, 90, 180, and 270 degree rotation for QR.
- Changed the 1D code to re-enable upside down scanning, with a dramatic improvement in barcodes found and fewer false positives.

git-svn-id: https://zxing.googlecode.com/svn/trunk@411 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-11 00:05:51 +00:00
srowen 2cc9d7f630 Tiny bug fix, need to deal with no query params case correctly
git-svn-id: https://zxing.googlecode.com/svn/trunk@410 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-06-10 19:44:47 +00:00