How do I decode a Data Matrix barcode using the raw code word data?
Afficher commentaires plus anciens
I am working on Image Processing techniques to binarize a Data Matrix barcode image. I create a matrix of 1's and 0's. I want to be able to pass that raw data into a function to spit out the resulting code. All decoding software/algorithms must have a function for this last step so this should be easily done.
For instance, if I have this 8X18 Data Matrix Barcode (with optional zero padding)
bits = [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 0;
0 0 1 1 0 0 0 0 0 0 0 1 0 1 1 0 1 1 0 1 0 0;
0 0 1 1 0 0 1 0 0 1 0 1 1 0 1 0 0 1 0 0 0 0;
0 0 1 0 0 0 1 1 1 0 1 0 1 1 0 0 1 1 0 1 0 0;
0 0 1 0 1 1 1 0 1 0 0 1 1 1 1 0 1 0 0 0 0 0;
0 0 1 0 1 0 1 1 0 1 0 0 0 0 1 0 1 0 1 1 0 0;
0 0 1 1 1 1 0 0 1 0 1 0 1 0 0 0 0 0 1 0 0 0;
0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0;
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ];
DMstring = DecodeDataMatrix(bits);
This function I envision should easily be able to return the decoded string (assuming I have given a valid code):
DMstring = 0030140059
Réponses (0)
Catégories
En savoir plus sur Data Import and Management dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!