Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DataMatrix Barcode Decoding question

115 views
Skip to first unread message

Jamie Tan

unread,
Dec 19, 2002, 10:38:40 AM12/19/02
to
Any DataMatrix barcode expert here?

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

J

unread,
Dec 19, 2002, 12:52:03 PM12/19/02
to
It is because your second and third C40 values are calculated wrong:

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...

Jamie Tan

unread,
Dec 19, 2002, 1:51:04 PM12/19/02
to
thanks for the help.
"J" <J...@com.com> wrote in message
news:3e020749$0$136$9a6e...@news.newshosting.com...

J

unread,
Dec 19, 2002, 2:16:35 PM12/19/02
to
You are welcome.

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...

J

unread,
Dec 19, 2002, 2:25:02 PM12/19/02
to
That is:

> - do you know of any QR code decoder algorithms?


"J" <J...@com.com> wrote in message

news:3e021b26$0$151$9a6e...@news.newshosting.com...

0 new messages