I am having a problem decoding a DataMatrix barcode. It is a 18x18 barcode,
encoded with a string "P5803.....". I used a handheld reader and verified
the encoding is correct. However, when I try to read it by myself with my
own image processing code, I am having trouble decoding the "58". I read all
other characters correctly. After passing ReedSolomon correction, the code
words are: 230 (latch to C40), 182,181,254(unlatch),133,... From the code
words 182 and 181, I calculated the three C40 values: 29,2,36. From the C40
character set table, 29 is 'P', 2 is Shift3, and 36 in the Shift3 Set is
undefined. I do not understand how I can get a "58" from the C40 values of 2
and 36.
I am using the spec ANSI/AIM BC11-1997, published by AIM.
Thanks for any help.
Jamie Tan
C40_sum = 182*256 + 181 - 1 = 46772
1'st C40 byte: C40_sum / 1600 = 29 = 'P'
2'nd C40 byte: (C40_sum - (1600*29)) / 40 = 9 = '5'
3'rd C40 byte: C40_sum - (1600*29) - (40*9) = 12 = '8'
hence you get the decoded string: "P58"
--
Jens
"Jamie Tan" <jt...@alum.mit.edu> wrote in message
news:v03pvvb...@corp.supernews.com...
A couple of questions:
- what are you using your DM decoder algorithm for - is it educational?
- do you know if any QR code decoder algorithms?
Thanks
Jens
"Jamie Tan" <jt...@alum.mit.edu> wrote in message
news:v0458nj...@corp.supernews.com...
> - do you know of any QR code decoder algorithms?
"J" <J...@com.com> wrote in message
news:3e021b26$0$151$9a6e...@news.newshosting.com...