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!