# An Optimized Genetic Algorithm-Based Wavelet Image Fusion Technique for PCB Detection
## 4 Experiment Results and Discussion
Subsequently, the images undergo DWT decomposition, resulting in four subbands: LL, LH, HL, and HH. Among these, LL represents the low-frequency subband, while LH, HL, and HH correspond to the high-frequency subbands, which capture the horizontal, vertical, and diagonal high-frequency components, respectively. Each subband is assigned a weight, which is calculated using the system's ESGA. This weight is determined based on the potential RSD, PSNR, SF, and image clarity values achievable from the fused image. Once the weights are assigned, the system produces the fused subbands: LLF, LHF, HLF, and HHF, where 'F' denotes the fused version of the subband. The system then performs the IDWT, resulting in the fused image, and outputs its RSD, PSNR, SF, and image clarity values. In the testing experiment, as illustrated in Figure 6, a typical functional PCB was selected and tested after being powered on using the proposed system. The visible light image, infrared image, and fused image of the PCB in its normal operating state were recorded, as shown in Figure 5(a)-c, respectively. Based on these reference images, an automatic annotation algorithm for thermal imaging was designed within the system. When the system detects red high-temperature regions that deviate from the distribution pattern observed in Figure 5(b), it automatically annotates the corresponding areas in the image. Subsequently, a specific component region on the PCB was artificially heated to simulate a component failure scenario. After powering on, the system was used to test the PCB, and the prototype captured both visible light and thermal images. These images were then transmitted to the central processing platform, which in this case was a PC. The visible light and thermal images were imported into the Wavelet Transform Image Fusion Scheme Based on the Improved Genetic Algorithm designed for this project, which produced the fused image and highlighted the areas with abnormal heating. The processed image was then transmitted to the prototype's display screen. Upon receiving the image data from the sensors, the system first converts the format of the images and scales them to a resolution of 320 \(\times\) 240 pixels to match the screen size. It then calls a drawing function that maps the image data onto the screen, converting the pixel color values to a 16-bit color format for display. Figure 7 illustrates the process, where Figure 7a shows the original visible light image, Figure 7b displays the thermal image, Figure 7c presents the fused image, and Figure 7d shows the image after automatic annotation of the abnormal heating areas. Based on the functionality tests performed and the analysis of the resulting images, it is possible to identify the locations of abnormally high temperatures, which correspond to the components with the highest likelihood of failure. The proposed system introduces an innovative approach to monitoring errors in PCBs by utilizing both visible light and thermal infrared images for fusion and analysis. This dual-modal imaging technique enhances the system's ability to detect anomalies, such as overheating, that may not  
Figure 5: System operation flow chart. Figure 6: A PCB in its normal operating state. (**a**) Visual; (**b**) Infrared; (**c**) Fused. be easily identified through visual inspection alone. The system captures high-quality visible light and thermal images, which are then fused using a Wavelet Transform Image Fusion Scheme based on an Improved Genetic Algorithm. This process generates a fused image that effectively highlights areas of abnormal heating, providing a more accurate and comprehensive view of the PCB's operational status. Experimental results demonstrate the system's effectiveness in detecting errors, as it successfully captured and processed both visible and thermal images of a PCB with an artificially heated component region. The fused image displayed clear indications of the overheated areas, which were annotated by the system's automatic annotation algorithm.