Commit graph

38 commits

Author SHA1 Message Date
srowen 4f7bc9d8ab Don't use Build.VERSION_CODES as it's not in 1.5
git-svn-id: https://zxing.googlecode.com/svn/trunk@1595 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-09-18 10:45:38 +00:00
dswitkin@google.com aa94b2a633 Updated the ZXingText Ant file to match the Barcode Scanner one.
git-svn-id: https://zxing.googlecode.com/svn/trunk@1553 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-08-23 15:39:33 +00:00
srowen 87b0b9c8aa Tighten up some stuff I saw from the logs
git-svn-id: https://zxing.googlecode.com/svn/trunk@1344 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-05-08 20:56:31 +00:00
srowen 3a415a4994 Fix small compile error in javame/, update for Java ME SDK 3.x layout, finally disentangle Proguard location from WTK
git-svn-id: https://zxing.googlecode.com/svn/trunk@1302 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2010-04-12 08:59:41 +00:00
dswitkin 5cc1df3c92 Finished work on the local binarizer and renamed it to HybridBinarizer. It uses the old histogram for 1D and the new approach for 2D. The unit tests don't fully demonstrate how much better this is in real-world lighting, but it pretty much solves the situation of pointing at a QR Code for 30 seconds without scanning, due to a shadow or gradient.
HybridBinarizer is now the default across all the fast clients and the unit tests.

git-svn-id: https://zxing.googlecode.com/svn/trunk@1157 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-12-13 21:08:57 +00:00
dswitkin 01792f7460 Made the Android test app build with ProGuard again.
git-svn-id: https://zxing.googlecode.com/svn/trunk@1153 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-12-13 15:23:12 +00:00
dswitkin ac2ea432c0 Updated ZXing Test with all of the CameraManager fixes from Barcode Scanner, as well as making it high-dpi capable, and bumped the version to 1.12.
git-svn-id: https://zxing.googlecode.com/svn/trunk@1102 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-11-06 15:55:00 +00:00
dswitkin d2fea027ec The Donut (1.6) SDK is required to build all Android apps in the project.
git-svn-id: https://zxing.googlecode.com/svn/trunk@1099 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-11-05 22:08:13 +00:00
dswitkin fbae6e32e9 Changed the ZXing Test default email address and bumped the version to 1.11.
git-svn-id: https://zxing.googlecode.com/svn/trunk@1097 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-11-03 23:12:14 +00:00
dswitkin 77a263dd91 Extended the test app to write the camera parameters to /sdcard/CameraParameters.txt in addition to emailing them. Also bumped the version to 1.1.
git-svn-id: https://zxing.googlecode.com/svn/trunk@1063 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-09-25 21:38:26 +00:00
dswitkin 5e752acd25 Added a new feature to the test app, which captures all the device info and default camera parameters, then bundles them up into an email. This will make it very easy to get some important info about new devices from users (e.g. the HTC Hero which I don't have).
Also did a lot of other cleanup, added an about box, and prepared the app to be released on the Market.

git-svn-id: https://zxing.googlecode.com/svn/trunk@1045 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-09-02 21:06:00 +00:00
dswitkin 9dc583f556 Set a camera parameter to force the flash off. Also fixed the uninstall build targets.
git-svn-id: https://zxing.googlecode.com/svn/trunk@1024 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-07-21 21:36:33 +00:00
dswitkin d71c099313 Converted the Android client and the test app to use the Android 1.5 SDK, and to use a more efficient preview frame mechanism too. We now require devices to be running Cupcake or a newer version of the platform. This change temporarily removes the Proguard step, which Sean is going to add back.
git-svn-id: https://zxing.googlecode.com/svn/trunk@1023 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-07-21 19:33:25 +00:00
dswitkin cca4b72bfa Whoops, fixed long-standing bug in the benchmark. Never noticed before because we always used square images.
git-svn-id: https://zxing.googlecode.com/svn/trunk@1001 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-26 21:18:58 +00:00
dswitkin 8acb0017b1 Updated the Android Test app to use a wider viewfinder, to save images as PNGs instead of JPEGs, and to work on phones without a shutter button.
git-svn-id: https://zxing.googlecode.com/svn/trunk@996 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-26 18:48:14 +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
dswitkin 5edd5dab77 Calculated total time taken by the benchmark, and also reported it in the UI (in addition to logcat).
git-svn-id: https://zxing.googlecode.com/svn/trunk@966 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-06-08 19:17:34 +00:00
dswitkin 0827af1d89 Made the Android Test app debuggable so I can examine memory allocation patterns using DDMS (part of the Android SDK).
git-svn-id: https://zxing.googlecode.com/svn/trunk@957 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-05-27 18:10:47 +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
srowen f908920992 Tweak to compile with Android 1.5 but still work in 1.1
git-svn-id: https://zxing.googlecode.com/svn/trunk@908 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-04-15 09:58:54 +00:00
dswitkin 02f779cbee Fixed or removed a bunch of TODOs, and enforced the 100 columns limit in a bunch of places. Also allowed QR Codes to be encoded of contacts without names.
git-svn-id: https://zxing.googlecode.com/svn/trunk@907 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-04-13 21:20:11 +00:00
dswitkin c1bc060065 Changed the order of the BaseMonochromeBitmapSource constructor arguments to be width, height to match the rest of the codebase, and added two apparently missing methods to the J2ME subclass, although I can't test it.
git-svn-id: https://zxing.googlecode.com/svn/trunk@874 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-03-06 16:52:35 +00:00
srowen f2a9165b7c Refactored width/height values into superclass and enabled construction of RGBMonochromeBitmapSource from a Bitmap
git-svn-id: https://zxing.googlecode.com/svn/trunk@846 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-02-09 21:25:45 +00:00
srowen 1c539c66a4 Convert asserts to exceptions where the conditions could be false in a correct, bug-free program -- makes sure caller errors are caught and reported meaningfully
git-svn-id: https://zxing.googlecode.com/svn/trunk@840 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2009-02-05 13:06:19 +00:00
srowen 9433c5955b Add more unit tests for client.result, and more small code tweaks.
git-svn-id: https://zxing.googlecode.com/svn/trunk@809 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-12-30 15:31:25 +00:00
srowen 131cfe4c5c More reckless refactoring and code style tweaks -- mostly adding braces around conditional/loops, and using @Override
git-svn-id: https://zxing.googlecode.com/svn/trunk@784 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-12-11 23:34:49 +00:00
srowen 405aba0044 Latent bug I think from earlier change to List from Vector
git-svn-id: https://zxing.googlecode.com/svn/trunk@713 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-17 17:53:05 +00:00
srowen ad307ebc0b making stuff final, weakening types, etc. per IntelliJ analysis
git-svn-id: https://zxing.googlecode.com/svn/trunk@693 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-13 13:14:53 +00:00
dswitkin f21c34ae16 First pass at adding a UI for sharing data via QR Codes. There's now a Share button in the main capture menu which leads to a choice of contacts, bookmarks, and clipboard contents, which will be encoded and shown full screen. Launching the bookmarks picker currently crashes with a permission problem, which I'm investigating.
git-svn-id: https://zxing.googlecode.com/svn/trunk@681 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-10 20:35:33 +00:00
dswitkin 4c5c81e8a5 Added support for supplying a postal address when encoding a QR Code.
git-svn-id: https://zxing.googlecode.com/svn/trunk@670 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-06 16:13:16 +00:00
dswitkin 1ecf5c98fd Fixed the ZXing Test camera mode when using ProGuard.
git-svn-id: https://zxing.googlecode.com/svn/trunk@666 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-02 16:10:54 +00:00
dswitkin b3b945efcc Whoops, the benchmarks are in microseconds, not milliseconds.
git-svn-id: https://zxing.googlecode.com/svn/trunk@660 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-11-01 00:40:07 +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 43e155804f Looks like -allowaccessmodification to ProGuard results in a bogus binary. It compiles, but the Dalvik verifier rejects it at runtime. I'm removing this flag for now, which means we lose inlining on some important getters and setters.
git-svn-id: https://zxing.googlecode.com/svn/trunk@652 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-29 20:38:33 +00:00
dswitkin 1e478df248 Added androidtest to the top-level clean target and set it up for ProGuard too. Made both Android builds depend on clean so they work when switching between normal and ProGuard builds, and made install and reinstall use the latest binary instead of recompiling.
git-svn-id: https://zxing.googlecode.com/svn/trunk@651 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-29 20:13:05 +00:00
dswitkin 21e7813a60 Updated the Android benchmark with more accurate timing and better results output. Also fixed walking the tree to use a consistent order to make comparison between the device and emulator easier.
git-svn-id: https://zxing.googlecode.com/svn/trunk@644 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-27 16:30:36 +00:00
dswitkin de419268b8 Wrote a benchmark activity for Android which reads images recursively from the SD card, decodes each 10 times, and prints the average time to decode in milliseconds. The UI is extremely minimal, as the results are written to the log, but this is a good start towards measuring our performance under Dalvik on a platform without floating point hardware. This should run fine on the emulator but I haven't tested it yet.
git-svn-id: https://zxing.googlecode.com/svn/trunk@640 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-24 22:05:07 +00:00
dswitkin 15deb0c3d9 Checked in the ZXing Test app for Android under androidtest. This application exercises all the intents we support including scanning, encoding, and searching books. It also has a special camera mode which saves greyscale images to the SD card which I use to generate blackbox images.
git-svn-id: https://zxing.googlecode.com/svn/trunk@629 59b500cc-1b3d-0410-9834-0bbf25fbcc57
2008-10-21 21:55:15 +00:00