jannschu / datamatrix-rs Goto Github PK
View Code? Open in Web Editor NEWData Matrix (ECC 200) encoding and decoding library in Rust
License: Apache License 2.0
Data Matrix (ECC 200) encoding and decoding library in Rust
License: Apache License 2.0
I have found a data matrix and trying to decode it.
I tried using datamatrix-rs wit the following code:
fn main() {
let input_str = std::fs::read_to_string("datamatrix.txt").unwrap();
let pixels = input_str.chars().filter_map(|b| match b {
'1' => Some(true),
'0' => Some(false),
_ => None,
}).collect::<Vec<_>>();
let width = 48;
let data = datamatrix::DataMatrix::decode(&pixels, width);
println!("{:?}", data.unwrap());
}`
Here is the contents of datamatrix.txt
101010101010101010101010101010101010101010101010
100101001000001001010001101000010101010010111101
110010100001000111101110111111011100101000001100
110001110000001011000011100110101100011100010001
101011100011100001000110110100011010111000011000
100010001001011011001101101100010000100010000101
100011000101100010011010111001110000110001101000
110000001001100001110111100110111100000010000001
100101000111001011100000100010100101010001011110
111000111111000001001011110011010110001111110101
110001100110001000001100100111011100011001100010
100011010001101100100001111010100000110100100111
111010110010111000011100101100111110101100011000
110010001001011010011101101101010100100010100001
111101100110000101101110101000000111011001100000
111111111111111111111111111111111111111111111111
Is there any way to debug the data matrix to tell where the input data is wrong?
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.