## 4 Development of a Decision-Making System
This task involved the scrutiny of 1000 independent images containing objects. The resultant analysis led to the determination of a threshold value of 225 for subsequent research endeavors. It was also imperative to account for variations in image dimensions and brightness levels. Consequently, the decision-making system relies upon the relationship elucidated by Equation (6):  
\[BS=\frac{\sum\mathit{hist}[225:255]}{\sum\mathit{hist}[0:255]}, \tag{6}\]  
where \(BS\) is the share of brightness; \(\sum\mathit{hist}[225:255]\) is the sum of the histogram values from 225 to 255; and \(\sum\mathit{hist}[0:255]\) is the sum of all the values of this histogram. Subsequently, the threshold value for the brightness share (\(BS\)) for each road sign class had to be ascertained. A dataset of 1000 independent images containing objects was repurposed for this purpose. Upon comprehensive analysis, it was discerned that for \"Class 1\", such a threshold was estimated to be approximately \(BS=10\). In contrast, the disparities for the remaining eight classes were relatively minimal, hovering around \(BS=4\). This variance stems from the distinctive characteristics of the signs; the pedestrian crossing sign is distinguished by numerous bright/white lines, while the remaining signs within the Region of Interest (ROI) encompass a substantial proportion of background/road pixels. In the final stage, we developed an implementation of a decision-making system that relies on pre-established thresholds. After obtaining prediction results from the YOLOv4-Tiny model for a given image, we proceed to the subsequent stages of our research. Firstly, the entire image is transformed into grayscale and then subjected to a contrast-enhancement operation. Subsequently, based on the information about the position and size of the Region of Interest (ROI) obtained from the CNN model's predictions, all the detected and classified objects within the image are extracted. The next step involves repeating an identical process for each extracted image fragment individually. This process entails computing the histogram function, which represents the distribution of pixel brightness within the respective image fragment. Subsequently, based on Equation (6), we calculate the value of the \(BS\) (Brightness Share), which serves as a measure of the brightness contribution within the image fragment. In the last step, we conduct a conditional process that takes into consideration both the \(BS\) value and the class to which each object belongs. This step is crucial as it enables us to make the ultimate assessment of whether a given horizontal road sign requires repainting or remains adequately visible, thus not necessitating intervention. Thanks to this advanced analytical scheme, we gain valuable insights into the condition of each road sign in the image, which is of utmost importance in the management and maintenance of road signs. As the ultimate output of our system, we generate an image where horizontal road signs are delineated with a bounding box, accompanied by information about the object's classification (i.e., to which class the object has been classified) and the determination of whether it necessitates repainting (as determined by the decision-making system). The developed system was also tested on real-time video streams captured by the camera. The outcomes were highly promising. However, for a comprehensive analysis of our system's performance, real-world data are indispensable. These data allow for comparisons with the output generated by the CNN model, enabling the calculation of relevant metrics. Unfortunately, we cannot obtain them in real time. Therefore, in this context, detailed discussion regarding the video stream is omitted, and our analyses are presented by using established examples.