| Abstract [eng] |
The Master’s final project investigates an image-analysis-based algorithm for recognizing the functional states of optical indicators. The relevance of the work is related to the need to test seven-segment displays and LED indicators used in electronic products quickly, contactlessly, and without complex specialized equipment. The accuracy of such a solution is affected by the position of the object in the camera image, lighting conditions, reflections, and the accuracy of ROI positioning. The aim of the project is to develop and experimentally evaluate an algorithm for recognizing the states of a seven-segment display and LED indicators. After analyzing optical element testing and image recognition methods, it was determined that a combined approach is suitable for this work: the YOLOv5 model is used to localize the tested object and the display area, while the states of the segments and LEDs are determined using brightness and color features calculated within ROI areas. The experimental system consists of a seven-segment display, two LED indicators, an ESP32-S3 microcontroller, a USB camera, and a computer. The microcontroller generates reference states, while the camera captures their images. The developed algorithm detects the PCB and seven-segment display area, normalizes the frame geometry, forms ROI areas, and determines the optical indicator states based on the calculated features. The software was implemented in the Python environment using “OpenCV”, “PyTorch”, the YOLOv5 model, and UART communication with the ESP32-S3 microcontroller. During the experimental study, an initial dataset of 6,840 frames was collected, including numerical seven-segment display values and individual segment states combined with different LED indicator combinations. To prepare the YOLOv5 localization model, 75 images were selected and annotated: 60 were used for training and 15 for validation. During software development, a tuning set of 15 individual segment frames was used to adjust ROI positioning, threshold values, and decision logic. At a later stage of the study, the analysis of numerical values was abandoned because the final evaluation focused not on recognizing a displayed number as a symbol, but on determining the individual “ON” / “OFF” states of optical elements. The final experimental evaluation used a dataset of 840 frames, consisting of 14 individual segments, 4 LED indicator combinations, and 15 repetitions. Seven frames were recognized incorrectly, resulting in an overall frame-level recognition accuracy of 99.17 %. When evaluating the “ON” / “OFF” states of 14 segments, an accuracy of 99.89 % was achieved, while both LED indicator states were recognized with 100.00 % accuracy. The error analysis showed that the main inaccuracies were caused by reflections, local brightness variations, and camera exposure adjustment. |