Comments (7)
@hschimke Thank you for all the suggestions. Happy to work on all of those; give me a few days and I'll come back to you. In the meantime, have a Happy New Year!
from rxing.
Looks ready for a PR! I didn't see anything looking through just now but I'll do a proper review on the PR.
from rxing.
Merged, it's been a pleasure working with you!
from rxing.
@cpwood I'm absolutely interested in bringing your fork into rxing. Telepen seems like a perfect addition.
I have a couple thoughts before we do a PR:
-
You have a TelepenCommon struct in src/oned/telepen_common.rs. The rust way to do this is likely with a module rather than a struct.
-
If possible I'd like a handful more test images, perhaps around 10.
-
Please add a unit test for the telepen checksum function in TelepenCommon
-
There are two variants of Telepen: alphanumeric and numeric. Numeric is actually just an interpretation of the ASCII alphanumeric data returned after interpreting the barcodes, so this is left as an exercise for the user, however I can provide code samples. As such, only alphanumeric is implemented.
If you wanted to offer the ability to decode either based on expectation, you could add this through the DecodeHints enum. Not required, of course, just an option if you thought that the functionality was useful to include.
I think, given the content of this, I'd roll it up into the next release (v0.5). I have a change to the features list that I was planning to include in that release as well.
Thanks for your submission, I look forward to the PR.
from rxing.
@hschimke I've now done the changes you requested.
telepen_common.rs
is now a mod;- There are now 12 test cases overall:
- 5 alphanumeric tests
- 7 numeric tests
- Numeric decoding has been supported as you suggested, by introducing a hint.
- The additional test imagery are real photos taken at my local library today, as opposed to computer-generated bitmaps.
- Unit tests now exist for the checksum function, and also for the alpha -> numeric and numeric -> alpha routines in there too.
All tests pass.
As per previous comments, it's the same code for alphanumeric and numeric, it's just there's a conversion from ASCII to numeric that happens after the barcode decoding is complete with numeric. In essence, therefore, the 7 numeric tests also test the alphanumeric functionality too.
Will leave it with you to review! Let me know if you need anything further?
from rxing.
Merged, it's been a pleasure working with you!
Likewise! I really appreciated the time you took to point me in the right direction! Looking forward to the 1.5 WASM build!
from rxing.
Built and published as v0.2.0.
I tested and verified that it is decoding Telepen with the demo site https://scan.rxing.org (which uses the latest version of the npm package)
from rxing.
Related Issues (20)
- Possible Use for Generics HOT 7
- Decouple encoding crate from library
- Add Benchmarks
- Add special case reader for multiple reuse situations
- Enable all ECI encodings HOT 1
- Library should support MicroQR HOT 1
- Port Updated qrcode decode / detect from zxing-cpp HOT 3
- detect_in_luma supports only square input HOT 14
- get in BitMatrix goes out of bounds for Maxicode in certain image. HOT 4
- encoding pdf417_compact has extra white space HOT 2
- Barcode rotate bug HOT 2
- rxing-cli fails to build HOT 2
- Index out of bounds in FitQadrilateralToPoints try_get_range HOT 4
- Join forces with zxing-cpp? HOT 11
- Using webcam images in buffer HOT 2
- Move to a more βrustβ appropriate DecodeOptions approach
- Performance Tuning
- Bug with aztec binary data? HOT 4
- The multiple barcodes decoder issue HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rxing.