Circuit board detection method and system based on computer vision

By introducing a temperature-related morphological mapping model and a dynamic focal plane tracking chain into circuit board inspection, combined with illumination response characteristics and dynamic sharpness weight control, the blurring problem in circuit board image acquisition under high-temperature operation was solved, achieving accurate identification and stable imaging under high-temperature deformation conditions.

CN121962091AInactive Publication Date: 2026-05-01GUANGZHOU MAJIANG SOFTWARE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU MAJIANG SOFTWARE TECHNOLOGY CO LTD
Filing Date
2026-01-20
Publication Date
2026-05-01
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

During high-temperature operations, uneven heating of the circuit board causes local shift of the focal plane of the camera device, resulting in decreased image edge clarity. Traditional image recognition algorithms struggle to distinguish between genuine missing parts and blurred images, leading to deviations in detection results and affecting detection accuracy and the stability of production cycle.

Method used

By acquiring temperature field distribution data on the surface of the circuit board, a temperature-related morphological mapping model is established, a deformation reference band that is updated over time is generated, a dynamic focal plane tracking chain is constructed, and the focal length of the camera device is adjusted in real time. Combined with illumination response characteristics and dynamic weight control of sharpness, the joint weighted processing of focal length and illumination is realized to suppress the blurry areas caused by high temperature deformation.

Benefits of technology

It effectively eliminates local defocusing caused by thermal deformation, improves the stability and spatial consistency of detection imaging, ensures the accurate presentation of defect features, and enhances the accuracy and reliability of visual inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121962091A_ABST
    Figure CN121962091A_ABST
Patent Text Reader

Abstract

The invention discloses a circuit board detection method and system based on computer vision, and relates to the technical field of circuit board detection, and the method comprises the following steps: obtaining the temperature field distribution data of the surface of a circuit board based on the structural deformation of the circuit board caused by non-uniform heating after high-temperature operation, establishing a temperature-associated morphological mapping model according to the temperature field distribution data, and generating a circuit board deformation reference band updated along with time through the morphological mapping model; and constructing a dynamic focal plane tracking chain in an image acquisition process by using the deformation reference band, converting height change information of a corresponding region in the deformation reference band into a focal length displacement control instruction, and driving focal length adjustment of the camera device in real time. Through dynamic focal plane tracking and illumination response control, the focal length is matched with circuit board deformation in real time, the illumination difference is compensated, dynamic balance of image definition and brightness is achieved, and therefore the consistency of circuit board detection images and the accuracy of defect recognition are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Computer Vision-Based Circuit Board Inspection Method and System Technical Field

[0001] This invention relates to the field of circuit board inspection technology, and more specifically to a circuit board inspection method and system based on computer vision. Background Technology

[0002] Computer vision-based circuit board inspection is an intelligent inspection method that utilizes computer vision technology to automatically identify, analyze, and judge the surface and internal components of circuit boards. Its core principle is to acquire image data of the circuit board using a high-resolution industrial camera, and then combine image preprocessing, feature extraction, deep learning classification, and target detection algorithms to accurately identify and locate defects such as solder joint morphology, component location, silkscreen characters, pad connectivity, broken circuits, cold solder joints, short circuits, misalignment, and missing components. This method constructs a standard template image library or a self-learning model based on deep neural networks, comparing the differences between actual circuit board images and standard templates to achieve automatic defect classification and output of detection results. Compared to traditional manual inspection, computer vision-based circuit board inspection has advantages such as high speed, high accuracy, good stability, and strong traceability, and is widely used in SMT placement, post-assembly quality inspection, and online inspection in automated production lines.

[0003] Existing technologies have the following shortcomings: During high-temperature operations, the circuit board substrate may slightly bend due to uneven heating, causing a local shift in the focal plane of the camera when acquiring images. This shift leads to a decrease in image edge sharpness, creating blurred areas that are difficult to compensate for with single-frame autofocus. Because focal length deviation is random and instantaneous, traditional image recognition algorithms struggle to accurately distinguish between actual missing parts and blurred images during feature extraction, often misclassifying blurred areas as missing components. This results in inaccurate detection results, leading to repeated rework and impacting detection accuracy and production cycle stability.

[0004] The information disclosed in the background section is only intended to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0005] The purpose of this invention is to provide a computer vision-based circuit board inspection method and system to solve the problems mentioned in the background art.

[0006] To achieve the above objectives, the present invention provides the following technical solution: a circuit board inspection method based on computer vision, comprising the following steps: Step 1: Based on the structural deformation of the circuit board caused by uneven heating after high-temperature operation, acquire temperature field distribution data of the circuit board surface, and establish a temperature-related morphological mapping model based on the temperature field distribution data. Generate a circuit board deformation reference band that updates over time using this morphological mapping model to provide spatial positioning basis for subsequent focal length adjustment; Step 2: Using the deformation reference band, construct a dynamic focal plane tracking chain during image acquisition, convert the height change information of the corresponding area in the deformation reference band into focal length displacement control commands, and drive the focal length adjustment of the camera device in real time, so that the focal length change keeps synchronous with the circuit board deformation; Step 3: Based on the dynamic focal plane tracking chain, continuously acquired... Step 1: Spatial repositioning processing is performed on the circuit board images. The focal length displacement control command is input into the image registration channel. Through spatial geometric correction, the continuous connection of image sharpness in multiple regions is achieved, thereby obtaining a stable imaging result with consistent focal length. Step 2: Based on the spatially repositioned circuit board images, the illumination response features of each region are extracted to generate an illumination response distribution table. According to the illumination response distribution table, the brightness unevenness caused by the difference in incident angle is compensated so that the image after focal length adjustment maintains brightness balance under different illumination conditions. Step 3: A sharpness dynamic weight control mechanism is established based on the illumination response distribution table. The focal length adjustment result and the illumination compensation result are jointly weighted and processed. The compensated detection image is output through sharpness dynamic weight control, realizing real-time suppression and accurate identification of blurred areas caused by high temperature deformation.

[0007] Preferably, the steps of acquiring temperature field distribution data on the circuit board surface and establishing a temperature-related morphological mapping model include: after the circuit board completes high-temperature processing, collecting temperature field distribution data for different areas of the circuit board surface; acquiring temperature change data of the circuit board during the heating, isothermal, and cooling stages by deploying temperature sensing points at multiple key locations on the circuit board or using non-contact infrared thermometry; and establishing a correspondence between each temperature acquisition point and the physical coordinates of the circuit board; after acquiring the temperature field distribution data, establishing a spatial correspondence between temperature changes and circuit board morphological changes; analyzing the direction and magnitude of temperature gradients in each area to determine the trend of thermal stress distribution. The temperature field changes are mapped to the morphological changes on the circuit board surface, forming a temperature-related morphological mapping model. After obtaining the temperature-related morphological mapping model, the morphological changes of the circuit board under different temperature conditions are reconstructed and superimposed in chronological order to form a circuit board deformation reference band that can be dynamically updated over time, which is used to reflect the evolution law of the circuit board morphology. The circuit board deformation reference band is used as the spatial positioning basis for focal length adjustment. Before image acquisition, the focal length offset at each position is determined based on the spatial height information recorded in the deformation reference band, and the offset is converted into a spatial positioning command for the camera device to adjust the focal length, so that the focal length adjustment is consistent with the morphological changes of the circuit board.

[0008] Preferably, the steps of constructing a dynamic focal plane tracking chain using a deformation reference band include: after the deformation reference band of the circuit board is generated, importing the spatial height information of the deformation reference band into the focal plane construction unit, dividing the circuit board surface into spatial layers to determine the height offset value of each region relative to the reference focal plane, thereby obtaining the overall spatial height distribution of the circuit board surface; after obtaining the height offset value of the circuit board surface, establishing a dynamic focal plane change path based on the spatial data of the deformation reference band, determining the spatial change curve of the focal plane through continuous interpolation, and describing the focal plane change trajectory segment by segment according to the scanning direction and imaging sequence of the circuit board; after the focal plane change path is determined, converting the height change information of each region in the deformation reference band into a focal length displacement control command, generating a focal length displacement parameter according to the height offset of each region relative to the reference focal plane, and keeping the focal length change synchronized with the spatial change of the circuit board surface; after the focal length displacement control command is generated, inputting the command to the focal length adjustment device in real time to drive the focal length change of the camera device, so that the focal length adjustment process keeps synchronized with the deformation of the circuit board, thereby realizing continuous tracking and clear imaging of the dynamic focal plane.

[0009] Preferably, the steps for performing spatial repositioning processing on continuously acquired circuit board images based on a dynamic focal plane tracking chain include: after the dynamic focal plane tracking chain is constructed and a focal length displacement control command is generated, continuous images of the circuit board are acquired, and a spatial scanning path is established on the surface of the circuit board so that each scanning area corresponds to a specific focal length displacement state. At the same time, the spatial position information and focal length displacement state of each frame image are recorded to form a continuous spatial coordinate link; after obtaining the continuous image sequence and the corresponding focal length displacement information, the focal length displacement control command is input into the image registration channel, and the image is spatially remapped based on the deformation reference band, so that the focal length adjustment and the image spatial position are established in correspondence, providing a basis for subsequent geometric correction; after the image spatial registration is completed, spatial geometric correction is performed on the continuously acquired images, and the perspective aberration caused by the curvature of the focal plane is corrected according to the height change information in the focal length displacement control command, so that adjacent images are continuously connected in space, ensuring imaging geometric consistency; after the spatial geometric correction is completed, the registered and corrected multi-region images are repositioned and fused, so that the images of adjacent regions are seamlessly connected in space, and continuous transition is achieved in brightness and texture, thereby obtaining a circuit board imaging result with consistent focal length.

[0010] Preferably, during the spatial geometric correction process, the spatial projection of the circuit board image is adjusted using the height change information in the focal length displacement control command, so that each image is repositioned in the same coordinate system and a continuous transition is established in the overlapping area of ​​adjacent images, thereby maintaining the spatial consistency and clarity continuity of the circuit board image during the repositioning and fusion stage.

[0011] Preferably, the steps of extracting illumination response features and performing brightness compensation based on the spatially repositioned circuit board image include: after the circuit board image has been spatially repositioned, illumination response features are extracted from different areas of the circuit board surface, the circuit board surface is divided into multiple subdivided areas, and the pixel brightness distribution, reflection texture features, and shadow distribution trends of each area are obtained according to the repositioning coordinates, thereby forming spatially continuous illumination response feature data; after the illumination response feature extraction is completed, an illumination response distribution table of the circuit board is generated based on the extraction results, the illumination response features of each area are arranged according to spatial coordinates, and the illumination differences between adjacent areas are further analyzed. A smooth transition process is performed to ensure the spatial continuity of the illumination response distribution table and to reflect the brightness response patterns of each region. After the illumination response distribution table is established, the brightness unevenness caused by the difference in incident angle is analyzed based on the table. The compensation area and compensation magnitude are determined by comparing the brightness gradient of adjacent areas, and the difference areas are mapped to the corresponding spatial locations to determine the brightness compensation range. After determining the compensation range, the illumination compensation operation is performed based on the reflection intensity and incident angle direction recorded in the illumination response distribution table to dynamically correct the brightness of each region, so that the circuit board image after focus adjustment maintains brightness balance and visual consistency under different illumination conditions.

[0012] Preferably, in the illumination compensation operation, the various regions on the circuit board surface are compensated in stages according to the spatial coordinate information in the illumination response distribution table. By adjusting the exposure time and regional gain parameters, the brightness of each region transitions continuously in space, and the overall brightness balance and reflectivity of the circuit board image are maintained, thereby ensuring that the compensated image has stable visual clarity under illumination changes.

[0013] Preferably, the steps of establishing a dynamic weight control mechanism for sharpness based on the illumination response distribution table and outputting the compensated detection image include: after obtaining the illumination response distribution table, dividing the circuit board image after focus adjustment and illumination compensation into sharpness regions, and determining the sharpness reference value of each region according to the brightness distribution information in the illumination response distribution table, thereby forming a sharpness distribution map to reflect the initial sharpness weight values ​​of each position on the circuit board surface; after obtaining the sharpness distribution map, establishing a dynamic weight control mechanism for sharpness based on the spatial correspondence between the illumination response distribution table and the focus adjustment results, and superimposing the brightness change trend and... Focal plane tracking data determines the dynamic range of sharpness weight changes and adjusts the weights of each region in real time during imaging. After the sharpness dynamic weight control mechanism is established, the focal length adjustment result and the illumination compensation result are jointly weighted according to the sharpness weight distribution to achieve dynamic fusion of focal length and illumination at each spatial location, so as to maintain the overall sharpness and brightness balance of the image. After the joint weighting process is completed, the compensated detection image is output according to the final sharpness weight distribution of each region, so that the focal length adjustment and illumination compensation results are visually unified, and the blurring areas caused by high temperature deformation are suppressed in real time and accurately identified.

[0014] Preferably, in the sharpness dynamic weight control mechanism, the sharpness weight is adjusted in real time based on the spatial correspondence between the illumination response distribution table and the focal length adjustment result. By continuously and smoothly transitioning the weight of each region in the joint weighted processing of focal length adjustment and illumination compensation, the output detection image maintains the consistency of brightness and sharpness in space and maintains the stability of image imaging when the circuit board deforms.

[0015] The computer vision-based circuit board inspection system includes a temperature deformation modeling module, a dynamic focal plane tracking module, a spatial repositioning processing module, an illumination response compensation module, and a sharpness weight control module. The temperature deformation modeling module acquires temperature field distribution data on the circuit board surface based on the structural deformation caused by uneven heating after high-temperature operation. It then establishes a temperature-related morphological mapping model based on this data and generates a time-updated circuit board deformation reference band. The dynamic focal plane tracking module utilizes the deformation reference band to construct a dynamic focal plane tracking chain during image acquisition, converting the height change information of the corresponding area in the deformation reference band into focal length displacement control commands. The system continuously adjusts the focal length of the camera in real time. The spatial repositioning processing module performs spatial repositioning processing on the continuously acquired circuit board images based on a dynamic focal plane tracking chain, inputting focal length displacement control commands into the image registration channel. The illumination response compensation module extracts illumination response features from each region based on the spatially repositioned circuit board image, generates an illumination response distribution table, and compensates for brightness unevenness caused by differences in incident angles according to the illumination response distribution table. The sharpness weight control module establishes a dynamic sharpness weight control mechanism based on the illumination response distribution table, jointly weighting the focal length adjustment results with the illumination compensation results, and outputs the compensated detection image through dynamic sharpness weight control.

[0016] In the above technical solution, the technical effects and advantages provided by the present invention are as follows: By introducing a dynamic focal plane tracking chain during the image acquisition stage, the focal length adjustment process can be synchronized in real time with the deformation of the circuit board, ensuring that the focal plane maintains a spatial correspondence with the surface of the circuit board throughout the entire acquisition process, fundamentally eliminating the local defocusing phenomenon caused by thermal deformation. Through temperature-correlated morphological mapping and dynamic updating of the deformation reference band, the camera device achieves automatic focusing in different areas, ensuring that the acquired image has consistent clarity in both the edge and center areas, thereby effectively improving the stability and spatial consistency of the detection imaging.

[0017] This invention achieves a joint weighted output of focus adjustment and illumination compensation results through the synergistic application of an illumination response distribution table and a dynamic weighted control mechanism for sharpness. This ensures a dynamic balance between brightness and sharpness in the detected image. The compensated image maintains overall brightness uniformity and clear local details even under complex lighting conditions, effectively suppressing blurred areas caused by high-temperature deformation. This ensures accurate presentation of defect features during detection, thereby improving the accuracy and reliability of visual inspection. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.

[0019] Figure 1 is a flowchart of the circuit board inspection method based on computer vision according to the present invention.

[0020] Figure 2 is a schematic diagram of the circuit board inspection system based on computer vision according to the present invention. Detailed Implementation

[0021] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that the description of this disclosure will be more complete and fully convey the concept of the exemplary embodiments to those skilled in the art.

[0022] This invention provides a computer vision-based circuit board inspection method, as shown in Figure 1, comprising the following steps: Step 1: Based on the structural deformation of the circuit board caused by uneven heating after high-temperature processing, acquire the temperature field distribution data of the circuit board surface, and establish a temperature-related morphological mapping model based on the temperature field distribution data. This morphological mapping model generates a time-updated circuit board deformation reference band to provide spatial positioning basis for subsequent focus adjustment. The specific implementation of this step is as follows: After the circuit board completes the high-temperature process, comprehensively collect the temperature field distribution of different areas on the circuit board surface. In actual operation, temperature sensing points can be deployed at multiple key locations on the circuit board, or a non-contact infrared thermometry method can be used to acquire temperature change data of the circuit board during the heating, isothermal, and cooling stages. To ensure the integrity of the temperature field, temperature acquisition should cover the center, edges, corners, and densely populated component areas of the circuit board. During the acquisition process, the temperature change at each location should be recorded at fixed time intervals to ensure that the temperature data is continuous in time and distributed in space. The collected data should include the temperature response of the copper foil area, the fiberglass substrate area, and the areas where different components are located on the circuit board. This will reflect the temperature unevenness caused by differences in materials, layout density, and local thermal conductivity. Simultaneously, a coordinate positioning system is established to precisely correspond each temperature acquisition point to the physical coordinates of the circuit board, ensuring that temperature information can be accurately retrieved based on spatial location during subsequent morphology analysis. After multiple rounds of data collection and recording, a temperature field distribution dataset covering the entire circuit board surface is formed, providing the basic input for subsequent morphology mapping.

[0023] After acquiring the temperature field distribution data of the circuit board, a spatial correspondence is established between temperature changes and board morphological changes, thereby constructing a temperature-related morphological mapping model. To achieve this goal, the temperature data of the circuit board is first spatially interpolated to ensure a continuous temperature value distribution at any location. Subsequently, by analyzing the direction and magnitude of the temperature gradient in each region, the stress distribution trend in different regions during the heating process is determined. Generally, regions with higher temperatures experience greater expansion, while regions with lower temperatures experience relative contraction, thus creating differences in thermal stress between different regions. By analyzing the direction and intensity of these thermal stresses, the deformation type and direction of the circuit board at corresponding locations can be inferred. For example, if the temperature is high at the center of the circuit board and low at the edges, the central region may exhibit an upward-arching warping shape; conversely, if the copper foil layer on one side is thicker and has higher thermal conductivity, the expansion on that side will be greater, easily causing local bending. Based on these thermodynamic change characteristics, the changes in the temperature field are mapped to morphological change information on the circuit board surface, forming a spatial correspondence between temperature and deformation. This correspondence, by recording the changes in surface height, tilt angle, and relative displacement trend of the circuit board at different temperatures, constitutes a spatial model of the circuit board's morphological changes, namely, a temperature-related morphological mapping model.

[0024] After obtaining the temperature-related morphological mapping model, the morphological changes of the circuit board under different temperature conditions are reconstructed to form a dynamically updated circuit board deformation reference band. Specifically, the temperature-related morphological mapping results obtained in the previous step are superimposed and analyzed in chronological order, and the morphological states of the circuit board at each moment in the heating, isothermal, and cooling stages are continuously arranged along the time axis. For the morphological data at each moment, it is projected onto the three-dimensional spatial model of the circuit board through coordinate mapping to form a spatial representation of a continuous surface. By superimposing the morphological surfaces at each moment, the trajectory of the circuit board's morphological changes throughout the entire temperature change cycle can be obtained, thereby generating a deformation reference band that reflects the evolution law of the circuit board's morphology. In this reference band, each spatial location not only contains the spatial height information of the circuit board surface at a specific temperature, but also records its morphological trend over time. For example, after the warpage height of a certain area reaches its maximum value in the high-temperature stage, it gradually falls back to a near-planar state in the cooling stage. This change process will be expressed in the deformation reference band as a continuous height change curve. This deformation reference band, updated in real time, reflects the spatial shape changes of the circuit board at different time points, enabling subsequent focus adjustments to be accurately matched based on the current shape state.

[0025] Finally, the generated circuit board deformation reference band is used as the spatial positioning basis for focal length adjustment in the image acquisition stage. Before image acquisition, the offset of each position on the circuit board surface relative to the standard focal plane is determined based on the spatial height information recorded in the deformation reference band. Then, these offset data are converted into spatial positioning commands required for the camera device to adjust the focal length, enabling the camera device to automatically adjust the focal length for different positions during imaging. When the camera device performs a global scan of the circuit board, the focal length adjustment device changes the focal length in real time according to the spatial information of the deformation reference band, ensuring that the focal plane of the camera device remains consistent with the actual surface of the circuit board throughout the scanning process. In this way, even if the circuit board experiences local warping or slight deformation after high-temperature operation, precise focal length matching can be achieved during image acquisition, thus ensuring consistent image clarity across all areas. At the same time, the time update mechanism of the deformation reference band can continuously correct the focal length offset during the production cycle, ensuring that the focal plane always follows the actual shape changes of the circuit board, avoiding image edge blurring or feature distortion caused by focal length deviation. This process not only ensures the stability of image quality but also provides a more reliable image foundation for subsequent visual recognition.

[0026] Through the above steps, from temperature acquisition on the circuit board surface to the establishment of shape mapping, and then to the generation of deformation reference bands and their correspondence with focal length space, a complete temperature-related deformation tracking process is formed, which enables the shape changes of the circuit board after high-temperature processing to be accurately captured and effectively used for focal length adjustment.

[0027] Step Two: Utilizing a deformation reference band, a dynamic focal plane tracking chain is constructed during image acquisition. Height change information of corresponding areas within the deformation reference band is converted into focal length displacement control commands, driving real-time focal length adjustment of the camera device to ensure synchronized focal length changes with circuit board deformation. The specific implementation of this step is as follows: After the circuit board deformation reference band is generated, its spatial height information is imported into the focal plane construction unit to determine the height variation distribution of the circuit board in different areas. Specifically, using the three-dimensional spatial coordinates of the circuit board surface recorded in the deformation reference band, each local area of ​​the circuit board is spatially divided, allowing independent identification of the height change in each area. To ensure the accuracy of the spatial information, the reference plane on the circuit board surface is set as the focal length zero point, and the height offset value of each position on the circuit board relative to this reference plane is extracted. This height offset value reflects the actual deformation amplitude of the circuit board under high temperature and also represents the spatial distance difference between each area and the focal plane. In this way, the overall spatial height distribution of the circuit board surface can be obtained before focal length adjustment, providing continuous morphological input data for the subsequent construction of the dynamic focal plane tracking chain.

[0028] After obtaining the height offset values ​​of each region on the circuit board surface, a dynamic focal plane change path is established based on the spatial data of the deformation reference band to form a spatial framework for focal plane tracking. Specifically, the height information of each spatial position in the deformation reference band is correlated with the spatial coordinates of the circuit board surface, and the spatial change curve of the focal plane is determined by continuous interpolation. This curve reflects the fluctuation trend of the focal plane in space and the dynamic change rhythm of the circuit board deformation in time. To ensure the continuity of focal plane tracking, the focal plane change path is segmented according to the scanning direction and imaging sequence of the circuit board, so that each scanning area has an independent focal plane change trajectory. In this way, a dynamic focal plane change path covering the entire circuit board surface can be obtained. This path is consistent with the deformation reference band in space and synchronized with the imaging rhythm in time, providing a basis for the subsequent generation of focal length displacement commands.

[0029] After the focal plane change path is determined, the height change information of the corresponding area in the deformation reference band is converted into a focal length displacement control command. Specifically, based on the height offset of each area on the circuit board surface relative to the reference focal plane, the required focal length adjustment distance is calculated, and a focal length displacement control command is generated accordingly. This control command converts the height difference of each local area into displacement parameters that can drive the focal length adjustment mechanism. To ensure the real-time and continuous nature of the focal length adjustment, the focal length displacement control commands are arranged according to the spatial order of the deformation reference band, so that the focal length change can be synchronized with the spatial change of the circuit board surface. In this process, the focal length displacement control command not only reflects the adjustment range at each position but also includes the directional information of the focal length change, which is used to indicate the movement trend of the focal plane during the imaging process. In this way, the focal length adjustment action can accurately correspond to the actual deformation state of the circuit board, achieving a dynamic correspondence between spatial position and focal length displacement.

[0030] After the focal length displacement control command is generated, it is input to the focal length adjustment device in real time to drive the focal length change of the camera device, ensuring that the focal length adjustment process is synchronized with the deformation of the circuit board. During image acquisition, the camera device moves gradually along the scanning path of the circuit board, and the focal length adjustment device continuously adjusts the lens position according to the real-time input displacement control command, ensuring that the focal plane of the camera device always remains consistent with the actual surface shape of the circuit board. When there is a height difference or warping in a local area of ​​the circuit board, the focal length adjustment device can promptly change the focal length position according to the height change of the corresponding area in the deformation reference band, thereby maintaining a clear imaging effect throughout the imaging process. At the same time, as the deformation of the circuit board changes over time, the focal length adjustment process is automatically updated accordingly, achieving dynamic synchronization between focal length changes and circuit board deformation. Throughout the imaging process, the focal plane tracking chain is continuously updated according to the real-time changes of the deformation reference band, making the focal length adjustment of the camera device in different areas both continuous and responsive, avoiding local blurring or imaging distortion caused by focal length deviation. This real-time focus adjustment method not only enables dynamic focusing of the circuit board under high-temperature deformation, but also ensures the consistency of imaging and the stability of sharpness throughout the entire image acquisition stage.

[0031] Through the aforementioned sequential steps, a complete dynamic focal plane tracking chain is formed, encompassing the extraction of height information from the deformation reference zone, the construction of the focal plane change path, the generation of focal length displacement control commands, and real-time driving of focal length adjustment. This tracking chain can continuously respond to changes in the circuit board's shape during the image acquisition stage, enabling the focal length adjustment to correspond synchronously with the circuit board deformation in both space and time. This effectively improves the spatial accuracy and sharpness consistency of circuit board inspection imaging.

[0032] Step 3: Based on the dynamic focal plane tracking chain, spatial repositioning processing is performed on the continuously acquired circuit board images. Focal length displacement control commands are input into the image registration channel, and spatial geometric correction is used to achieve continuous connection of image sharpness across multiple regions, thereby obtaining a stable imaging result with consistent focal length. The specific implementation of this step is as follows: After the dynamic focal plane tracking chain is constructed and focal length displacement control commands are generated, continuous image acquisition of the circuit board begins. To ensure consistency between image acquisition and focal length adjustment, a spatial scanning path is established across the entire surface of the circuit board. This scanning path is divided according to the height changes recorded in the circuit board deformation reference band, so that each scanning area corresponds to a specific focal length displacement state. As the camera device moves gradually along the scanning path, it adjusts the focal length in real time according to the focal length displacement control commands, keeping the focal plane at each acquisition position synchronized with the actual surface of the circuit board. When the camera device moves from one area to the next, the focal length is continuously updated according to the deformation trend, thereby ensuring that the local sharpness of the images in each area remains consistent. Meanwhile, during the acquisition process, to ensure the traceability of spatial relationships between images, the spatial position information of each frame of image and the corresponding focal length displacement state are recorded synchronously to form a continuous spatial coordinate link, providing accurate spatial basis for subsequent image registration and repositioning.

[0033] After obtaining a continuous image sequence and corresponding focal length displacement information, the focal length displacement control command is input into the image registration channel, establishing a spatial correspondence between each image and the actual shape of the circuit board. Specifically, the image registration channel uses the deformation reference band of the circuit board as a reference and remaps each acquired frame of image in space according to the focal length displacement information. By combining the displacement data in the focal length displacement control command with the spatial coordinates of the image, the precise position of each image in three-dimensional space can be determined, ensuring that the overlapping areas between adjacent images remain consistent in space. Since the deformation of the circuit board often exhibits a localized irregular distribution, the focal length displacement information can effectively correct the image displacement error caused by deformation, ensuring that the focal plane of each image matches the actual height of the board surface during spatial registration. In this way, the correspondence between focal length adjustment and image spatial position is clearly established, laying the foundation for achieving geometric correction between continuous regions.

[0034] After the focal length displacement control command completes image spatial registration, spatial geometric correction is performed on continuous images to eliminate spatial distortion caused by circuit board deformation and focal length changes. Specifically, firstly, based on the spatial position information formed in the registration channel, the continuously acquired images are spatially projected, allowing each image to be repositioned in the same coordinate system. By comparing the boundary positions and overlapping areas of adjacent images in spatial coordinates, the spatial bending or stretching trend caused by focal length changes can be determined. Based on this, geometric correction is performed on the images to achieve a continuous transition between the boundaries of adjacent images in space. During the geometric correction process, the height change information in the focal length displacement control command is used to correct the perspective aberration caused by the curvature of the focal plane, ensuring visual consistency of surface flatness when the image is projected in space. The geometrically corrected image can achieve continuous connection between multiple regions, eliminating image edge blurring, ghosting, or misalignment caused by focal length changes, thereby ensuring the geometric continuity of the entire circuit board imaging.

[0035] After spatial geometric correction, the registered and corrected multi-region images are repositioned and fused to obtain a stable imaging result with consistent focal length. Specifically, according to the spatial position sequence in the dynamic focal plane tracking chain, the corrected images are arranged sequentially according to the acquisition order, ensuring seamless spatial connection between the images of each region. By establishing continuous brightness and texture transitions in the overlapping parts of adjacent images, the entire circuit board image forms a visually uniform and clear surface. Since the focal length adjustment process is synchronized with the circuit board deformation, the image sharpness of each local region is spatially balanced, eliminating blurring caused by focus shift. Simultaneously, the repositioned overall image corresponds to the true physical shape of the circuit board in spatial coordinates, fully reflecting the structural features and component distribution of the circuit board. In this way, the global imaging of the circuit board not only maintains consistency in focal length but also achieves stable spatial geometric connection, thus forming a detection image with high-precision spatial consistency and uniform sharpness, providing high-quality visual input for subsequent feature recognition and defect judgment.

[0036] This step utilizes a dynamic focal plane tracking chain to achieve spatial repositioning of the circuit board image. The focal length displacement control command plays a core spatial coordination role throughout the process, ensuring that focal length adjustment and image repositioning maintain a precise spatial correspondence. This guarantees the continuous connection of image sharpness across multiple regions and the consistent stability of imaging results, effectively solving the imaging misalignment problem of the circuit board under deformation conditions. It enables the imaging process to maintain spatial consistency and visual stability in dynamic environments.

[0037] Step 4: Based on the spatially repositioned circuit board image, extract the illumination response features of each region to generate an illumination response distribution table. Compensate for brightness unevenness caused by differences in incident angles according to the illumination response distribution table, ensuring that the image after focus adjustment maintains brightness balance under different lighting conditions. The specific implementation of this step is as follows: After the circuit board image is spatially repositioned, illumination response features are extracted from different regions of the circuit board surface. Specifically, based on the spatially repositioned image, the circuit board surface is divided into several subdivided regions, each corresponding to a spatial coordinate position determined in the deformation reference band. To obtain the illumination response features of each region, the incident angle direction and reflection intensity of light in that region are determined by analyzing the pixel brightness distribution, reflection texture features, and shadow distribution trend within the region. Since the circuit board surface is composed of various materials, including metal pads, silkscreen text, solder mask, and component packaging surfaces, the differences in reflectivity of different materials will lead to different brightness performances in the illumination response features. By sampling and comparing the reflection features of each region in space, the overall illumination distribution pattern of the circuit board can be obtained. To ensure the spatial continuity of the extracted illumination response features, the extraction process uses relocation coordinates as an index to establish a one-to-one mapping relationship between each illumination feature point and its corresponding spatial location, thereby providing an accurate spatial reference for the subsequent generation of the illumination response distribution table.

[0038] After extracting the illumination response features, an illumination response distribution table for the circuit board is generated based on the extraction results. This table describes the brightness response patterns of different regions on the circuit board surface under different incident illumination conditions. Specifically, the illumination response features are arranged according to the spatial coordinates of the circuit board, so that each position corresponds to its brightness response intensity, reflection direction, and relative illumination difference. In this way, an illumination response mapping structure covering the entire circuit board surface is formed. To enhance the spatial continuity of the distribution table, the differences in illumination response between adjacent regions are smoothly transitioned, so that brightness changes present a continuous gradient rather than abrupt changes in space. This distribution table not only records the brightness state of each region under the current illumination conditions but also includes the correspondence between the reflectivity of the circuit board surface material and the direction of incident light, thus accurately reflecting the degree to which different regions are affected by illumination. Through this spatially structured approach, the illumination response distribution table becomes the basis for the subsequent brightness compensation process, enabling each region of the circuit board to undergo personalized compensation based on its own illumination characteristics during imaging.

[0039] After the illumination response distribution table is established, the uneven brightness caused by differences in incident angle is analyzed based on the table to determine the spatial area and magnitude of compensation. Specifically, the illumination response distribution table is compared with the actual imaging brightness distribution of the circuit board. By analyzing the brightness gradient change trend between adjacent areas, areas with strong illumination influence and areas with weak illumination obstruction are identified. For example, when there are height differences between components on the circuit board surface, the sides of taller components are prone to forming shading areas, while the metal pad area exhibits localized brightness due to strong reflection. By performing spatial difference analysis on the brightness distribution of these areas, the degree and directionality of the uneven illumination distribution can be determined. Subsequently, these differential areas are mapped to their corresponding positions on the circuit board surface according to spatial repositioning coordinates, thereby clarifying the spatial range requiring brightness compensation. To ensure a smooth transition in compensation, the analysis process is based on the spatial gradient information in the illumination response distribution table, ensuring that the compensation result remains spatially continuous and avoiding abrupt brightness jumps or unnatural light and shadow transitions in the image after brightness compensation.

[0040] Finally, based on the spatial illumination characteristics and brightness differences determined in the illumination response distribution table, illumination compensation is performed to ensure that the image after focus adjustment maintains brightness uniformity under different illumination conditions. Specifically, at each spatial location of the image, the target brightness value that should be present under the current illumination conditions is calculated according to the reflection intensity and incident angle direction recorded in the illumination response distribution table. After comparing the current imaging brightness with the target brightness, the brightness of the local area is dynamically corrected by adjusting the exposure time, illumination intensity distribution, or area gain parameters. After the compensation operation is completed on the entire circuit board surface, the overall brightness distribution of the image exhibits a uniform characteristic and is no longer affected by differences in incident angle or changes in reflection intensity. Especially when multiple materials reflect each other on the circuit board surface, the compensation result makes the brightness of the pad area, silkscreen area, and device package surface visually consistent, thereby ensuring the overall balance and visual clarity of the image. In addition, since the compensation process relies on spatial repositioning coordinates, the spatial correspondence of the illumination distribution can still be maintained even under circuit board deformation, ensuring that the imaging results remain stable and consistent when illumination conditions change.

[0041] Through the above steps, an illumination response compensation mechanism is further introduced on the basis of focus adjustment and spatial repositioning, so that the image after focus adjustment can achieve brightness balance and visual consistency under different illumination conditions, providing a more stable and reliable image foundation for circuit board inspection.

[0042] Step 5: Establish a dynamic weighted sharpness control mechanism based on the illumination response distribution table. This mechanism jointly weights the focal length adjustment results with the illumination compensation results, outputting a compensated detection image through dynamic weighted sharpness control. This achieves real-time suppression and accurate identification of blurred areas caused by high-temperature deformation. The specific implementation of this step is as follows: After obtaining the illumination response distribution table, the circuit board image after focal length adjustment and illumination compensation is divided into sharpness regions to determine the visual weight distribution of each region during the imaging process. Specifically, based on the brightness distribution information recorded in the illumination response distribution table, the circuit board image is divided into multiple spatial sub-regions, each corresponding to different illumination conditions and focal length states. To accurately describe the imaging quality of each region, the texture sharpness, edge sharpness, and brightness stability of the image within the region are analyzed to determine its sharpness reference value. This reference value reflects the imaging quality level of the region under the current focal length and illumination conditions. By combining these sharpness reference values ​​with the illumination response intensity in the illumination response distribution table, a sharpness distribution map is obtained. This map uses spatial coordinates as an index and records the initial sharpness weight values ​​for each position on the circuit board surface. In this way, a basic sharpness distribution structure that is dynamically related to lighting conditions and focal length is formed throughout the entire circuit board, providing basic data for the subsequent establishment of a sharpness dynamic weight control mechanism.

[0043] After obtaining the sharpness distribution map, a dynamic sharpness weight control mechanism is established based on the spatial correspondence between the illumination response distribution table and the focal length adjustment results. Specifically, the spatial brightness change trend recorded in the illumination response distribution table is superimposed with the focal plane tracking data generated during the focal length adjustment process, so that each spatial location corresponds to both illumination distribution characteristics and focal length change information. By analyzing the combined impact of focal length shift and illumination differences at different locations on image sharpness, the dynamic range of sharpness weight is determined. For example, when a certain area experiences local blurring due to focal plane shift, the system reduces the sharpness weight of that area; conversely, when an area has uniform illumination and good focal length matching, its sharpness weight is increased. In this way, the dynamic sharpness weight control mechanism can automatically adjust the weight of each area in the spatial dimension according to the real-time imaging status, ensuring that the overall image sharpness remains balanced globally. Simultaneously, in the temporal dimension, this control mechanism can be continuously updated as image acquisition progresses. When changes in circuit board deformation lead to changes in focal length or illumination conditions, the sharpness weight value is automatically adjusted to ensure the dynamic stability of image sharpness.

[0044] After the dynamic weighted sharpness control mechanism is established, the focus adjustment results and illumination compensation results are jointly weighted according to the sharpness weight distribution to generate fused image data. Specifically, the focus adjustment results are used as the main channel, and the illumination compensation results as the auxiliary channel. Weighted fusion is performed at each spatial location according to the corresponding sharpness weight. When the imaging quality of the focus adjustment area is high but the illumination difference is large, the sharpness weight control mechanism will favor the focus channel to maintain the spatial sharpness of that area. When the brightness balance of the illumination compensation area is better, the weight control mechanism will increase the proportion of the illumination channel, making the overall image visually balanced. Through this joint weighting method, mutual compensation can be achieved in both focus and illumination aspects, allowing the image sharpness and brightness to be optimized simultaneously globally. During the weighted processing, the sharpness weight control mechanism continuously makes local adjustments based on the spatial characteristics of the circuit board to ensure a smooth transition in sharpness changes between adjacent areas, avoiding excessive edge sharpening or brightness discontinuities, thus ensuring that the output image remains visually natural and coherent.

[0045] After joint weighted processing, the result adjusted by the dynamic sharpness weight control mechanism is output as a compensated detection image, thereby achieving real-time suppression and accurate identification of blurred areas caused by high-temperature deformation. Specifically, in the output stage, the dynamic sharpness weight control mechanism determines the sharpness output ratio of the entire image based on the final weight distribution of each region, ensuring visual consistency between the results of focus adjustment and illumination compensation. When a local area of ​​the circuit board warps or deforms due to heat, causing the focal plane to deviate, the sharpness weight of that area is automatically reduced, while the brightness equalization information provided by the illumination compensation channel is enhanced, thus suppressing the visual impact of blurred areas. Conversely, in areas where the focal length is perfectly matched and the illumination conditions are ideal, the sharpness weight control mechanism increases the proportion of the focus adjustment result, maintaining the highest imaging sharpness in that area. Through this dynamic balance control method, the output detection image achieves overall coordination and consistency in focal length, illumination, and spatial sharpness, resulting in clear details and distinct edge structures on the circuit board surface, maintaining stable detection performance even under high-temperature deformation conditions. The final output detection image not only has high brightness uniformity and high spatial consistency, but also eliminates the local blurring problem caused by focal length shift, uneven illumination and deformation distortion, providing a reliable visual basis for the accurate identification of circuit board defects.

[0046] Through the above consecutive steps, a complete dynamic weight control process for sharpness is formed. This process is based on the illumination response distribution table and integrates the focal length adjustment and illumination compensation results to achieve real-time imaging optimization of the circuit board under high temperature deformation conditions.

[0047] This invention introduces a dynamic focal plane tracking chain during the image acquisition stage, enabling real-time synchronization of focus adjustment with circuit board deformation. This ensures the focal plane maintains a spatial correspondence with the circuit board surface throughout the acquisition process, fundamentally eliminating localized defocusing caused by thermal deformation. Through temperature-correlated morphological mapping and dynamic updates of the deformation reference band, the camera achieves automatic focusing in different areas, ensuring consistent sharpness in both edge and center regions of the acquired image. This effectively improves the stability and spatial consistency of the detection imaging.

[0048] This invention achieves a joint weighted output of focus adjustment and illumination compensation results through the synergistic application of an illumination response distribution table and a dynamic weighted control mechanism for sharpness. This ensures a dynamic balance between brightness and sharpness in the detected image. The compensated image maintains overall brightness uniformity and clear local details even under complex lighting conditions, effectively suppressing blurred areas caused by high-temperature deformation. This ensures accurate presentation of defect features during detection, thereby improving the accuracy and reliability of visual inspection.

[0049] This invention provides a computer vision-based circuit board inspection system, as shown in Figure 2, including a temperature deformation modeling module, a dynamic focal plane tracking module, a spatial repositioning processing module, an illumination response compensation module, and a sharpness weight control module. The temperature deformation modeling module acquires temperature field distribution data on the circuit board surface based on the structural deformation caused by uneven heating after high-temperature operation, and establishes a temperature-related morphological mapping model based on the temperature field distribution data. This morphological mapping model generates a time-updated circuit board deformation reference band. The dynamic focal plane tracking module utilizes the deformation reference band to construct a dynamic focal plane tracking chain during image acquisition, converting the height change information of the corresponding area in the deformation reference band into focal length. The system includes: a displacement control module that drives real-time focal length adjustment of the camera device; a spatial repositioning processing module that performs spatial repositioning processing on continuously acquired circuit board images based on a dynamic focal plane tracking chain, inputting focal length displacement control commands into the image registration channel; an illumination response compensation module that extracts illumination response features of each region based on the spatially repositioned circuit board image, generates an illumination response distribution table, and compensates for brightness unevenness caused by differences in incident angle according to the illumination response distribution table; and a sharpness weight control module that establishes a sharpness dynamic weight control mechanism based on the illumination response distribution table, jointly weighting the focal length adjustment results and illumination compensation results, and outputting the compensated detection image through sharpness dynamic weight control.

[0050] The computer vision-based circuit board inspection method provided in this embodiment of the invention is implemented through the aforementioned computer vision-based circuit board inspection system. For details of the specific methods and processes of the computer vision-based circuit board inspection system, please refer to the embodiments of the aforementioned computer vision-based circuit board inspection method, which will not be repeated here.

[0051] The foregoing has only described certain exemplary embodiments of the present invention by way of illustration. Undoubtedly, those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the foregoing drawings and descriptions are illustrative in nature and should not be construed as limiting the scope of protection of the claims of the present invention.

Claims

1. A circuit board inspection method based on computer vision, characterized in that, Includes the following steps: Step 1: Based on the structural deformation of the circuit board caused by uneven heating after high-temperature operation, acquire the temperature field distribution data of the circuit board surface, and establish a temperature-related morphological mapping model based on the temperature field distribution data. Generate a circuit board deformation reference band that updates over time through the morphological mapping model. Step 2: Using the deformation reference band, construct a dynamic focal plane tracking chain during image acquisition. Convert the height change information of the corresponding area in the deformation reference band into focal length displacement control commands and drive the focal length adjustment of the camera device in real time. Step 3: Based on the dynamic focal plane tracking chain, perform spatial repositioning processing on the continuously acquired circuit board images, and input the focal length displacement control commands into the image registration channel. Step 4: Based on the spatially repositioned circuit board images, extract the illumination response features of each area, generate an illumination response distribution table, and compensate for the brightness unevenness caused by the difference in incident angle according to the illumination response distribution table. Step 5: Based on the illumination response distribution table, establish a sharpness dynamic weight control mechanism, jointly weight the focal length adjustment results and illumination compensation results, and output the compensated detection image through sharpness dynamic weight control.

2. The circuit board inspection method based on computer vision according to claim 1, characterized in that, The steps for acquiring temperature field distribution data on the surface of a circuit board and establishing a temperature-related morphological mapping model include: after the circuit board has undergone high-temperature processing, temperature field distribution data is collected from different areas of the circuit board surface. Temperature sensing points are deployed at multiple key locations on the circuit board, or non-contact infrared thermometry is used to acquire temperature change data during the heating, isothermal, and cooling stages, and a correspondence is established between each temperature acquisition point and the physical coordinates of the circuit board. After acquiring the temperature field distribution data, a spatial correspondence is established between temperature changes and circuit board morphological changes. The direction and magnitude of the temperature gradient in each area are analyzed to determine the thermal stress distribution trend, and the temperature field changes are mapped to morphological change information on the circuit board surface, forming a temperature-related morphological mapping model. After obtaining the temperature-related morphological mapping model, the morphological changes of the circuit board under different temperature conditions are reconstructed and superimposed in chronological order to form a circuit board deformation reference band that can be dynamically updated over time. The circuit board deformation reference band is used as the spatial positioning basis for focal length adjustment. Before image acquisition, the focal length offset at each position is determined based on the spatial height information recorded in the deformation reference band, and the offset is converted into a spatial positioning command for focal length adjustment of the camera device.

3. The circuit board inspection method based on computer vision according to claim 1, characterized in that, The steps for constructing a dynamic focal plane tracking chain using a deformation reference band include: after the deformation reference band on the circuit board is generated, the spatial height information of the deformation reference band is imported into the focal plane construction unit to spatially divide the circuit board surface into layers to determine the height offset value of each region relative to the reference focal plane; after obtaining the height offset value of the circuit board surface, a dynamic focal plane change path is established based on the spatial data of the deformation reference band, the spatial change curve of the focal plane is determined by continuous interpolation, and the focal plane change trajectory is described segmentally according to the scanning direction and imaging sequence of the circuit board; after the focal plane change path is determined, the height change information of each region in the deformation reference band is converted into focal length displacement control commands, and focal length displacement parameters are generated according to the height offset of each region relative to the reference focal plane; after the focal length displacement control commands are generated, the commands are input to the focal length adjustment device in real time to drive the focal length change of the camera device.

4. The circuit board inspection method based on computer vision according to claim 3, characterized in that, The steps for spatial repositioning of continuously acquired circuit board images based on a dynamic focal plane tracking chain include: after the dynamic focal plane tracking chain is constructed and focal length displacement control commands are generated, continuous images of the circuit board are acquired, and a spatial scanning path is established on the surface of the circuit board so that each scanning area corresponds to a different focal length displacement state. At the same time, the spatial position information and focal length displacement state of each frame image are recorded to form a continuous spatial coordinate link; after obtaining the continuous image sequence and corresponding focal length displacement information, the focal length displacement control command is input into the image registration channel, and the image is spatially remapped with the deformation reference band as a reference to establish a correspondence between focal length adjustment and image spatial position; after the image spatial registration is completed, spatial geometric correction is performed on the continuously acquired images to correct the perspective aberration caused by focal plane curvature according to the height change information in the focal length displacement control command; after the spatial geometric correction is completed, the registered and corrected multi-region images are repositioned and fused to make the images of adjacent regions seamlessly connected in space and achieve continuous transition in brightness and texture, thereby obtaining a circuit board imaging result with consistent focal length.

5. The circuit board inspection method based on computer vision according to claim 4, characterized in that, During the spatial geometric correction process, the spatial projection of the circuit board image is adjusted using the height change information in the focal length displacement control command, so that each image is repositioned in the same coordinate system and a continuous transition is established in the overlapping area of ​​adjacent images.

6. The circuit board inspection method based on computer vision according to claim 4, characterized in that, The steps for extracting illumination response features and performing brightness compensation based on the spatially relocated circuit board image include: after the circuit board image is spatially relocated, illumination response features are extracted from different areas of the circuit board surface. The circuit board surface is divided into multiple subdivided areas, and the pixel brightness distribution, reflection texture features, and shadow distribution trends of each area are obtained based on the relocation coordinates to form illumination response feature data; after completing the illumination response feature extraction, an illumination response distribution table of the circuit board is generated based on the extraction results. The illumination response features of each area are arranged according to spatial coordinates, and the illumination differences between adjacent areas are smoothed; after the illumination response distribution table is established, the brightness unevenness caused by the difference in incident angle is analyzed based on the illumination response distribution table. The compensation area and compensation magnitude are determined by comparing the brightness gradient of adjacent areas, and the difference areas are mapped to the corresponding spatial positions; after determining the compensation range, the illumination compensation operation is performed based on the reflection intensity and incident angle direction recorded in the illumination response distribution table to dynamically correct the brightness of each area.

7. The circuit board inspection method based on computer vision according to claim 6, characterized in that, In the illumination compensation operation, the illumination response distribution table is used to perform graded compensation on each area of ​​the circuit board surface. By adjusting the exposure time and area gain parameters, the brightness of each area is made to transition continuously in space.

8. The circuit board inspection method based on computer vision according to claim 6, characterized in that, The steps for establishing a dynamic weighted sharpness control mechanism based on an illumination response distribution table and outputting a compensated detection image include: after obtaining the illumination response distribution table, dividing the circuit board image after focus adjustment and illumination compensation into sharpness regions, and determining the sharpness reference value of each region based on the brightness distribution information in the illumination response distribution table to form a sharpness distribution map to reflect the initial sharpness weight values ​​of each position on the circuit board surface; after obtaining the sharpness distribution map, establishing a dynamic weighted sharpness control mechanism based on the spatial correspondence between the illumination response distribution table and the focus adjustment results, determining the dynamic range of sharpness weight changes by superimposing illumination brightness change trends and focal plane tracking data, and adjusting the weight of each region in real time during the imaging process; after establishing the dynamic weighted sharpness control mechanism, jointly weighting the focus adjustment results and illumination compensation results according to the sharpness weight distribution to achieve dynamic fusion of focus and illumination at each spatial position; after completing the joint weighting process, outputting a compensated detection image based on the final sharpness weight distribution of each region.

9. The circuit board inspection method based on computer vision according to claim 8, characterized in that, In the dynamic weight control mechanism for sharpness, the adjustment of sharpness weight is updated in real time based on the spatial correspondence between the illumination response distribution table and the focal length adjustment result. The weight of each region is continuously and smoothly transitioned through the joint weighted processing of focal length adjustment and illumination compensation.

10. A computer vision-based circuit board inspection system, used to implement the computer vision-based circuit board inspection method according to any one of claims 1-9, characterized in that, The system includes a temperature deformation modeling module, a dynamic focal plane tracking module, a spatial repositioning processing module, an illumination response compensation module, and a sharpness weight control module. The temperature deformation modeling module acquires temperature field distribution data on the circuit board surface based on the structural deformation caused by uneven heating after high-temperature operation. It then establishes a temperature-related morphological mapping model based on this data, generating a time-updated circuit board deformation reference band. The dynamic focal plane tracking module constructs a dynamic focal plane tracking chain during image acquisition using the deformation reference band. It converts the height change information of the corresponding area in the deformation reference band into focal length displacement control commands, driving the camera's focal length adjustment in real time. The spatial repositioning processing module performs spatial repositioning processing on continuously acquired circuit board images based on the dynamic focal plane tracking chain, inputting the focal length displacement control commands into the image registration channel. Illumination response compensation module: Based on the spatially repositioned circuit board image, extract the illumination response features of each region, generate an illumination response distribution table, and compensate for the uneven brightness caused by the difference in incident angle according to the illumination response distribution table; Sharpness weight control module: Based on the illumination response distribution table, a dynamic sharpness weight control mechanism is established. The focus adjustment result and the illumination compensation result are jointly weighted and processed, and the compensated detection image is output through dynamic sharpness weight control.