# Data Matrix Based Low Cost Autonomous Detection of Medicine Packages
## 4 Conclusions and Future Work  
The counterfeit medicine problem is still negatively affecting worldwide health. The Data Matrix code, a unique identifier that guarantees medication packaging authenticity, allows to trace a medicine from its production until its delivery to the patient. In the hospital pharmaceutical industry, at the secondary level, for the inventory task, the scanning of the medicine packages to introduce them into the management system is performed manually by the user through a Data Matrix reader. This paper proposes a low cost system to control medicine packages, acquiring a set of medicine boxes simultaneously and \begin{table}
\begin{tabular}{c c c c} \hline \hline  & **Natural** & **Measured** & **Extracting Ratio** \\  & **Illuminance** & **Illuminance** & **Result** \\  & **(Lux)** & **(Lux)** & **(\%)** \\ \hline LEDS off & 5 & 5 & 0 (0 of 11) \\ \hline LEDS off & 90 & 90 & 0 (0 of 11) \\ \hline LEDS off & 150 & 150 & 18 (2 of 11) \\ \hline LEDS on & 90 & 1985 & 100 (11 of 11) \\ \hline LEDS on & 440 & 2320 & 100 (11 of 11) \\ midrule LEDS on & 1040 & 3200 & 100 (11 of 11) \\ \hline LEDS on & & 980 & 100 (11 of 11) \\ (1 panel) & 0 & 1880 & 100 (11 of 11) \\ \hline LEDS on & & & \\ (2 panels) & 0 & 1880 & 100 (11 of 11) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Extracting result ratio for different illumination conditions. Figure 12: Acquired image with a natural illuminance of 150 Lux and LED panels off. An extraction ratio of 18% was observed. autonomously introducing them into the authentication database. A proof of concept was performed by installing the proposed system in a hospital pharmacy and testing it with real medicine. The achieved results were very encouraging, and it is expected that, with the addition of extra functionalities, the system can be used as a real support for the pharmacist work. The proposed prototype, works as a standalone system, that can be added to any validation system by connecting an USB port. It owns an embedded illumination system that eliminated the exterior lighting conditions. It could reach 90% of extraction ratio for real conditions and real medicines. Nevertheless, there are some limitations such as the small acquisition area and the processing time for extraction of the matrix codes. As future work, feedback from the MVO database will be received through an ethernet port and the system will project the codes accordingly. For this purpose, a projection mapping will be used to assist the technician in the authentication operation. This task will be performed as soon as the information from the MVO is received. To improve the system flexibility and to avoid the user being forced to put the packages face with code upside, new cameras in distinct orientations will be integrated as well as the size of the work area will be increased. Additionally, including a conveyor belt in order to increase the amount of medicine packages which are autonomously scanned, and a robotic manipulator to pick the counterfeit medicine boxes, are improvements to consider. Finally, in order to improve the detection ratio, a machine learning based vision system could be added to detect matrix codes. Then, it would be possible to map the matrix codes and detect the missed ones improving their quality (e.g., rotation, histogram equalization, among others) and sent them again to the \(libdmtx\) library. In this way, it would be possible to improve the detection and extraction. The contributions of the authors of this work are pointed as follows: Conceptualisation, J.L. and P.C. ; Methodology, All; Software, J.L. and P.C. ; Validation, C.R., J.L. and L.R. ; Investigation, C.R., J.L. and P.C. ; Data Curation, All; Writing--Original Draft Preparation, C.R., J.L. and L.R. ; Writing--Review and Editing, C.R. and J.L. ; Visualisation, C.R., J.L. and P.C. ; Supervision, J.L. and P.C. ; Project Administration, J.L. and P.C. All authors have read and agreed to the published version of the manuscript.