Commit graph

387 commits

Author SHA1 Message Date
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
srowen a73fc5919a Added SMSTO support, added subject/body param support in mailto:, improved handling of mailto: and tel: URIs
git-svn-id: https://zxing.googlecode.com/svn/trunk@402 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-05-23 22:40:13 +00:00
srowen c2c8b2fcfb Added handy toString() methods
git-svn-id: https://zxing.googlecode.com/svn/trunk@401 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-05-23 22:20:10 +00:00
srowen 8d31073968 Detector is now a little more skeptical once it has found 3 confirmed finder patterns -- one may be a false positive, so it also checks to see if the estimated module sizes are "pretty similar". If not, keeps looking.
git-svn-id: https://zxing.googlecode.com/svn/trunk@394 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-05-08 15:12:44 +00:00
srowen 40f2cf1a80 Fix some minor javadoc issues
git-svn-id: https://zxing.googlecode.com/svn/trunk@388 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-05-05 17:56:47 +00:00
srowen 08c7c6fadb Checking in somewhat ugly 'fix' for ArrayIndexOutOfBoundsException in rare cases
git-svn-id: https://zxing.googlecode.com/svn/trunk@385 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-05-05 17:31:31 +00:00
srowen 635d904283 Many more little tweaks from IntelliJ inspections
git-svn-id: https://zxing.googlecode.com/svn/trunk@382 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-05-02 19:18:14 +00:00
srowen 188c7fbecb Added preliminary support for MobileTag formats; not enabled yet.
Added "sms:" URI support.

git-svn-id: https://zxing.googlecode.com/svn/trunk@380 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-05-02 18:39:03 +00:00
dswitkin 0987663963 Added some simple sharpening for 1D decoding which allowed a couple more blackbox images to pass. There were a few cases where the format or content is now misdetected, but since the net gain was positive I decided to make those non-fatal errors. In real world use the sharpening seems to help, and I think we can do even better with a better algorithm.
git-svn-id: https://zxing.googlecode.com/svn/trunk@372 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-04-21 18:11:02 +00:00
dswitkin a69a87e98d Replaced the smaller, resized EAN13-2 test images with the full-size originals.
git-svn-id: https://zxing.googlecode.com/svn/trunk@370 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-04-19 18:38:52 +00:00
srowen df25fc1389 Separate out test-unit and test-blackbox targets for running different sorts of tests
git-svn-id: https://zxing.googlecode.com/svn/trunk@369 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-04-18 17:03:04 +00:00
dswitkin 9eceb0593e Added a new test library of 16 blurry EAN-13 barcodes. Currently we cannot decode any of them. I'm checking these in as a baseline so we can evaluate various sharpening techniques.
git-svn-id: https://zxing.googlecode.com/svn/trunk@368 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-04-18 15:51:39 +00:00
dswitkin a2662ebb40 Changed the black box tests to require an absolute number of images to decode successfully, instead of a percentage, and set the high water mark for each test.
git-svn-id: https://zxing.googlecode.com/svn/trunk@367 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-04-18 14:43:56 +00:00
dswitkin a816d5d9b1 Changed the parsing logic to refer to EAN-8 and EAN-13 as UPCs as well, so that the clients can recognize them as product barcodes and offer to do a product search.
git-svn-id: https://zxing.googlecode.com/svn/trunk@366 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-04-18 14:30:02 +00:00
srowen 989dc395f0 Added workaround for NoSuchMethodError on some Nokia JVMs with a superfluous abstract method (thanks Marnix)
git-svn-id: https://zxing.googlecode.com/svn/trunk@364 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-04-16 00:38:54 +00:00
dswitkin ae54d7a937 Changed how many rows we scan while detecting QR finder patterns. The mobile case dynamically calculates this based on the height of the image, and ranges from a small speedup to a big difference for large inputs. Also changed the try harder case to scan every 3rd line for a 3x speedup. The unit tests have the same success rate as before: 16/20 on qr1, 10/10 on qr2.
git-svn-id: https://zxing.googlecode.com/svn/trunk@354 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-04-10 20:26:42 +00:00
srowen 1c9b906442 Workaround for codes that fail to include (required) final TERMINATOR mode indicator
git-svn-id: https://zxing.googlecode.com/svn/trunk@351 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-04-07 22:05:40 +00:00
srowen a5b385e764 Standardize array initializer syntax to use the form without "new type[]", to be consistent and make translation to C++ easier
git-svn-id: https://zxing.googlecode.com/svn/trunk@348 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-04-07 19:42:35 +00:00
srowen 9c1b4a1393 Make two methods public for easier reuse by third-party implementaitons
git-svn-id: https://zxing.googlecode.com/svn/trunk@345 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-04-04 16:34:42 +00:00
srowen 5f25bd00a3 Moved the "geo:" fix to the 'right' place
git-svn-id: https://zxing.googlecode.com/svn/trunk@343 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-04-03 22:18:16 +00:00
mschulkind 87da7e9226 small typo fix.
git-svn-id: https://zxing.googlecode.com/svn/trunk@341 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-04-03 20:34:30 +00:00
srowen d1d7e96238 At last, removing SKIP_N_BARCODES and separating this logic out in a way that individual projects can implement it on their own. It's a bit too onerous and project-specific to live on in the main code.
git-svn-id: https://zxing.googlecode.com/svn/trunk@340 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-04-03 16:39:44 +00:00
srowen 28ea8e02f0 Parsing wasn't correctly ignoring the ':' in prefix!
git-svn-id: https://zxing.googlecode.com/svn/trunk@339 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-04-03 16:12:08 +00:00
srowen 0e7872020c Another fix to ensure that 2 barcodes with the same info are counted separately.
git-svn-id: https://zxing.googlecode.com/svn/trunk@338 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-04-03 15:39:06 +00:00
srowen 01075819c5 "Skip 0 barcodes" was incorrectly not returning the first barcode found
git-svn-id: https://zxing.googlecode.com/svn/trunk@337 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-04-02 14:03:02 +00:00
srowen 012a8c0ce7 Fixed same ResultPoint bug in Code 128 and Code 39 reader; added convenient toString() to Result and GenericResultPoint; added arg checking for Result constructor too
git-svn-id: https://zxing.googlecode.com/svn/trunk@336 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-04-02 13:40:29 +00:00
dswitkin f299f413e0 Fixed the result points for 1D decoding so that we once again get a green line in the Android client across the successful row.
git-svn-id: https://zxing.googlecode.com/svn/trunk@335 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-04-01 21:23:14 +00:00
srowen 11fc234d76 Completed basic support for NFC / NDEF formats applicable to 2D barcodes. Not yet enabled.
git-svn-id: https://zxing.googlecode.com/svn/trunk@329 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-03-31 20:51:24 +00:00