Key Concepts

Before you learn about the use cases and implementation of Barcode Scanner, it’s important to understand its fundamental concepts in detail.

Encoding Data in a Barcode

A barcode carries a string of characters as the data, and both barcode and data are mapped together for a fast transfer from a real world object to a computing device. The mapping of the data with a barcode is called a symbology. Depending on the use case, a barcode might directly encode the data, or encode an item identifier that is linked to an entry in a database that contains the actual data.

Both linear and 2D primary barcodes supported by Zia Barcode Scanner contain distinct features, and each barcode type is used for a different purpose. Some characteristics of linear and 2D barcode formats are specified below:

  • Linear barcode formats:

    The linear barcode format is a first-generation one-dimensional format that represents data by varying the widths and spacings of multiple parallel lines. These hold restrictions on the type and number of characters that can be passed.

    Linear barcodes are therefore used to encode a limited number of alphanumeric characters, depending on the type. Types such as UPC, EAN, Code-39, and Code-128 are commonly used to label consumer goods and products across industries like retail, automotive, logistics, transportation, and healthcare. The specifications of the data format and usage varies from type to type.

  • 2D barcode formats:

    The 2D barcode format is an advanced form of barcode format that is visually represented in the form of rectangles, hexagons, dots, or other geometric patterns. The 2D barcode format can hold much more data in a unit area compared to the 1D format.

    They also don’t contain many restrictions on the types of data supported, and can hold structured and binary data, such as photographs, fingerprints, signatures, geolocation, and more. The 2D types also have advantages like space efficiency, fault tolerance, error correction, and high density. The specifications of the data format and usage varies from type to type in the 2D format, as well.

Input Format

Zia Barcode Scanner scans barcodes from image files. Barcode Scanner supports the following input file formats:

  • .jpg/.jpeg
  • .png

You can code the Catalyst application to use the end user device’s camera to capture a photo with a barcode, and process the image as the input file. You could also provide a space for the user to upload the image file from the device’s memory to the Catalyst application.

The input provided using the API contains the source image file of the barcode, and the barcode type if the user is aware of it. Zia will automatically detect the barcode type if the user doesn’t specify it.

You can check the request format from the API documentation.

The user must follow these guidelines while providing the input, for better results:

  • Avoid providing blurred, corrupted, or unrecognizable images of the barcode.
  • Ensure that barcode image is clear, visible, and distinct.
  • Ensure that the image does not have any borders.
  • Do not upload partial images. The entire barcode must be present in the image.
  • The image size must not be too small.
  • The file size must not exceed 10 MB.
  • The resolution of the image (width * height in pixels) must not exceed 36000000 pixels.
  • The barcode in the image can be oriented in any manner.

Response Format

Zia Barcode Scanner returns the response in the following ways:

  • In the console: When you upload a sample image with a barcode in the console, it will return the decoded data in two response formats:
    • Readable textual format: Displays the decoded data that is visually segregated into lines, based on the content
    • JSON format: Displays the decoded data in the JSON format
  • Using the SDKs: When you send an image file using an API request, you will receive a JSON response containing the decoded data.

You can check the JSON response format from the API documentation.

Last Updated 2023-05-09 17:03:08 +0530 +0530