Re: Re: Bar code choice

From: Alan Dechert <adechert_at_earthlink_dot_net>
Date: Mon Sep 08 2003 - 13:27:31 CDT

Jan,
>
> I believe the way to get the most compact barcode is to use
> the character set C (that makes a compact representation of
> digits-only strings). If one interprets the 116-bit string
> as a binary number and writes it in decimal form, one gets a
> number with at most 35 digits. This can be encoded in Code128
> using 22 symbols (17 pairs of digits each represented by one
> symbol, one shift character, the 35th digit, plus the mandatory
> three start, stop and checksum characters). What is needed is
> code that converts big binary numbers to decimal (string).
> I have never programmed in Python, but I believe there is
> support for arithmetic with big integers. I have the necessary
> code to convert the decimal string into what should be printed
> using my font. It is a Perl script, but it ought to be easy to
> translate to Python.
>
> As an experiment, I printed out the bar code representation
> of the number 2**116 at approximately the same size as on the
> sample ballot. The bar code became 65 millimeters
>
Okay, 22 symbols doesn't sound too bad. At a minimum, we'll need to add
probably 2 more for the ballot number (4-digit number). We've thought about
encoding more information in the barcode but I'm inclined to think that we
only need to encode the selections and the ballot number for the demo.

You are not really using any compression, though. You're just taking the
binary number and converting to decimal.

Maybe you could have a look at the Arthur's paper ("A Version Numbering
Scheme with a Useful Lexicographical Order") mentioned here:
http://gnosis.python-hosting.com/voting-project/August.2003/0237.html

Do you think that, using Arthur's scheme, you could write a function to take
the 116-bit string and return a shorter string? I don't know if it's worth
it. Maybe get Arthur to write the function.

> (that is
> about 2 1/2 inches for those of you that need to modernize your
> measuring system as well ;-).
>
I appreciate your sensitivity to our backwardness. Still, my foot is about
a foot long (really close with shoes on). I like that.

> I printed it on an HP laserjet
> at 600 dpi, and read it back successfully several times with
> my bar code reader. This must of course be tested thoroughly,
> with the equipment that will be used at the demo, before
> deciding what font size to use.
>
Your diligence noted.

>
> > Can your
> > fonts be read by the CueCat scanners? I can get these scanners for
about
> > US$2 ea.
> >
>
> I have no experience of CueCat, but a Google search gave some
> documents that seem to indicate that it can handle Code 128,
> but it only supports character sets B and C, and no mixing of
> them. If that is correct one cannot switch between digit pairs
> and a single digit as I indicated above. But then we can simply
> add a leading zero to the decimal string, when necessary, to
> make the number of digits even. The bar code will still be the
> same size, since the extra zero added is compensated by not
> having to add the switch character.
>
I'd like to get it working with a CueCat. If we can demo free software with
a two dollar scanner, we'll look pretty efficient (actually, the CueCats
were given away free at one time).

Thanks.

Alan D.

==================================================================
= The content of this message, with the exception of any external
= quotations under fair use, are released to the Public Domain
==================================================================
Received on Tue Sep 30 23:17:02 2003

This archive was generated by hypermail 2.1.8 : Tue Sep 30 2003 - 23:17:09 CDT