Coder Social home page Coder Social logo

datamatrix-rs's People

Contributors

jannschu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

sirhcel

datamatrix-rs's Issues

How to debug a data matrix ErrorCorrection error?

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.