How do I decode a Data Matrix barcode using the raw code word data?

조회 수: 6 (최근 30일)
Nathan
Nathan 2012년 9월 28일
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개)

카테고리

Help CenterFile Exchange에서 Data Import and Management에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by