| Developers' Corner

Easy text and code reading with MERLIC standard tools

If you want to build an MVApp that reads for example QR codes or bar codes you can do so with just a few clicks. You can even combine the tools to get all available information printed on a product in different formats without the need for programming skills.

MERLIC offers six standard tools for reading common data codes as well as texts and numbers printed in any font type:

  • Read Aztec Code
  • Read Bar Code
  • Read Data Matrix ECC 200
  • Read PDF417
  • Read QR Code
  • Read Text and Numbers

If you want to build an MVApp that reads for example QR codes or bar codes you can do so with just a few clicks. You can even combine the tools to get all available information printed on a product in different formats without the need for programming skills.

MERLIC Vision App example

MERLIC is installed with useful example MVApps for common machine vision tasks, complete with all necessary images and a ready to use Frontend for a user friendly presentation of the results. In the example ‘read_lot_number_and_ECC200.mvapp’ the tools ‘Read Text and Numbers’ and ‘Read Data Matrix ECC 200’ are used to acquire and display the ‘best before’ date on a package and its ID number.

MERLIC is able to adapt to various features of print for reliable text and code reading regardless of the circumstances. Precautions for the handling of many characteristics like dot print, poor focus, and slant are included in the reading tools so in most cases there is no need for additional calibration or preprocessing. The screenshot shows the application of easyTouch. When hovering over an area with your mouse pointer, MERLIC determines suitable parameters and previews the result. If the results suit your needs, confirm the preselection with a click.

The images in the example MVApp are not perfectly aligned and some are out of focus. Nonetheless, all texts can be read because the region of interest (ROI) is big enough and the parameters are set right. ROIs can be adapted by simply dragging the edges or corners. They also can be rotated to fit the given requirements.

The second tool in the example, ‘Read Data Matrix ECC 200’, uses a training mode to determine parameter values suitable to detect and read codes inside an ROI. In case the tool does not recognize the code right from the start, simply add a training image, draw an ROI around the code you want to read and apply the training data. If you want to optimize every detail of the code processing there are over 20 additional parameters available. For example, you can define the minimum contrast, the finder pattern tolerance, and if the code appears dark on a light background or vice versa.

A quick way from codes to appealing results

To speed up the search, a so-called pyramid of contracted images is used. Instead of starting to look for codes on the full size image, a stack of contracted images is created, that looks like a pyramid. Starting from the smallest image on the top, MERLIC analyzes the image content and uses the first Data Matrix ECC 200 code it can find. To speed up the processing even more and make sure that only the desired code is found, you can specify a processing region for the images.

MERLIC provides the decoded data as a string in a result connector that can be connected to subsequent tools like ‘Write to File’. For the example MVApp the result is used in a label widget that displays the string in the Frontend. The MERLIC Frontend is a separate run time environment for the representation of results and easy user interaction. Therefore, it can be executed on a different computer or device than the one the MERLIC Backend is running on.

More than just reading

Most reading tools include a training and all follow the same simple work structure:

  1. Acquire the desired images.
  2. Insert the appropriate tool for reading text, numbers or codes to the Tool Flow.
  3. If the tool does not process the content automatically, optimize the parameters.

In addition to the basic parameters and results each tool offers a wide range of additional possibilities for your machine vision tasks. You can use this information as input for subsequent tools and data evaluation.

For a clean user experience additional parameters and results are hidden by default but can be displayed at any time if needed.