## 4 Results
Image pre-processing involved adjusting images to fixed width and height dimensions and reducing the size of the image. If images were cropped, some information could be lost. Due to three different resolutions, this study resized all images to the same width and height size (1:1). In practice, fleet managers usually observed the color images and adjusted their light and contrast. With one low-resolution case from 33 as an example, to adjust images using RGB factors, the R factor provided was 0.8, the G factor was 1.0, and the B factor was 0.8 as an example in Figure 4. The advantages of RGB conversion were that it was simple, its relative ease of color-mixing calculations, and that it allowed for the adjustment of the final color exhibition. However, as shown in Figure 4, the limitation of RGB was that it was difficult to make localized adjustments. The result of RGB was for global adjustments and was not suitable for this low-resolution case. Based on image color conversion using the cvtColor function from OpenCV, the image was first converted from RGB to CIELAB, and then from CIELAB back to RGB. Histogram equalization on the L channel was used to enhance the image and adjusted the intensity distribution of the image to make the histogram more uniform. Compared to histogram equalization, fuzzy enhancement on the L channel had a more flexible scale adjustment using \((\text{L}-\text{L}_{\text{min}}/\text{L}_{\text{max}}-\text{L}_{\text{min}})\times (255-0)\). For the 33 poor-quality images, there were no extremely bright images. At first, we considered very bright (VB), slightly bright (SB), bright (B), dark (D), slightly dark (SD), very dark (VD), and extremely dark (ED). According to the description from Section 3, this study used the Gaussian membership function to handle different resolutions. The negative \(-0.5\) was used to reverse the direction of the exponent, thereby forming the Gaussian distribution of \(exp\left(-0.5\times\left(\frac{x-min}{stdcv}\right)^{2}\right)\). We set the input as \(x\in[-45,\ 300]\). The abbreviation for pixel intensity value is PV. VB denoted the mean was 255, B denoted the mean was PV + \((255-\text{PV})/2\) and SB denoted the mean was PV + \((255-\text{PV})/8\). Since the images did not have extremely bright cases, we added  
Figure 4: Using RGB for image conversion. Figure 3: Label traffic lights data. moderately bright (MB), which denoted the mean was 150 to adjust the parameters of the membership functions to meet the expected fuzzy logic requirements. These standard deviations (stdev) were \((255-\text{PV})/8\). SD denoted the mean was 5 PV/8, D denoted the mean was PV/2, and VD denoted the mean was 0. Since the images did not have many extremely dark areas, we adjusted the mean to keep the extremely bright (EB) curve short. These standard deviations (stdev) were PV/8. We used the median 128 value for PV that was from 0 (darkness) to 255 (brightness), and we used the probability density function value of the Gaussian distribution. The input function is shown in Figure 5, and fuzzy inference based on trial and error is shown in Table 4. Due to the multiple resolutions in the collected fleet images, and some of which had poor quality, this study calculated the Gaussian distribution values and provided a more flexible range outside of 0 to 255 to handle extreme cases of images being too dark or too bright. Then, the L channel from CIELAB was normalized to adjust the values back to the 0-to-255 range. This study performed defuzzification using the centroid method with the pixel intensity range set to \([-45,\,300]\), while normalization is an important step in data processing, which is to transform \([-45,\,300]\) into \([0,\,255]\). When the data had low-light images in Figure 4, CIELAB can be used to adjust for fuzzy enhancement. As shown in Figure 6, the adjustments of fuzzy are better than HE with one low-resolution case as an example. In Figure 6, it can be observed that the image is slightly overexposed using histogram equalization.