Se simpler way to go, probably, was to print the images you have and use a keyboard connectable scanner to parse the barcodes you have.

But if you want an alternative to that, you will need to:
  1. Parse the Image and transform it in a representation you can easly parse, for example, 0 for a white bar, 1 for a black bar and L for a long bar.
  2. For most bar encodings (and specificly for EAN13) you can remove the initial and final "L0L" and the middle "0L0L0".
  3. Now you need to convert each group of 7 "0" and "1" to a number.
  4. You will need to guess which is the first digit, as it is not encoded in the barcode, but you can find out which it is by comparing the sequence of encondings used in the bar code.

Note: You need to use the width of the long bar (not it's height) to know if a bar is a single binary digit or more than one. A slim bar is a digit, a large on is two, or even three or four digits. For example, 6 using L-Code have 4 consecutive "1" digits (black bars) and using G or R-Code have the same 4 but "0" digits (white bars).

More info at wikipedia.


In reply to Re: Barcode Recognition by themage
in thread Barcode Recognition by avo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.