| MIL 10 User Guide
| Customize Help

MIL code module



See also
User Guide:
Availability
Not available in MIL-Lite

Available in MIL

Many industries label products using symbols from symbologies such as UPC-A bar codes and PDF417 cross-row codes. This is done for identification purposes during different stages of production and distribution. Each symbology, known as a code type in MIL, follows a different set of rules to encode the data into light and dark patterns.

MIL can both read symbols from and write symbols to images. To read symbols, MIL searches for specified code types in an image and decodes them. The decoded strings can then be used to identify the object, or objects, in the image. To write a symbol, MIL encodes a string into a symbol using the specified code type and encoding scheme. The resulting image of the symbol can then be rotated, combined with text on a logo, and then printed. In MIL, symbols are known as codes.

MIL also allows you to grade the quality of the codes to check if the codes meet your quality specifications. To grade a code, MIL computes the quality-grade of the code in the specified source image.

MIL supports 1D, 2D, and composite code types:

  • One-dimensional (1D) code types. These are linear bar codes used to represent data with vertical bars and spaces. These code types are typically used to represent short strings (for example, the identification number for a grocery store item, or a stock room part number).

  • Two-dimensional (2D) code types. These are cross-row and matrix codes used to represent data with blocks stacked within a predetermined grid (that is, in or potentially spanning 1 or more rows and/or columns). 2D code types can store more information than 1D code types. These code types are typically used to represent longer strings (for example, postage and paper boarding passes).

  • Composite code types. These are a combination of specific 1D and 2D code types. The 1D code type component encodes the item's primary identification, while the 2D code type component encodes additional data (for example, batch number or expiration date).

The MIL Code module supports read operations for multiple 1D codes, and for multiple 2D Data Matrix codes in the same source image. Multiple codes can be graded so long as they are all of the same code type.

For examples of supported code types, see the Supported code types section later in this chapter.

Some code types support several methods of encoding, known as encoding schemes. This means a code type might, for example, support an encoding scheme of alpha characters only, numeric characters only, or both alpha and numeric characters. In addition, some code types can support any number of characters, while others need a fixed number.

If the bar code is degraded, codes can still be read if an error correction scheme was used when the code was generated. Error correction is essentially redundant data included in the encoding scheme of some code types. Some error correction schemes are used only for error detection, while others are used for error detection and recovery. For more information, see the Supported code types section later in this chapter.

The MIL Code module only supports 8-bit unsigned 1-band image buffers. Performing a code operation on buffers in other formats will produce an error.