🔒
Verified Scholarly Platform
Serving Researchers Since 2012

Design And Implementation of OCR Based Image-to-Text System for Uneven Medical Glass Containers

DOI : 10.17577/IJERTCONV14IS070036
Download Full-Text PDF Cite this Publication

Text Only Version

Design And Implementation of OCR Based Image-to-Text System for Uneven Medical Glass Containers

M. Sath

Assistant Professor, Department of ECE, Sri Bharathi Engineering College for Women, Pudukkottai, India.

Abstract – This project presents the design and implementation of an Optical Character Recognition (OCR)-based image-to-text system for extracting text from images of uneven medical glass containers. In modern industrial environments, particularly in pharmaceutical and packaging sectors, accurate product labelling and inspection are essential for ensuring quality, safety, and regulatory compliance. Traditional manual inspection methods are time-consuming and prone to human error, especially when dealing with curved or irregular surfaces.

To address these challenges, the proposed system integrates computer vision techniques with OCR to automate the text extraction process. The system captures images of glass containers and applies preprocessing techniques such as noise reduction, contrast enhancement, and reflection minimization to improve image quality. Text regions are then detected using 2D vision methods, while basic 3D vision concepts are incorporated to handle surface curvature and uneven structures.

The processed images are passed through an OCR engine to accurately recognize and convert text into machine-readable format. The proposed system significantly reduces manual effort, improves accuracy, and enhances operational efficiency. This solution is highly applicable in pharmaceutical manufacturing, packaging industries, and automated quality inspection systems.

Key words: Optical Character Recognition (OCR); Curved Surface Recognition; Medical Containers; Image Preprocessing; Text Detection; Convolutional Neural Networks; Healthcare Automation.

  1. INTRODUCTION

    Accurate product identification and labeling are crucial for guaranteeing efficiency, quality, and safety in contemporary industrial and

    medicinal settings. The curved or uneven surfaces of medical glass ampoules and related goods make hand inspection challenging, time-consuming, and prone to human mistake. When applied to curved objects, conventional optical character recognition (OCR) systems. Encounter difficulties like distortion, reflections, and uneven illumination because they are primarily made for flat surfaces.

    This study suggests an OCR-based image-to-text system created especially for irregular medical glass containers in order to overcome these constraints. OCR is used for precise text extraction after image preprocessing and computer vision techniques are used to improve text visibility.

    In industrial applications, this method enhances dependability, minimizes manual labor, and facilitates effective quality inspection.

  2. BASIC THEORY

    A. ARDUINO UNO

    Based on the ATmega328P, the Arduino Uno is a popular microcontroller board intended for embedded system applications. It manages hardware components and oversees overall operations as the proposed system's central control unit. The board has six analog input pins, a 16 MHz clock, USB connectivity, 14 digital input/output pins (including six PWM outputs), and several power options.

    The Arduino Uno is in charge of managing timing sequences, driving the servo motor to spin the ampoule, and interacting with other system elements in this project. It is an excellent option for industrial applications and prototype development due to its low cost, ease of programming, and robust community support.

    placement. The SG90's three connectionsground (brown), power (red), and control signal (orange) make it simple to communicate with microcontrollers like Arduino.

    C.SG90 SERVO MOTOR

    Figure 1:Arduino uno B.TCD 1304 LINEAR CCD SENSOR

    This project, curved medical glass ampoules are utilized to collect high-resolution line-by-line picture data using the TCD1304 Linear CCD Sensor. The sensor's photodiode array transforms reflected light into electrical impulses. To regulate the sensor's functioning, the Arduino Uno microcontroller produces accurate start, clock, and integration signals.

    The technology increases text visibility and decreases reflections by modifying the integration time. With the aid of a rotating gear, the acquired data is gathered from various angles, guaranteeing thorough surface scanning.

    Figure 2 :TCD1304 Linear CCD Sensor

    This makes it possible to capture precise images, which is necessary for dependable OCR-based text extraction from shiny and uneven surfaces.

    torque of around 1.8 kg/cm and a voltage range of 4.8V to 6V, it is appropriate for low-power precision operations.

    Pulse Width Modulation (PWM) signals are used to drive the motor, which has a rotation range of 0° to 180°. The angular position is calculated by changing the pulse width, which is 1 ms for 0°, 1.5 ms for 90°, and 2 ms for

    180°.

    It is made up of a feedback system and internal control circuit that guarantee precise and steady

    The SG90 servo motor is essential to the positioning and movement control of the suggested OCR-based ampoule reading system. In order to properly scan the surface, it is utilized to spin and position the ampoule bottle in front of the image sensor.

    By taking crisp pictures from various perspectives, the deliberate, step-by-step action lessens blur and increases the precision of word recognition. The SG90 servo motor is the perfect option for this application because of its affordability, simplicity of interface, and accurate angular control. However, it has some drawbacks that need to be taken into account while designing the system, such as a limited rotation range and susceptibility to unreliable power supplies.

    Figure 3 : SG90 Servomotor

    D. AMPOULE

    An Ampoule is a small sealed glass container used to store liquid medicines in a sterile condition. In this project, ampoules are used as the input object for image capture and text recognition.

    Due to their curved and uneven surface, issues such as light reflection and distortion occur, making text extraction difficult. To address this, the system captures images from different angles and uses proper lighting to improve OCR accuracy.

  3. Figure 4 : Ampoule OCR ORKING PRINCIPLE

    Figure 5: Working Model

    Image capture, digital image processing, and electromechanical control are all integrated in the proposed OCR-based ampoule reading system. The ampoule is first installed on a controlled platform where an SG90 servo motor uses PWM signals produced by the microcontroller to precisely move the ampoule. Sequential scanning of the curved surface is made possible by this controlled rotation.

    High-resolution picture data is captured under uniform illumination using a linear CCD sensor (TCD1304) or camera module to reduce optical distortions such glare and warping caused by curvature. Preprocessing steps such as grayscale conversion, noise filtering, contrast enhancement, and edge identification are then applied to the obtained analog/digital data. Additionally, segmentation techniques separate the textual information containing region of interest. Following processing, the data is passed into an OCR engine, which uses feature extraction and pattern recognition algorithms to transform the visual text into digital output that can be read by machines. High accuracy and dependability in text recognitin from uneven glass surfaces are guaranteed by this methodical methodology.

  4. SI ATION RESULTS

    Ampoule image processing was successfully emulated using the suggested OCR-based approach. Under regulated illumination conditions, the technology accurately took photos and retrieved text. The clarity and recognition performance were enhanced by image preparation methods. However, reflections and the ampoule's curved surface caused minor inaccuracies. All things considered, the system performs well and is feasible to deploy in real time.

    Figure 6 : Final Output

  5. CONCLUSION

Accident Detection and Alert System using Arduino is a reliable and efficient solution for detecting accidents and sending alerts to emergency services and family members. The system utilizes sensors to detect changes in acceleration, temperature, and GPS location, triggering an alert in the event of an accident.

Key Achievements

  • An OCR-based image-to-text method for uneven ampoule surfaces has been successfully developed.

  • Printed text may be accurately extracted from reflecting and curved glass containers.

  • Application of picture preprocessing methods to improve text recognition capabilities.

  • Hardware components are included for controlled picture capturing.

  • Reduction of mistakes brought on by illumination changes and distortion.

  • System viability for real-time industrial applications is demonstrated.

  • Attainment of dependable performance in well regulated experimental settings.

    Future Enhancements

  • Implementation of powerful 3D vision algorithms to handle curved and uneven surfaces properly.

  • using machine learning and deep learning methods to increase the precision of text detection and identification.

  • creation of real-time computing power for quick industrial uses.

  • Multilingual text recognition support for a variety of product labels.

  • cloud-based storage integration for effective remote access and data management.

  • Industry 4.0 technology integration for automated and intelligent production processes.

  • Deployment for portability and real-time use on embedded and mobile devices.

REFERENCES

  1. "An Overview of the Tesseract OCR Engine," by R. Smith 629633 in Proceedings of the Ninth International Conference on Document Analysis and Recognition (ICDAR), 2007.

  2. Digital Image Processing, 4th ed., R. C. Gonzalez and

    R. E. Woods, Pearson, 2018.

  3. OCR-based Industrial Automation for Irregular Surfaces, S. Patel and P. Shah, International Journal of Advanced Manufacturing Technology, vol. 107, pp. 34513462, 2020.

  4. D. DeMenthon and J. Liang, "Flattening Curved Documents in Pictures," Proceedings of the 2005 IEEE Conference on Computer Vision and Pattern Recognition (CVPR).

  5. Y. Y. Chiang and C. A. Knoblock, "Identification of Curved and Multi-Oriented Text," Proceedings of the 2011 International Conference on Document Analysis and Recognition (ICDAR).

  6. F. Gao, S. Li, G. Xiao, H. You, S. Lu, "Text Recognition on Curved Metal Surfaces," IEEE Transactions, 2020.

  7. "Multi-font Curved Text Scene for Enhanced OCR Readability," P. M. Jena, B. K. Tripathy, and S. K. Parida, Springer, 2022.

  8. S. Pote, P. Tardekar, and S. Hingankar, "A Smart Reader for People with Visual Impairments," Journal of International Research, 2020.

  9. "Development of Text-Reading Camera for the Blind using Neural Network," A. Mendoza, I. C. R. Meralan, and R. V. Espanto, Springer, 2024.

  10. F. Gao, Q. Ping, G. Thattai, A. Reganti, and Y. N. Wu, "Natural Language-Centric Visual Question Answering," arXiv preprint, 2022.

  11. "Real-Time Scene Text Localization and Recognition," L. Neumann and J. Matas, Proceedings of CVPR, 2012.

  12. "Detecting Text in Natural Scenes with Stroke Width Transform," by B. Epshtein, E. Ofek, and Y. Wexler CVPR Proceedings, 2010.

  13. D. Karatzas et al., "ICDAR Robust Reading Competition," IEEE, 2015.

  14. "Robust Angle Invariant Text Detection," A. Zamberletti, I. Gallo, and S. Albertini, ICPR, 2013.

  15. B. Shi, X. Bai, and C. Yao, "CRNN for Scene Text Recognition," IEEE TPAMI, 2017.

  16. M. Liao, B. Shi, and X. Bai, "TextBoxes++ for Arbitrary Oriented Text Detection," IEEE TIP, 2019.

  17. J. Baek, B. Lee, D. Han, S. Yun, and H. Lee, "Character Region Awareness for Text Detection," CVPR, 2019.

  18. X. Zhou et al., "EAST: Efficient and Accurate Scene Text Detector," CVPR, 2017.

  19. OpenCV Team, "OpenCV Documentation," accessible at https://docs.opencv.org