Data Matrix Decoding Application for Sample Storage

Data Matrix Decoding Application for Sample Storage

Project Description

The Context

A Data Matrix Code is a two-dimensional (2D) code that consists of black and white modules, usually arranged in a square pattern. An entire Data Matrix symbol can store up to 2,335 alphanumeric characters. Due to its ability to encode a large amount of data in a small amount of space, Data Matrix codes are extensively used for sample storage in laboratories and chemical and pharmaceutical industries. A Dutch company specialized in sample storage and preservation solutions, was looking to create a new Data matrix decoding application and Tismo was entrusted with the end-to-end development. 

The Problem

The Data Matrix decoding application would be used to scan and decode the codes present on the bottom of vials or tubes, used in sample storage. These vials or tubes are stored in racks of different configurations. The Data Matrix decoding application would have to be compatible with multiple scanners, each supporting numerous rack configurations. Additionally, physical parameters such as height from scanner, colour of tube surface etc. would be unique to each rack. 

The Solution

Tismo developed a custom Data Matrix decoding application, to analyze codes present on the bottom of vials or tubes, used in sample storage. Separate libraries were developed using C++ for image acquisition and image decoding. The libraries used TWAIN protocol to communicate with the Data Matrix scanners. The image decoding library used OpenCV for image processing and libdmtx for Data Matrix decoding. The application was designed to run on multiple versions of Windows operating system and the User Interface was designed using C++/Qt and QML.

Architecture Diagram of Data Matrix decoding Application

Architecture Diagram of Data Matrix decoding Application

Tismo realized that the speed and accuracy of the scans were crucial to the client. Keeping this in mind, the Tismo engineers skillfully optimized the image processing algorithm to significantly increase the speed and accuracy of the Data Matrix decoding process. The image was sharpened by optimizing its contrast parameter, using algorithms like histogram equalization using CLAHE etc. The algorithm also manipulated parameters such as brightness and image area to ensure fast and accurate scans.  For instance, the decode time for a rack consisting of 96 sample vials, was brought down from 5.5 seconds to 0.45 seconds, using Tismo’s optimization algorithm. 

Performance table showing Decode Time of Data matrix Decoding Application

Performance table showing Decode Time of Data matrix Decoding Application

The Data matrix decoding application allowed users to scan racks of varying configurations and types and displayed results in a colour-coded matrix format. A click on each cell of the matrix displayed the details of the corresponding vial. Users could configure the number of re-scans and decoding attempts in case of poor scan results. The application also allowed users to export the scan results as a CSV file. Tismo also enabled remote access to the Data Matrix decoding application via TCP/IP. This was designed to help integrate 3rd party application with the Data Matrix decoders. The Data Matrix decoding application also supported third party barcode scanners integrated with the Data Matrix scanners. The barcodes stored details of the racks and the inputs were used to populate certain fields of the scan results. This was enabled using UART over USB. 

Summary

Tismo developed a Data Matrix decoding application that allowed users to scan racks of varying configurations and types and displayed results in a colour-coded matrix format. The libraries developed by Tismo used TWAIN protocol to communicate with the Data Matrix scanners. OpenCV was used for image processing and libdmtx for Data Matrix decoding. The User Interface was designed using C++/Qt and QML. Tismo created a custom optimization algorithm to improve the speed and accuracy of scan results. Remote access to the application was enabled via TCP/IP.

Back to Top