Path planning method and system for substrate binocular imaging inspection machine

By dividing the PCB board and camera lens module into regions and pairing and scheduling tasks, and optimizing path planning, the problems of low detection efficiency and collision interference of traditional monocular cameras are solved, and efficient and accurate binocular camera detection is achieved.

CN120543649BActive Publication Date: 2025-12-02GUANGDONG UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510782174.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-12
Publication Date
2025-12-02
Estimated Expiration
2045-06-12

AI Technical Summary

Technical Problem

Traditional path planning algorithms for monocular cameras cannot meet the requirements for high-precision and high-efficiency PCB hole position detection, especially on complex PCBs where low detection efficiency and collision interference are common problems.

Method used

A path planning method for a substrate binocular imaging inspection machine is adopted. By dividing the PCB board and camera lens module into regions, a region task pairing and scheduling model is designed. A variable domain search algorithm is used to optimize path planning, avoid camera interference, and utilize binocular camera collaborative inspection.

Benefits of technology

It improves detection efficiency, reduces the rate of missed and false detections, reduces equipment downtime and energy costs, enhances detection accuracy, and ensures product quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120543649B_ABST
    Figure CN120543649B_ABST
Patent Text Reader

Abstract

The path planning method for a stereo imaging inspection machine for PCB boards includes the following steps: S1. First, analyze and process the dimensional data of the PCB board and the two camera lens modules, including equipment parameters and inspection board data; S2. Divide the inspection board into regions based on the two camera lens modules. Constrain the working range of the camera lens modules according to their size and travel range. Design an 8-region division method based on the hole position characteristics of the inspection board; S3. Establish an integer programming model for pairing and scheduling regional tasks of the two camera lens modules. Based on the division results of the 8 working regions, pre-allocate the inspection task groups of the two camera lens modules; S4. Use a single-region path planning algorithm, employing a variable neighborhood search algorithm to solve for the shortest path connecting all inspection holes in the current region for a single camera lens module. This solution aims to prevent collision and interference problems between the two sets of cameras when collaboratively imaging PCB boards using stereo cameras.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to circuit board inspection technology, and in particular to a path planning method and system for a binocular imaging inspection machine for substrates. Background Technology

[0002] PCB hole location inspection path planning is a complex task involving multi-factor optimization. It primarily improves efficiency and reduces inspection costs by rationally planning the movement path of the inspection equipment. Traditional AOI-based inspection methods in China typically use a single-lens optical camera that moves in two dimensions using path planning algorithms to photograph each inspection point. Currently, with the increasing precision, integration, and complexity of PCBs, the number of holes on a single circuit board is enormous, densely distributed, and irregularly shaped. The requirements for inspection accuracy and speed are also increasing. Traditional monocular cameras cannot meet the production needs of enterprises due to their limited image capture rate, outdated and simplistic inspection algorithms, low inspection efficiency, and failure to fully consider the actual inspection scenario and the characteristics of the substrate.

[0003] Today, companies are gradually improving their detection solutions by using binocular imaging equipment and combining multiple devices with detection algorithms to increase detection efficiency, such as... Figure 1 The improved device shown mounts two detection cameras and a moving lead screw on both sides of the detection plate. The two cameras perform collaborative imaging detection in a two-dimensional direction. The main problems include the small size of the detection plate, the large number of detection points with uneven and random distribution, and a large area of ​​interference zone between the two cameras, resulting in a high proportion of images captured in the interference zone. Therefore, it is necessary to fully consider the collision interference between the two detection devices and the optimization of the combined path. Traditional path planning algorithms for monocular cameras cannot meet the detection efficiency requirements. Summary of the Invention

[0004] To address the aforementioned shortcomings, this invention proposes a path planning method and system for a substrate binocular imaging inspection machine. This method aims to improve the imaging inspection efficiency of PCB boards with a large number of holes by using a binocular camera for collaborative imaging, while preventing collision and interference problems.

[0005] To achieve this objective, the present invention adopts the following technical solution:

[0006] The path planning method for a substrate binocular imaging inspection machine includes the following steps:

[0007] S1. First, we need to analyze and process the dimensional data of the PCB board and the two camera lens modules, including equipment parameters and test board data.

[0008] S2. The detection board is divided into regions based on the two camera lens modules. The working range of the camera lens modules is constrained according to the size and travel range of the camera lens modules. Based on the hole features of the detection board, an 8-working-region division method is designed, and the collision risk of each region in each working region is evaluated to coordinate the movement position of the two camera lens modules and avoid interference between the two camera lens modules.

[0009] S3. Establish an integer programming model for task pairing and scheduling of two camera lens modules. Based on the division of 8 working areas, pre-allocate detection task groups for the two camera lens modules. Each task in the detection task group has a definite processing time. Then, pair and detect the tasks of the two camera lens modules. Two individual tasks without collision risk constitute a process. A single task that cannot be paired constitutes a separate process. The time of each process corresponds to the single task that takes the longest time in each process.

[0010] S4, Single-region path planning algorithm, uses a variable neighborhood search algorithm to find the shortest path connecting all detection holes in the current region for a single camera lens module.

[0011] Furthermore, in step 1:

[0012] Let the lower left point of the detection plate be the origin of the coordinate system, the length of the detection plate along the X-axis be L, and the width along the Y-axis be W;

[0013] The diameter of the camera lens module is D, the length of the camera lens module is S, the width of the camera lens module is T, the distance from the center detection point of the camera lens module to the right edge of the camera lens module is P, and the center of the lens of the camera lens module represents the lens detection point.

[0014] Furthermore, in step 2:

[0015] Two sets of camera lens modules are arranged opposite each other on the left and right sides of the photo-taking platform. Both sets of camera lens modules have the function of planar movement, and the working range of the camera lens modules can cover the photo-taking platform.

[0016] The X-axis dividing line of the detection plate is set horizontally from the midpoint of the Y-axis direction of the detection plate;

[0017] The Y-axis dividing line of the detection plate divides the detection plate into two rectangular spaces along the Y-axis according to the number of detection points on the plate, so that the number of detection points on the left and right sides is basically equal.

[0018] The front half of the X-axis dividing line has two intersecting zones. The upper ends of the two intersecting zones are flush with the upper end of the detection plate. The width of the left intersecting zone extends to the left of the Y-axis dividing line by a distance of 2 times P, where P is the distance from the center detection point of the camera lens module to the side of the camera lens module facing away from the cross slide. The left edge of the left intersecting zone is the left dividing line, and the upper and lower ends of the left dividing line are connected to the upper and lower ends of the detection plate, respectively. The width of the right intersecting zone extends to the right of the Y-axis dividing line by a distance of 2 times P. The right edge of the right intersecting zone is the right dividing line, and the upper and lower ends of the right dividing line are connected to the upper and lower ends of the detection plate, respectively. The two intersecting zones in the front half of the detection plate are mirror-symmetrically arranged with the X-axis dividing line as the axis. Two more intersecting zones are arranged in the rear half of the detection plate.

[0019] The X-axis dividing line moves forward. The coordinates of the distance are marked with an upper horizontal region boundary line, and the X-axis boundary line extends backward. The coordinates of the distance are divided into a lower horizontal region boundary line, where S is the length of the camera lens module; the two ends of the upper horizontal region boundary line are connected to the left and right boundary lines respectively, and the two ends of the lower horizontal region boundary line are connected to the left and right boundary lines respectively.

[0020] The rectangular area enclosed by the left boundary line, the right boundary line, the upper horizontal area boundary line, and the lower horizontal area boundary line is the conflict zone, which is divided in two by the Y-axis boundary line.

[0021] On the detection plate, the area between the left dividing line and the left edge of the detection plate is the left safe zone, and the area between the right dividing line and the right edge of the detection plate is the right safe zone.

[0022] The detection panel consists of 8 working areas: 4 intersecting zones, 2 conflict zones, a left safety zone, and a right safety zone.

[0023] Furthermore, in step 2:

[0024] The Y-axis dividing line of the detection board divides the entire detection board into two regions, left and right, and the two camera lens modules move in their respective regions.

[0025] When one camera lens module is located in the corresponding safe zone, another camera lens module will not collide with it when moving in the corresponding area.

[0026] When the two camera lens modules are not located in the same side of the intersection area, but are working in two diagonally opposite intersection areas, no collision will occur;

[0027] When one camera lens module is operating in the collision zone, another camera lens module will not collide if it is located in the corresponding safe zone.

[0028] Furthermore, in step 3:

[0029] Problem description:

[0030] Two camera lens modules, denoted as Machine A and Machine B, are each pre-assigned a non-overlapping set of tasks, denoted as J. A ={1,2,…,m} and J B ={1,2,…,n};

[0031] Each task can only be executed by its two associated camera lens modules. The processing time for each task is based on the number of detection points in the area and has a fixed duration. The processing time for machine A's task is... The task processing time for machine A is

[0032] Tasks can be paired for testing, meaning that machine A and machine B each execute one task, forming a process. The duration of the process is determined by the slower machine. Unpaired tasks will be executed alone and occupy a process, with the process time equal to the processing time of the task.

[0033] Defined as:

[0034]

[0035] If there is a conflict between two tasks, they are not allowed to be paired for detection. The conflict relationship is represented by the conflict matrix C = [C i,j ]∈{0,1} m×n Given, where:

[0036]

[0037] Decision variables:

[0038] x i,j ∈{0,1}: If task i∈J A With task i∈J B If pairing is performed, the result is 1;

[0039] u i ∈{0,1}: If task i∈J A If not paired, the value is 1;

[0040] v j ∈{0,1}: If task j∈J B If not paired, the value is 1;

[0041] Objective function:

[0042] Minimize the total execution time of all processes, including paired and unpaired processes:

[0043]

[0044] Constraints:

[0045] (1) Each task must be executed, and only once:

[0046]

[0047] The pairing task must satisfy the conflict table constraint:

[0048]

[0049] (3) Variable definition:

[0050] x i,j ∈{0,1},u i ∈{0,1},v j ∈{0,1};

[0051] Where, x i,j For the task pairing results of the two camera lens modules, u i For the corresponding single camera lens module task pairing results, v j The result of pairing a task with another corresponding single camera lens module.

[0052] Preferably, in step 3:

[0053] In the area planning of dual-camera lens modules, two camera lens modules are allowed to perform detection simultaneously. To measure the efficiency of the planning method, the concept of equivalent aperture number is introduced compared with the single-machine detection algorithm. That is, when two camera lens modules detect one aperture at the same time, it is considered as one equivalent aperture number. If the detection areas of the two camera lens modules conflict, the two camera lens modules need to perform detection sequentially. The two sequences are two units of time. If one detection is completed in two units of time, it is considered as two equivalent aperture numbers.

[0054] In the 8-zone division scheme, the left and right safe zones will not interfere with any zone, while the conflict zone and the unsafe zone will interfere. Therefore, when one machine is in the conflict zone, the other machine should be in the safe zone. Considering the distribution of the board area, the conflict zone on one side is combined with the safe zone on the other side, and the detection sequence is arranged at the beginning and the end.

[0055] Therefore, there are two combinations of regional planning:

[0056] The first type of left-side region detection sequence, from front to back, is as follows: the left-side safe area, the left-side rear interleaving area, the left-side front interleaving area, and the left-side conflict area;

[0057] The first type of right-side region detection sequence, from front to back, is as follows: right-side conflict zone, right-front interleaving zone, right-lower interleaving zone, and right-side safe zone;

[0058] The second type of left-side region detection sequence, from front to back, is as follows: the left-side safe area, the left-front interleaved area, the left-rear interleaved area, and the left-side conflict area;

[0059] The second type of right-side region detection sequence, from front to back, is as follows: right-side conflict zone, lower right-side intersection zone, right-front intersection zone, and right-side safe zone;

[0060] The combination with the fewest equivalent holes is selected as the result of the regional planning combination scheme.

[0061] After the area combination is fixed, the areas are detected in the order of detection. Since the number of detection holes and the size of the area are not necessarily the same, it is assumed that machine A has finished detecting a certain area first. When it is about to detect the next area, it needs to check the area where machine B is currently located. If there is a conflict, machine A will be blocked and needs to wait intermittently for machine B to move to the next area for re-judgment. If there is no conflict, machine A will detect the next area normally.

[0062] Preferably, in step 4, the single-region path planning algorithm treats the region detection problem as multiple traveling salesman problems, and needs to calculate the shortest path connecting all detection holes in the current region;

[0063] The starting point is the vertex of the region to ensure that the region detection time remains stable each time. Since the detection board is divided into multiple small regions, the detection aperture size of a single region is relatively small. Therefore, a variable neighborhood search algorithm is used to solve the TSP problem.

[0064] This solution also proposes a substrate binocular imaging inspection system, which is applied to the above-mentioned substrate binocular imaging inspection machine path planning method, including a left cross slide, a left camera lens module, an imaging platform, a right camera lens module, and a right cross slide;

[0065] The left camera lens module is installed on the left cross slide, and the right camera lens module is installed on the right cross slide. The left and right cross slides are set in a mirror symmetrical arrangement, and a photo-taking platform is set between the left and right cross slides.

[0066] It also includes a controller, and the left cross slide, left camera lens module, right camera lens module and right cross slide are communicatively connected.

[0067] One of the above technical solutions includes the following beneficial effects: This invention designs a detection path planning algorithm based on region division for binocular camera detection algorithms. It divides the detection board into regions based on the size characteristics of the substrate and equipment, and designs different division methods based on the characteristics of the detection board to ensure the applicability of the problem. A binocular region task pairing scheduling integer programming model is established to solve the task. The region scheduling result is optimized while avoiding interference and collisions, and then a variable neighborhood algorithm is used to quickly solve the problem for a single region using the traveling salesman problem. This greatly shortens the detection time, improves equipment efficiency, and saves enterprises significant costs. Through precise region division and intelligent path planning via dual-machine collaboration, detection blind spots are effectively avoided, significantly reducing the rate of missed and false detections, and ensuring product quality. From a cost perspective, the efficient operation of the algorithm reduces the ineffective running time of the equipment and lowers energy consumption costs. At the same time, the improved detection accuracy avoids rework and scrapping due to product quality problems, saving enterprises significant equipment maintenance and material loss costs, creating significant economic benefits and competitive advantages. Attached Figure Description

[0068] Figure 1 This is a flowchart of the method steps of the present invention;

[0069] Figure 2 This is a schematic diagram of the structure of the binocular imaging detection machine of the present invention;

[0070] Figure 3 This is a schematic diagram showing the key dimensions of the testing machine of the present invention;

[0071] Figure 4 This is a schematic diagram of the 8-region division of the present invention;

[0072] Figure 5 This is the regional conflict relationship table of the present invention;

[0073] Figure 6 This is a flowchart of the Variable Neighborhood Algorithm (VNS) of the present invention;

[0074] Figure 7 This is a comparison data table of the effectiveness of the solutions of this invention;

[0075] The components include a left cross slide 100, a left camera lens module 200, a photo-taking platform 300, a right camera lens module 400, and a right cross slide 500. Detailed Implementation

[0076] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0077] The path planning method for a substrate binocular imaging inspection machine includes the following steps:

[0078] S1. First, we need to analyze and process the dimensional data of the PCB board and the two camera lens modules, including equipment parameters and test board data.

[0079] S2. The detection board is divided into regions based on the two camera lens modules. The working range of the camera lens modules is constrained according to the size and travel range of the camera lens modules. Based on the hole features of the detection board, an 8-working-region division method is designed, and the collision risk of each region in each working region is evaluated to coordinate the movement position of the two camera lens modules and avoid interference between the two camera lens modules.

[0080] S3. Establish an integer programming model for task pairing and scheduling of two camera lens modules. Based on the division of 8 working areas, pre-allocate detection task groups for the two camera lens modules. Each task in the detection task group has a definite processing time. Then, pair and detect the tasks of the two camera lens modules. Two individual tasks without collision risk constitute a process. A single task that cannot be paired constitutes a separate process. The time of each process corresponds to the single task that takes the longest time in each process.

[0081] S4, Single-region path planning algorithm, uses a variable neighborhood search algorithm to find the shortest path connecting all detection holes in the current region for a single camera lens module.

[0082] This invention designs a detection path planning algorithm based on region partitioning for binocular camera detection. The detection board is divided into regions based on the size characteristics of the substrate and equipment, and different partitioning methods are designed based on the characteristics of the detection board to ensure applicability. A binocular region task pairing scheduling integer programming model is established to solve the task. The region scheduling result is optimized while avoiding interference and collisions, and then a variable neighborhood algorithm is used to quickly solve the problem for a single region using the traveling salesman problem. This significantly shortens the detection time, improves equipment efficiency, and saves enterprises substantial costs. Through precise region partitioning and intelligent path planning via dual-machine collaboration, detection blind spots are effectively avoided, significantly reducing the rate of missed and false detections, and ensuring product quality. From a cost perspective, the efficient operation of the algorithm reduces the ineffective running time of the equipment and lowers energy consumption costs. At the same time, the improved detection accuracy avoids rework and scrap due to product quality issues, saving enterprises significant equipment maintenance and material loss costs, creating significant economic benefits and competitive advantages.

[0083] In step 1:

[0084] Let the lower left point of the detection plate be the origin of the coordinate system, the length of the detection plate along the X-axis be L, and the width along the Y-axis be W;

[0085] The diameter of the camera lens module is D, the length of the camera lens module is S, the width of the camera lens module is T, the distance from the center detection point of the camera lens module to the right edge of the camera lens module is P, and the center of the lens of the camera lens module represents the lens detection point.

[0086] The main characteristic of PCB inspection is the small size of the inspection board and the large size of the lens assembly. Therefore, collisions and interference are highly likely during movement. This necessitates strict division of the camera's working area. This invention symmetrically positions the camera along the Y-axis on both sides of the inspection board, dividing the area into two rectangular working spaces based on the number of inspection points (not necessarily the PCB board axis), ensuring a roughly consistent number of inspection points on both sides. The camera is limited to inspection within a preset working range. The length of the camera lens module is S, the width is T, and the distance P from the center inspection point of the camera lens module to the right edge of the camera lens module is all located on the outer ring of the lens center. When two camera lens modules inspect areas close together, the outer ring structures of their lens centers may collide. Therefore, a collision-free working area needs to be set based on the outer contour of the camera lens module. This solution has proven highly effective in practical applications. Through strict area division, it effectively avoids numerous potential collision risks during operation, significantly reducing downtime and maintenance time caused by collisions, and providing enterprises with a safe, efficient, and low-cost inspection solution.

[0087] In step 2:

[0088] Two sets of camera lens modules are arranged opposite each other on the left and right sides of the photo-taking platform. Both sets of camera lens modules have the function of planar movement, and the working range of the camera lens modules can cover the photo-taking platform.

[0089] The X-axis dividing line of the detection plate is set horizontally from the midpoint of the Y-axis direction of the detection plate;

[0090] The Y-axis dividing line of the detection plate divides the detection plate into two rectangular spaces along the Y-axis according to the number of detection points on the plate, so that the number of detection points on the left and right sides is basically equal.

[0091] The front half of the X-axis dividing line has two intersecting zones. The upper ends of the two intersecting zones are flush with the upper end of the detection plate. The width of the left intersecting zone extends to the left of the Y-axis dividing line by a distance of 2 times P, where P is the distance from the center detection point of the camera lens module to the side of the camera lens module facing away from the cross slide. The left edge of the left intersecting zone is the left dividing line, and the upper and lower ends of the left dividing line are connected to the upper and lower ends of the detection plate, respectively. The width of the right intersecting zone extends to the right of the Y-axis dividing line by a distance of 2 times P. The right edge of the right intersecting zone is the right dividing line, and the upper and lower ends of the right dividing line are connected to the upper and lower ends of the detection plate, respectively. The two intersecting zones in the front half of the detection plate are mirror-symmetrically arranged with the X-axis dividing line as the axis. Two more intersecting zones are arranged in the rear half of the detection plate.

[0092] The X-axis dividing line moves forward. The coordinates of the distance are marked with an upper horizontal region boundary line, and the X-axis boundary line extends backward. The coordinates of the distance are divided into a lower horizontal region boundary line, where S is the length of the camera lens module; the two ends of the upper horizontal region boundary line are connected to the left and right boundary lines respectively, and the two ends of the lower horizontal region boundary line are connected to the left and right boundary lines respectively.

[0093] The rectangular area enclosed by the left boundary line, the right boundary line, the upper horizontal area boundary line, and the lower horizontal area boundary line is the conflict zone, which is divided in two by the Y-axis boundary line.

[0094] On the detection plate, the area between the left dividing line and the left edge of the detection plate is the left safe zone, and the area between the right dividing line and the right edge of the detection plate is the right safe zone.

[0095] The detection panel consists of 8 working areas: 4 intersecting zones, 2 conflict zones, a left safety zone, and a right safety zone.

[0096] like Figure 4 As shown, Xm is the X-axis boundary line of the detection plate; Ym represents the Y-axis boundary line of the detection plate, which is also the center line of the number of detection points; the region boundaries in the X direction are X1 and X2, where X1 is the lower horizontal region boundary line and X2 is the upper horizontal region boundary line; from a coordinate perspective, it satisfies The region boundaries in the Y direction include Y1 and Y2, where Y1 is the left boundary and Y2 is the right boundary; from a coordinate perspective, Y1 = Y2. m -2p, Y2=Y m +2p.

[0097] The probability of a camera lens module colliding varies depending on its location within the workspace, with a higher probability closer to the center of the detection board. Therefore, the detection board needs to be divided into zones based on the collision risk of different areas to prevent two machines from simultaneously operating in high-risk collision zones. From a risk management perspective, this method, through precise risk zone division, ensures high-efficiency detection while virtually eliminating the collision accident rate in high-risk zones.

[0098] Furthermore, in step 2:

[0099] The Y-axis dividing line of the detection board divides the entire detection board into two regions, left and right, and the two camera lens modules move in their respective regions.

[0100] When one camera lens module is located in the corresponding safe zone, another camera lens module will not collide with it when moving in the corresponding area.

[0101] When the two camera lens modules are not located in the same side of the intersection area, but are working in two diagonally opposite intersection areas, no collision will occur;

[0102] When one camera lens module is operating in the collision zone, another camera lens module will not collide if it is located in the corresponding safe zone.

[0103] A1 and A2 represent safe zones, where no collision will occur if at least one machine is located within a safe zone.

[0104] F1 and F3 represent the two overlapping areas on the left side, while F4 and F2 represent the two overlapping areas on the right side. F1 and F4 are located in front and adjacent to each other, while F3 and F2 are located behind and adjacent to each other. When the two camera lens modules are not located in the overlapping areas on the same side, a collision will not occur.

[0105] C1 and C2 represent conflict zones. C1 is adjacent to F1 and F3 to the front and rear, and to A1 to the left. C2 is adjacent to F4 and F2 to the front and rear, to A2 to the right, and to C1 to the left. When one camera lens module is operating in a conflict zone, a collision will not occur if another camera lens module is located in a safe zone. Strict adherence to the conflict zone table principle demonstrates significant advantages in ensuring safety in actual production scenarios.

[0106] In addition, in step 3:

[0107] Problem description:

[0108] Two camera lens modules, denoted as Machine A and Machine B, are each pre-assigned a non-overlapping set of tasks, denoted as J. A ={1,2,…,m} and J B ={1,2,…,n};

[0109] Each task can only be executed by its two associated camera lens modules. The processing time for each task is based on the number of detection points in the area and has a fixed duration. The processing time for machine A's task is... The task processing time for machine A is

[0110] Tasks can be paired for testing, meaning that machine A and machine B each execute one task, forming a process. The duration of the process is determined by the slower machine. Unpaired tasks will be executed alone and occupy a process, with the process time equal to the processing time of the task.

[0111] Defined as:

[0112]

[0113] If there is a conflict between two tasks, they are not allowed to be paired for detection. The conflict relationship is represented by the conflict matrix C = [C i,j ]∈{0,1} m×n Given, where:

[0114]

[0115] Decision variables:

[0116] x i,j ∈{0,1}: If task i∈J A With task i∈J B If pairing is performed, the result is 1;

[0117] u i ∈{0,1}: If task i∈J A If not paired, the value is 1;

[0118] v j ∈{0,1}: If task j∈J B If not paired, the value is 1;

[0119] Objective function:

[0120] Minimize the total execution time of all processes, including paired and unpaired processes:

[0121]

[0122] Constraints:

[0123] (1) Each task must be executed, and only once:

[0124]

[0125] The pairing task must satisfy the conflict table constraint:

[0126]

[0127] (4) Variable definition:

[0128] x i,j ∈{0,1},u i ∈{0,1},v j ∈{0,1};

[0129] Where, x i,j For the task pairing results of the two camera lens modules, u i For the corresponding single camera lens module task pairing results, v j The result of pairing a task with another corresponding single camera lens module.

[0130] The problem model is more adaptable to the more complex multi-region allocation and scheduling problems in the future.

[0131] Furthermore, in step 3:

[0132] In the area planning of dual-camera lens modules, two camera lens modules are allowed to perform detection simultaneously. To measure the efficiency of the planning method, the concept of equivalent aperture number is introduced compared with the single-machine detection algorithm. That is, when two camera lens modules detect one aperture at the same time, it is considered as one equivalent aperture number. If the detection areas of the two camera lens modules conflict, the two camera lens modules need to perform detection sequentially. The two sequences are two units of time. If one detection is completed in two units of time, it is considered as two equivalent aperture numbers.

[0133] In the 8-zone division scheme, the left and right safe zones will not interfere with any zone, while the conflict zone and the unsafe zone will interfere. Therefore, when one machine is in the conflict zone, the other machine should be in the safe zone. Considering the distribution of the board area, the conflict zone on one side is combined with the safe zone on the other side, and the detection sequence is arranged at the beginning and the end.

[0134] Therefore, there are two combinations of regional planning:

[0135] The first type of left-side region detection sequence, from front to back, is as follows: the left-side safe area, the left-side rear interleaving area, the left-side front interleaving area, and the left-side conflict area;

[0136] The first type of right-side region detection sequence, from front to back, is as follows: right-side conflict zone, right-front interleaving zone, right-lower interleaving zone, and right-side safe zone;

[0137] The second type of left-side region detection sequence, from front to back, is as follows: the left-side safe area, the left-front interleaved area, the left-rear interleaved area, and the left-side conflict area;

[0138] The second type of right-side region detection sequence, from front to back, is as follows: right-side conflict zone, lower right-side intersection zone, right-front intersection zone, and right-side safe zone;

[0139] The combination with the fewest equivalent holes is selected as the result of the regional planning combination scheme.

[0140] After the area combination is fixed, the areas are detected in the order of detection. Since the number of detection holes and the size of the area are not necessarily the same, it is assumed that machine A has finished detecting a certain area first. When it is about to detect the next area, it needs to check the area where machine B is currently located. If there is a conflict, machine A will be blocked and needs to wait intermittently for machine B to move to the next area for re-judgment. If there is no conflict, machine A will detect the next area normally.

[0141] This solution quantifies the effectiveness of the solution by using the concept of equivalent aperture number. The use of dynamic collision detection and avoidance strategies effectively reduces the time loss caused by camera waiting, significantly improves equipment coordination efficiency, and reduces the number of frequent large-scale camera movements and adjustments through precise area planning, thereby improving equipment operational stability.

[0142] like Figure 4 As shown, there are two types of regional planning combinations: the first type is left: A1→F3→F1→C1, and right: C2→F4→F2→A2.

[0143] The second combination is A1→F1→F3→C1, and the right side is C2→F2→F4→A2. The combination with the fewest equivalent holes is selected as the regional planning combination scheme result.

[0144] Furthermore, in step 4, the single-region path planning algorithm treats the region detection problem as multiple traveling salesman problems, and needs to calculate the shortest path connecting all detection holes in the current region;

[0145] The starting point is the vertex of the region to ensure that the region detection time remains stable each time. Since the detection board is divided into multiple small regions, the detection aperture size of a single region is relatively small. Therefore, a variable neighborhood search algorithm is used to solve the TSP problem.

[0146] The process of the variable neighborhood algorithm is as follows: Figure 5 As shown. First, set the initial solution s and the current optimal solution s_best, and calculate the function value f_best of s_best;

[0147] Next, the neighborhood structure is defined. Neighborhood operations include two types: N1(i,j) – swapping points i and j in the solution sequence; and N2(i,j) – reversing the order of points i and j in the solution sequence. Then, the iteration count is initialized to iter = 1.

[0148] Then, a loop is entered to check if iter is less than the set maximum number of iterations max_iter. Then, the neighborhood index k = 1 is set, and the check continues to check if k is less than the maximum number of neighborhoods k_max.

[0149] If the condition is met, the current solution s is subjected to neighborhood perturbation to obtain s′, and its function value f′ is calculated;

[0150] If f′ is less than f_best, then update the current optimal solution s_best = s′ and the optimal function value f_best = f′, while setting s = s′ and resetting the neighborhood index k to 1; if f′ is not less than f_best, then directly increment the neighborhood index k by 1.

[0151] When k is not less than k_max, the iteration count iter is incremented by 1, and the process returns to the iteration count check. This cycle continues until iter is not less than max_iter, and finally the current optimal solution s_best is output.

[0152] When used to solve paths, the variable neighborhood search algorithm can efficiently escape local optima, whereas traditional local search algorithms are prone to getting trapped in local conditions. This algorithm overcomes these limitations by flexibly switching between different neighborhood structures. In PCB inspection, facing complex distributions of inspection points, it can quickly adjust the camera movement path, significantly improving the quality of the solution. By alternately using multiple neighborhood structures, it comprehensively explores the solution space to ensure product quality. It also adapts well to complex and changing environments. For example, in PCB inspection, when there are different batches of boards being inspected or slight differences in equipment status, it can dynamically adjust the search strategy to ensure that the camera lens module's movement path is always reasonable, efficient, and safe, maintaining stable inspection performance.

[0153] A substrate binocular imaging inspection system is applied to the above-mentioned substrate binocular imaging inspection machine path planning method, including a left cross slide 100, a left camera lens module 200, an imaging platform 300, a right camera lens module 400, and a right cross slide 500.

[0154] The left camera lens module 200 is installed on the left cross slide 100, and the right camera lens module 400 is installed on the right cross slide 500. The left cross slide 100 and the right cross slide 500 are arranged in a mirror symmetrical manner, and a photo-taking platform 300 is provided between the left cross slide 100 and the right cross slide 500.

[0155] It also includes a controller, and the left cross slide, left camera lens module, right camera lens module and right cross slide are communicatively connected.

[0156] Experimental calculations and analysis

[0157] 1. Calculation Experiment

[0158] To verify the feasibility and effectiveness of the region partitioning method and the dual-machine region task pairing path planning model, actual production order data were obtained from PCB manufacturing enterprises for iterative optimization and testing. The iterative optimization algorithm was implemented in Java and compiled using Eclipse 3.7. All experiments were performed on a 3.60GHz (12-core) Intel i7 CPU with 32GB of RAM running Windows 10.

[0159] 2. Case Analysis

[0160] To verify the feasibility and applicability of the region partitioning method and path planning algorithm for complex cases of varying scales, verification tests were conducted using 36 PCB products from PCB manufacturing companies. Furthermore, to realize and promote the industrial application of the proposed algorithm, a corresponding software system was developed. The test cases and experimental designs are as follows:

[0161] The experiment used a txt file format to input 36 PCB samples of different sizes and hole positions. Input data included the origin point, sample length, width, and defect coordinates. Each sample was relatively small (537mm × 429mm), with a large and unevenly distributed number of holes to be inspected (ranging from 8 to 220). The interference area caused by the movement of the two cameras was large (accounting for 25.6% of the sample area), and the proportion of images taken from the interference area was high (averaging 32.06% of the total number of images). Three different methods were compared in the experiment.

[0162] Option 1: Use a monocular camera system for detection and calculate the number of holes detected in 36 cases.

[0163] Option 2: Without dividing the region, the binocular imaging system uses a single-region path planning algorithm for both the left and right regions to calculate the equivalent number of holes for detecting 36 cases.

[0164] Option 3: Use an 8-region division algorithm. After combining regions using a binocular imaging system, perform path planning algorithm on each region to calculate the equivalent number of holes in the 36 detected cases.

[0165] Analysis of Experimental Results

[0166] The experiment divided 36 samples into 8 regions, and the comparison results of the three schemes are as follows: Figure 6 As shown in the experimental results, the use of binocular cameras for collaborative imaging significantly improves detection efficiency. For 36 cases, schemes 2 and 3 are significantly superior to scheme 1, while scheme 3 is superior to scheme 2 in 18 cases, the same as scheme 2 in 5 cases, and inferior to scheme 2 in only 13 cases. The specific number of detection wells is shown below. Figure 7As shown, the typical binocular imaging method (Scheme 2) reduces the total number of equivalent apertures by 33.33% compared to the monocular imaging method (Scheme 1). After region division, Scheme 3 reduces the total number of equivalent apertures by 36.28% compared to Scheme 1. Furthermore, as a binocular detection method, Scheme 3 reduces the total number of equivalent apertures detected by 44 points compared to Scheme 2, accounting for approximately 4.42%. Therefore, the analysis shows that the detection efficiency of using a binocular camera is significantly better than that of a monocular camera, and after 8-region division, the number of equivalent apertures captured by the binocular camera is superior to that of the typical binocular imaging method.

[0167] The technical principles of the present invention have been described above with reference to specific embodiments. These descriptions are merely for explaining the principles of the invention and should not be construed as limiting the scope of protection of the invention in any way. Based on this explanation, those skilled in the art can readily conceive of other specific embodiments of the invention without inventive effort, and these embodiments will all fall within the scope of protection of the present invention.

Claims

1. A path planning method for a substrate binocular imaging inspection machine, characterized in that, Includes the following steps: S1. First, we need to analyze and process the dimensional data of the PCB board and the two camera lens modules, including equipment parameters and test board data. S2. The detection board is divided into regions based on the two camera lens modules. The working range of the camera lens modules is constrained according to the size and travel range of the camera lens modules. Based on the hole features of the detection board, an 8-working-region division method is designed, and the collision risk of each region in each working region is evaluated to coordinate the movement position of the two camera lens modules and avoid interference between the two camera lens modules. S3. Establish an integer programming model for task pairing and scheduling of two camera lens modules. Based on the division of 8 working areas, pre-allocate detection task groups for the two camera lens modules. Each task in the detection task group has a definite processing time. Then, pair and detect the tasks of the two camera lens modules. Two individual tasks without collision risk constitute a process. A single task that cannot be paired constitutes a separate process. The time of each process corresponds to the single task that takes the longest time in each process. S4, Single-region path planning algorithm, uses a variable neighborhood search algorithm to find the shortest path connecting all detection holes in the current region for a single camera lens module; In step 3: Problem description: Two camera lens modules, denoted as Machine A and Machine B, are each pre-assigned a non-overlapping set of tasks, denoted as... and ; Each task can only be executed by its two camera lens modules, and the processing time for each task is based on the number of detection points in the area. The task processing time for machine A is The task processing time of machine B is ; Tasks can be paired for testing, meaning that machine A and machine B each execute one task, forming a process. The duration of the process is determined by the slower machine. Unpaired tasks will be executed alone and occupy a process, with the process time equal to the processing time of the task. Defined as: ; If there is a conflict between two tasks, they are not allowed to be paired for detection. The conflict relationship is determined by the conflict matrix. Given, where: ; Decision variables: ; ; ; Objective function: Minimize the total execution time of all processes, including paired and unpaired processes: ; Constraints: (1) Each task must be executed, and executed only once: ; ; The pairing task must satisfy the conflict table constraint: ; (2) Variable definition: ; in, The result of the task pairing for the two camera lens modules. The matching results for the corresponding individual camera lens module task. The result of the task pairing for another corresponding single camera lens module.

2. The path planning method for a substrate binocular imaging inspection machine according to claim 1, characterized in that, In step 1: Let the lower left point of the detection plate be the origin of the coordinate system, the length of the detection plate along the X-axis be L, and the width along the Y-axis be W; The diameter of the camera lens module is D, the length of the camera lens module is S, the width of the camera lens module is T, the distance from the center detection point of the camera lens module to the side of the camera lens module facing away from the cross slide is P, and the center of the lens of the camera lens module represents the lens detection point.

3. The path planning method for a substrate binocular imaging inspection machine according to claim 2, characterized in that, In step 2: Two sets of camera lens modules are arranged opposite each other on the left and right sides of the photo-taking platform. Both sets of camera lens modules have the function of planar movement, and the working range of the camera lens modules can cover the photo-taking platform. The X-axis dividing line of the detection plate is set horizontally from the midpoint of the Y-axis direction of the detection plate; The Y-axis dividing line of the detection plate divides the detection plate into two rectangular spaces along the Y-axis according to the number of detection points on the plate, so that the number of detection points on the left and right sides is basically equal. The front half of the X-axis dividing line has two intersecting zones. The upper ends of the two intersecting zones are flush with the upper end of the detection plate. The width of the left intersecting zone extends to the left of the Y-axis dividing line by a distance of 2 times P, where P is the distance from the center detection point of the camera lens module to the side of the camera lens module facing away from the cross slide. The left edge of the left intersecting zone is the left dividing line, and the upper and lower ends of the left dividing line are connected to the upper and lower ends of the detection plate, respectively. The width of the right intersecting zone extends to the right of the Y-axis dividing line by a distance of 2 times P. The right edge of the right intersecting zone is the right dividing line, and the upper and lower ends of the right dividing line are connected to the upper and lower ends of the detection plate, respectively. The two intersecting zones in the front half of the detection plate are mirror-symmetrically arranged with the X-axis dividing line as the axis. Two more intersecting zones are arranged in the rear half of the detection plate. The X-axis dividing line moves forward. The coordinates of the distance are marked with an upper horizontal region boundary line, and the X-axis boundary line extends backward. The coordinates of the distance are divided into a lower horizontal region boundary line, where S is the length of the camera lens module; the two ends of the upper horizontal region boundary line are connected to the left and right boundary lines respectively, and the two ends of the lower horizontal region boundary line are connected to the left and right boundary lines respectively. The rectangular area enclosed by the left boundary line, the right boundary line, the upper horizontal area boundary line, and the lower horizontal area boundary line is the conflict zone, which is divided in two by the Y-axis boundary line. On the detection plate, the area between the left dividing line and the left edge of the detection plate is the left safety zone, and the area between the right dividing line and the right edge of the detection plate is the right safety zone. The detection board consists of 8 working areas: 4 intersecting zones, 2 conflict zones, a left safety zone, and a right safety zone.

4. The path planning method for a substrate binocular imaging inspection machine according to claim 1, characterized in that, In step 2: The Y-axis dividing line of the detection board divides the entire detection board into two regions, left and right, and the two camera lens modules move in their respective regions. When one camera lens module is located in the corresponding safe zone, another camera lens module will not collide with it when moving in the corresponding area. When the two camera lens modules are not located in the same side of the intersection area, but are working in two diagonally opposite intersection areas, no collision will occur; When one camera lens module is operating in the collision zone, another camera lens module will not collide if it is located in the corresponding safe zone.

5. The path planning method for a substrate binocular imaging inspection machine according to claim 1, characterized in that, In step 3: In the area planning of dual-camera lens modules, two camera lens modules are allowed to perform detection simultaneously. To measure the efficiency of the planning method, the concept of equivalent aperture number is introduced compared with the single-machine detection algorithm. That is, when two camera lens modules detect one aperture at the same time, it is considered as one equivalent aperture number. If the detection areas of the two camera lens modules conflict, the two camera lens modules need to perform detection sequentially. The two sequences are two units of time. If one detection is completed in two units of time, it is considered as two equivalent aperture numbers. In the 8-zone division scheme, the left and right safe zones will not interfere with any zone, while the conflict zone and the unsafe zone will interfere. Therefore, when one machine is in the conflict zone, the other machine should be in the safe zone. Considering the distribution of the board area, the conflict zone on one side is combined with the safe zone on the other side, and the detection sequence is arranged at the beginning and the end. Therefore, there are two combinations of regional planning: The first type of left-side region detection sequence, from front to back, is as follows: the left-side safe area, the left-side rear interleaving area, the left-side front interleaving area, and the left-side conflict area; The first type of right-side region detection sequence, from front to back, is as follows: right-side conflict zone, right-front interleaving zone, right-lower interleaving zone, and right-side safe zone; The second type of left-side region detection sequence, from front to back, is as follows: the left-side safe area, the left-front interleaving area, the left-rear interleaving area, and the left-side conflict area; The second type of right-side region detection sequence, from front to back, is as follows: right-side conflict zone, lower right-side intersection zone, right-front intersection zone, and right-side safe zone; The combination with the fewest equivalent holes is selected as the result of the regional planning combination scheme. After the area combination is fixed, the areas are detected in the order of detection. Since the number of detection holes and the size of the area are not necessarily the same, it is assumed that machine A has finished detecting a certain area first. When it is about to detect the next area, it needs to check the area where machine B is currently located. If there is a conflict, machine A will be blocked and needs to wait intermittently for machine B to move to the next area for re-judgment. If there is no conflict, machine A will detect the next area normally.

6. The path planning method for a substrate binocular imaging inspection machine according to claim 1, characterized in that, In step 4, the single-region path planning algorithm treats the region detection problem as multiple traveling salesman problems, and needs to calculate the shortest path connecting all detection holes in the current region; The starting point is the vertex of the region to ensure that the region detection time remains stable each time. Since the detection board is divided into multiple small regions, the detection hole size of a single region is relatively small. Therefore, a variable neighborhood search algorithm is used to solve the TSP problem.

7. A substrate binocular imaging inspection system, wherein the system is applied to the method described in any one of claims 1-6, characterized in that, It includes a left cross slide, a left camera lens module, a photo-taking platform, a right camera lens module, and a right cross slide; The left camera lens module is installed on the left cross slide, and the right camera lens module is installed on the right cross slide. The left and right cross slides are set in a mirror symmetrical arrangement, and a photo-taking platform is set between the left and right cross slides. It also includes a controller, and the left cross slide, left camera lens module, right camera lens module and right cross slide are communicatively connected.

Citation Information

Patent Citations

  • Path planning method and device of camera component and computer readable storage medium

    CN114895666A

  • Clamping mechanical arm based on visual perception and control method thereof

    CN119501951A