How do I decode a Data Matrix barcode using the raw code word data?
8 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Import and Management 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!