Barcode library

Barcode library or Barcode SDK is a software library that can be used to add barcode features to desktop, web, mobile or embedded applications. Barcode library presents sets of subroutines or objects which allow to create barcode images and put them on surfaces or recognize machine-encoded text / data from scanned or captured by camera images with embedded barcodes. The library can support two modes: generation and recognition mode, some libraries support barcode reading and writing in the same way, but some libraries support only one mode.
At this time barcode technology allows to add machine reading tags or machine reading additional data to any object of real world with less than one cent cost. and use any of camera equipped device to identify additional data about an object. In this way, combination of barcode technology and barcode library allows to implement with low cost any automatic document processing application, OMR application, package tracking application or even augmented reality application.
The first Barcode SDKs were not implemented as software libraries but as standalone applications for DOS and Windows and as Barcode fonts. At that time barcodes were used mostly in retail and for internal corporation needs, thus barcode users looked for all-inclusive hardware solutions to generate, print and recognize barcodes.
The situation changed when camera equipped devices (like mobile phones) and document scanners became common for everyday usage. Because barcodes could be scanned and recognized on common ordinary equipment and industrial and office users did not need to obtain expensive specialized one-function devices for barcode reading, the need for barcode writing and reading SDKs and libraries increased.
Barcode writing libraries already had been implemented as barcode fonts or standalone applications in projects like GNU Barcode or Zint. Implementation of a barcode writing library does not require hard Computer Science skills because it just need to follow AIM or ISO specifications. It does not have any difference from encoding data in special file format.
2D barcodes encoding is more difficult because 2D barcodes instead of 1D barcodes have additional encoding data like columns, rows, ECI or data correction options. Some 2D barcodes like MaxiCode or Pdf 417 also have special encoding fields like Post Address or metadata which convert these barcodes in multiple graphical files. These differences could not be solved by barcode fonts usage and required API with multiple parameters processing.
Barcode reading libraries are more complex, requiring Computer Vision techniques. However, they can be run on common camera or scanner equipped devices. The first libraries could recognize only 1D barcodes by laser scanners mode emulation. This mode captured the whole image but then library made some scan-lines with Bresenham's algorithm and tried to recognize data from these lines as hardware laser scanners did. The bright representation of these libraries is early ZXing project supported by Google, ZBar or other solutions.
For the recognition of 2D barcodes laser scanners mode emulation is not suitable. Moreover, this method has difficulty with barcode area detection, which causes problems with 1D angled barcode detection. More complicated methods from Computer Vision were implemented to improve recognition quality for 1D and 2D barcodes.
Barcode libraries have provided low cost automatic identification and data capture features to various fields of services and industry. This can be entertainment, healthcare, postal services, such as document processing or retail applications.
They can be used for:
Barcode libraries and or Barcode SDKs can be split in different types, which is based on their functionality:
The first barcode libraries were fully transparent to user and used as simple printing text with specialized TrueType Fonts. This works well for 1D barcodes, because 1D barcode just the same as linear text, sometimes with checksum. Usage of Barcode Fonts with 2D barcodes also possible but it has problem with metadata processing like setting barcode row and columns and metadata. This is solved with predefined different metadata values in set of fonts for the same type of barcode.
Barcode libraries with API calls have more customization features in writing and reading modes. However, only part of libraries has full support of writing and reading modes. More than half of libraries supports only one mode.
Barcode libraries can support different barcode formats and programming languages. Also, they have different support of reading and writing functionality. Most common barcode libraries and SDKs are represented in the following list:
Barcodes is the way of adding machine reading tags to any object of real world with low cost. All other ways like RFID chips or object detection by image recognition are more expensive and difficult to implement. There are more than 200 barcode types and this makes choice of barcode type ambiguous. First barcode was standardized in 60th and there were two waves of barcode features development
The first wave of creation barcode standards was started in 60th and those were 1D barcodes. Main advantages of these barcodes were simple encoding and recognition with laser scanners for linear barcodes. All of these restrictions were tied to slow 8-bit processors, which were used at that time. This makes 1D barcodes have restricted symbol encoding like Code 11 or have restricted barcode length like EAN 13, UPCA, EAN 8 or be used even without checksum like Code 39 barcodes. In addition to this, informational density encoding of these barcode types is too low.
Moreover, all of these 1D barcodes have low quality checksum or even do not have any checksum which makes recognition process unpredictable on images with too low quality. Open source engines does not recognize 1D barcodes on images with low quality but barcode engines with advanced recognition algorithms can recognize these barcodes. Unfortunately, recognition of low quality images could produce some incorrect symbols in recognized text. Low-density encoding, encoding restrictions and weak checksum makes 1D barcode unsuitable to current requirements to informational systems and data processing. Using of 1D barcodes in the new applications is reasonable if only it is required by industrial standards
The second way of barcode standards implementation was started in 90th and it was development of 2D barcodes. Main advantages of 2D barcodes are high encoding density, which is 10 times more, no restrictions to text encoding and self-checked codes like Reed Solomon codes, which not only add confidence in correct recognition but also can restore some wiped or corrupted barcode data. Main disadvantage of 2D barcodes, they cannot be recognized by laser scanners, except PDF 417, for recognition they require photo scanners. Most of 2D barcodes can encode information in byte mode and this allows encoding both text in 8-bit national encoding charset and text in common Unicode charsets like UTF16 or UTF8 with ECI tag.
New projects should use 2D barcodes if industry standards permit. They do not have any restrictions to encoding text, they can be correctly restored on corrupted or low quality images and their recognition result is fully confidential. The informational density allows placing them on the same area or even lesser than 1D barcodes. The main question here could be requirement to marked area. Most common QR code can be only in square size, same Aztec or Datamatrix in some sizes. If someone has a long rectangular area with low height, they can use Datamatrix with rectangular sizes, see DMRE or PDF417, which can have difference width to height more than 64 times.