srowen
9f475ac33e
Small detector simplification that addresses issue 215 and picks up a net +4 more images decoded in tests
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@1022 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-07-21 09:39:31 +00:00
srowen
636c00e844
Another tweak to get some valid ISO-8859-1 strings like "frédéric" to be guessed correctly
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@1021 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-07-17 09:30:46 +00:00
dswitkin
54e6ed418a
More x, y cleanup and 100 column fixes.
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@1017 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-07-08 21:17:52 +00:00
dswitkin
402880798c
Modified my skew correction code to also work upside down, meaning we now decode three more inverted PDF 417 images.
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@1016 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-07-08 20:38:21 +00:00
dswitkin
b238cb7828
I noticed that the codeword coordinates in PDF 417 barcodes were a few pixels off if there was skew or rotation in the image. I added a simple method to correct the vertical component of these points, and the units tests went from 8/23 to 11/23.
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@1015 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-07-02 20:07:09 +00:00
dswitkin
0944a2bb18
Got 180 degree rotation working for PDF 417, and turned on the appropriate unit tests as a result.
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@1014 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-07-01 19:42:52 +00:00
dswitkin
af2ce46c37
Cleaned up a number of comments and code to fit in 100 columns and added some TODO items.
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@1013 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-07-01 16:35:05 +00:00
dswitkin
e44f00ba75
Converted the last user of the old MonochromeBitmapSource-style calls over to BitMatrix, and removed these deprecated methods.
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@1012 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-07-01 16:13:25 +00:00
dswitkin
c31b489efe
Added the second PDF 417 test to the AllPositiveBlackBoxTester.
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@1011 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-07-01 15:13:44 +00:00
dswitkin
01eed5266e
- Converted parts of the PDF 417 reader to use BitMatrix.
...
- Changed the PDF 417 detector to search the image more broadly, instead of assuming the barcode starts in the left 1/4 and ends in the right 1/4. We now get 8/23 on the real-world blackbox test, and we'll probably do even better with further improvements here.
- Added a quiet zone to two of the unit test images and updated a golden result for one of them. We now get 3/7 on the first test.
- Tried to fix some bugs in the upside down code but it still doesn't work.
git-svn-id: https://zxing.googlecode.com/svn/trunk@1010 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-30 21:55:19 +00:00
dswitkin
0667b29155
Added the PDF 417 blackbox tests to the test-blackbox Ant target.
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@1009 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-30 18:51:43 +00:00
dswitkin
f5124cec37
Created a new blackbox unit test of real-world PDF 417 images taken with an Android device. Currently we decode 0/23.
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@1008 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-30 18:47:34 +00:00
dswitkin
2397216901
Added a few computer-generated PDF 417 barcodes to the blackbox tests. The current code doesn't seem to handle more advanced error correction modes.
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@1007 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-30 17:32:12 +00:00
dswitkin
eb8b9677cf
Added the previous Android benchmark I've been using to track performance, as well as a new one which uses wider images and therefore twice as many pixels.
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@1006 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-29 22:08:38 +00:00
dswitkin
e2324bc2ae
Added slightly better blackbox unit test stats.
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@1005 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-29 21:57:59 +00:00
dswitkin
10dfe7789b
- Got the DataMatrix decoder compiling again with a quick bandaid.
...
- Fixed two bugs in the LocalBlockBinarizer sharpening routine. It can now decode 2132 images in our blackbox tests, compared to 2103 using the global histogram approach.
- Added the PDF 417 blackbox test to AllPositiveBlackBoxTester, and allowed it to complete even if the tests fail.
git-svn-id: https://zxing.googlecode.com/svn/trunk@1004 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-29 15:49:42 +00:00
srowen
597fcfb23d
Code analysis tweaks
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@1003 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-28 16:33:02 +00:00
srowen
550511d760
Remove use of BinaryBitmap in QR Code, DM
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@999 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-26 19:22:48 +00:00
dswitkin
ce1badea71
Sean had a good idea to add @deprecated Javadoc comments to these three methods to help track down their usage. We can't use a Java @Deprecated annotation because core builds against Java 1.2.
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@998 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-26 19:04:12 +00:00
dswitkin
167197ec7a
Refactored the MonochromeBitmapSource class hierarchy into LuminanceSource, Binarizer, and BinaryBitmap classes. The unit tests pass and I believe the change is complete, but there are some clients like J2ME and Bug that I can't build.
...
This change will allow new thresholding algorithms to be developed and tested, as well as implemented per platform if needed (e.g. in JNI on Android). It should also perform better when multiple 2D Readers are installed, because the underlying image will only be converted to 1 bit once. It also allows some platforms to return luminance data without a copy.
The current state of this checkin is to use the old black point algorithm, which now lives in GlobalHistogramBinarizer. This will be our benchmark and fallback for slower platforms. Going forward we will begin to use LocalBlockBinarizer as I shake out the edge cases and tune it for performance. Currently it is unused.
IMPORTANT: I have temporarily included three methods from MonochromeBitmapSource at the end of BinaryBitmap as a way to make this change in stages. They are deprecated and will be removed soon. All of the Reader classes will need to change the way they examine 1 bit pixels to use the new getBlackRow() and getBlackMatrix() calls.
git-svn-id: https://zxing.googlecode.com/svn/trunk@993 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-26 17:49:45 +00:00
kev.sully
974fb5e403
ISSUE: http://code.google.com/p/zxing/issues/detail?id=42
...
Added PDF417 to list of readers. Will be used only if its specified in a Hint.
git-svn-id: https://zxing.googlecode.com/svn/trunk@987 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-26 14:34:16 +00:00
dswitkin
da4f56b022
Fixed some code which was ignoring the result of MonochromeBitmapSource calls, which may work in some cases but isn't legal and failed and in some experiments.
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@986 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-25 19:46:49 +00:00
srowen
969088fa82
Style changes mostly
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@985 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-24 13:19:53 +00:00
kev.sully
372dfa1145
ISSUE: http://code.google.com/p/zxing/issues/detail?id=42
...
Added PDF417 to list of readers. Will be used only if its specified in a Hint.
git-svn-id: https://zxing.googlecode.com/svn/trunk@984 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-24 10:03:37 +00:00
kev.sully
ffbbda2086
ISSUE: http://code.google.com/p/zxing/issues/detail?id=42
...
Added PDF417 to list of readers. Will be used only if its specified in a Hint.
git-svn-id: https://zxing.googlecode.com/svn/trunk@983 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-24 10:02:58 +00:00
kev.sully
db23e7c3b1
ISSUE: http://code.google.com/p/zxing/issues/detail?id=42
...
Added PDF417 to list of readers. Will be used only if its specified in a Hint.
git-svn-id: https://zxing.googlecode.com/svn/trunk@982 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-24 10:02:27 +00:00
kev.sully
36db720dac
ISSUE: http://code.google.com/p/zxing/issues/detail?id=42
...
Added PDF417 to list of readers. Will be used only if its specified in a Hint.
git-svn-id: https://zxing.googlecode.com/svn/trunk@981 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-24 10:02:04 +00:00
kev.sully
f80399966f
ISSUE: http://code.google.com/p/zxing/issues/detail?id=42
...
Added PDF417 to list of readers. Will be used only if its specified in a Hint.
git-svn-id: https://zxing.googlecode.com/svn/trunk@980 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-24 10:01:47 +00:00
dswitkin
6367973b49
Added a clear() method to BitMatrix.
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@979 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-23 21:05:09 +00:00
dswitkin
b613112615
Rewrote BitMatrix to allow rectangular 2D arrays, and so that every row begins with a new int, which makes it fast to copy out rows into BitArrays. This will be the basis of the upcoming bitmap refactoring for 1D Readers.
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@978 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-22 21:03:34 +00:00
dswitkin
7fec06465a
Continuing with the x, y coordinate push, BitMatrix is now standardized. I also converted DataMask back to i, j for now to be consistent with the rest of the QR module, and made sure all the tests still pass.
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@977 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-22 19:52:51 +00:00
srowen
4b7e5e6461
Remove getBits()
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@976 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-22 17:48:37 +00:00
dswitkin
5f2b64ee50
Used IntelliJ's amazing refactoring functions to change the argument ordering of ByteMatrix. I want to standardize this across ZXing: the first component should always be horizontal and the second vertical, whether supplying an x, y point or a width, height pair. Also, we should always use x and y as variables with x being the horizontal component to avoid confusion.
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@975 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-22 15:50:08 +00:00
dswitkin
406f353e53
Modified some comments to reflect that these objects are thread-safe but not reentrant.
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@974 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-22 15:32:59 +00:00
dswitkin
0c3a4b4b5a
Updated some comments about thread safety and fixed one easy case. Sean, please have a look.
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@973 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-19 19:08:31 +00:00
srowen
63a1dc62a3
Issue 198
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@972 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-19 13:23:09 +00:00
dswitkin
9f509172b6
Wrote a quick command line app to calculate how many total images are passing our blackbox unit tests. This could use some improvement but it's a start.
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@971 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-18 20:55:42 +00:00
dswitkin
1da9bd60b3
Added a new blackbox test with extreme shadows and highlights. We do pretty poorly on this, but I've been experimenting with local thresholding algorithms which are a night and day improvement.
...
Also made the ImageConverter app ignore some kinds of files.
git-svn-id: https://zxing.googlecode.com/svn/trunk@969 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-16 18:47:34 +00:00
srowen
5c17a1ad71
Added getBlackDiagonal() which I likely want to use later
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@968 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-11 13:42:39 +00:00
dswitkin
c07fad6410
Created a new QR blackbox test with difficult exposures, mostly self-shadowing cases. We only get 34 out of 120 tests, which is about what I expected. To fix these we will have to move away from a global black point and towards a more sophisticated local thresholding algorithm.
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@961 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-05-28 18:45:48 +00:00
dswitkin
932715065b
Only allocate a StringBuffer if the start pattern has been found successfully in the ITFReader.
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@958 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-05-27 21:11:10 +00:00
srowen
dbb2c31a40
Fixed an old misspelling and a few tiny tweaks
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@956 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-05-27 10:03:23 +00:00
srowen
58c367d9ea
Improvement to Shift_JIS encoding detector to avoid detecting some UTF-8 strings as Shift_JIS
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@955 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-05-27 09:14:17 +00:00
srowen
78c1b8ccd7
Oops, one more fix to rotateCounterClockwise() here
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@952 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-05-24 13:06:51 +00:00
srowen
4282827336
More intelligence to avoid very deep recursion
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@951 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-05-23 10:33:53 +00:00
dswitkin
ec77a581d2
Changed the 2D histogram calculation to sample four rows spread across the image rather than taking a diagonal. We get a net increase of 63 blackbox tests with this change.
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@950 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-05-22 20:59:15 +00:00
srowen
825d99786d
Off by one error in last change
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@949 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-05-22 08:19:11 +00:00
dswitkin
51ade2ca96
Added better logging for our blackbox tests. It now displays the number of images which passes per test out of the total, and the percentage. It also warns when a blackbox test is too lax (i.e. we've made decoding improvements but haven't raised the high water mark).
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@947 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-05-21 21:18:27 +00:00
dswitkin
6687d5772f
Fixed a typo in our golden results.
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@946 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-05-21 20:29:56 +00:00
dswitkin
e19e9a83f6
I moved a chunk of the histogram/black point code out of BaseMonochromeBitmapSource and into BlackPointEstimator which makes a lot more sense. Unfortunately I had to expose three new methods and touch a bunch of files. But I did manage to reuse an array on subsequent calls, which was being allocated on every row scanned, so that might be a bit faster. It will also be easier to convert this code to JNI in the future if we want to, and/or do more advanced thresholding.
...
git-svn-id: https://zxing.googlecode.com/svn/trunk@945 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-05-21 19:56:25 +00:00