# An Optimized Genetic Algorithm-Based Wavelet Image Fusion Technique for PCB Detection
## 1 Introduction  
The printed circuit board (PCB) is the heart of modern electronic devices, providing the foundation for components to be connected functionally and compactly. As technological advances continue, the complexity and miniaturization of PCBs have dramatically increased. Consequently, the inspection and detection of defects in PCBs have become vital aspects of ensuring the quality, functionality, and reliability of electronic products. PCBs are integral to a wide range of industries, including consumer electronics, automotive, aerospace, and telecommunications. Defects such as misaligned components, soldering issues, cracks, and short circuits can adversely affect the performance of electronic devices. Therefore, accurate, efficient, and automated defect detection methods are essential to minimize the risks of faulty products reaching the market. Traditional PCB inspection techniques, such as manual visual inspection and simple image processing methods, often fail to meet the growing demands for precision and efficiency [1; 2]. Manual inspection, being time-consuming and prone to human error, struggles to detect subtle defects, especially small or hidden within the board's intricate layers. Basic image processing methods, including edge detection and thresholding, are also limited in their capacity to handle complex images, especially those containing noise or poor contrast. Given these challenges, researchers have increasingly turned to advanced image fusion techniques to improve the accuracy and robustness of PCB defect detection. Image fusion is a technique that combines information from multiple source images to produce a single image that contains enhanced features and details [3]. In the context of PCB inspection, image fusion can provide a more comprehensive view of the board by merging different types of images. Doing so helps preserve critical information, such as fine details of the edges, textures, and structures, which are essential for accurate defect detection. Among the various image fusion techniques, wavelet-based fusion methods have gained significant attention due to their unique ability to decompose images into different frequency bands, capturing both low-frequency structural information and high-frequency details like edges and textures. Wavelet-based image fusion methods rely on the discrete wavelet transform (DWT), which decomposes an image into a set of wavelet coefficients corresponding to different frequency subbands [4; 5]. The low-frequency bands capture the overall structure and large-scale features of the image, while the high-frequency bands retain fine details, such as edges, textures, and small-scale features. These properties make wavelet-based fusion particularly useful for applications like PCB inspection, where both the macrostructure and microstructure are equally important for accurate defect detection. Wavelet fusion aims to combine the strengths of multiple images by selecting the most relevant information from each frequency band. Genetic algorithms (GAs) are a class of optimization techniques inspired by the principles of natural selection and evolution [6]. GAs have been successfully applied in many optimization problems, including image fusion, because they can explore a large solution space and converge towards optimal solutions. A genetic algorithm involves a population of candidate solutions over several generations, with the best solutions selected for reproduction and the next iteration. The key strength of GAs lies in their ability to balance exploration. Despite the advantages of wavelet-based image fusion, effectively optimizing the fusion process remains a significant challenge. Selecting appropriate coefficients from each image and determining their optimal combination is complex. Traditional fusion techniques often rely on heuristic rules or statistical measures, which may not always yield optimal results.