PCB circuit board defect detection method and system
By acquiring the conventional defect types and standard design images of the PCB circuit board, image scaling and feature recognition are performed, and combined with image overlap and fusion and rotation processing, the offset interference problem in complex defect recognition is solved, and a combination of multiple defects is achieved. Accurate identification and detection.
Patent Information
- Application Number
- CN202410391148.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-02
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2044-04-02
AI Technical Summary
The prior art is difficult to effectively identify complex PCB circuit board defects, especially due to interference caused by imaging position offset and imaging angle offset of defect images, which makes it impossible to accurately determine the defect type.
By obtaining feature images and standard design images of conventional defect types, image scaling and feature recognition are performed, local different images are generated, and image overlap and fusion and rotation processing are used to generate calibration feature defect images, summarize defect types, and achieve multiple defects. Identification of combinations.
During identification, all possible defect combinations can be exhausted to avoid missed judgments, and accurately identify defects in the presence of position movement and rotation, reducing interference factors and improving detection accuracy.
Smart Images

Figure CN118261881B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of defect detection, and in particular to a PCB circuit board defect detection method and system. Background Art
[0002] Printed circuit boards are substrates for mounting electrical parts and are one of the most important components in the current electronics industry. In a series of PCB production processes, there are many matching points, which are prone to defects, thus leading to a series of PCB quality problems. Therefore, in the manufacturing process of printed circuit boards, quality inspection is an indispensable part. The defects of printed circuit boards include missing holes, gaps, open circuits, short circuits and copper scraps, which will have a serious impact on the use of printed circuit boards. At present, defect detection for printed circuit boards is carried out through image recognition.
[0003] However, there are many types of defects on circuit boards, and a combination of multiple defects may appear at the same location. In addition, the actual defect image may have imaging position and imaging angle offsets compared with the defect image used for comparison, that is, translation and rotation are required to make the two overlap, which will cause great interference to identification and make it impossible to determine the type of defects on the circuit board. Summary of the invention
[0004] In order to solve the above technical problems, a PCB circuit board defect detection method and system are provided. The technical solution solves the problem that there are many types of defects in the circuit board proposed in the above background technology, and a combination of multiple defects may appear at the same position, and the actual defect image will have an imaging position offset and an imaging angle offset with the defect image used for comparison, that is, translation and rotation are required to make the two overlap, which will cause great interference to identification and make it impossible to determine the type of defects on the circuit board.
[0005] In order to achieve the above purpose, the technical solution adopted by the present invention is:
[0006] A PCB circuit board defect detection method, comprising:
[0007] Acquire at least one conventional defect type of the PCB circuit board, and acquire at least one characteristic defect image corresponding to a single conventional defect type;
[0008] Acquire at least one characteristic position where a single conventional defect type occurs in the circuit board;
[0009] Acquire an image of the PCB circuit board to be tested and acquire a standard design image of the PCB circuit board;
[0010] Obtaining feature coordinates of feature positions in a standard design image;
[0011] Enlarge the image of the PCB to be tested to the same size as the standard design image to obtain the image of the PCB to be tested;
[0012] Perform feature recognition on the circuit board image to be inspected to obtain at least one local difference image;
[0013] Acquire the position coordinates of the local difference image, and acquire the feature position consistent with the position coordinates of the local difference image as the target feature position;
[0014] Acquire at least one conventional defect type corresponding to the target feature position as the target conventional defect type;
[0015] Acquire at least one characteristic defect image corresponding to a target conventional defect type as a target characteristic defect image;
[0016] Acquire all combinations of at least one target feature defect image corresponding to the target feature position to obtain at least one combination to be detected;
[0017] Perform image overlap fusion on at least one target feature defect image in the combination to be detected to obtain a fused image;
[0018] The fused image whose difference with the local difference image is less than a preset value is used as the calibration feature defect image;
[0019] Obtaining target conventional defect types corresponding to at least one target feature defect image in the to-be-detected combination corresponding to the calibrated feature defect image, as defect types of the local difference image;
[0020] The defect types of at least one local difference image are summarized to obtain the defect types of the PCB circuit board image to be tested.
[0021] Preferably, the step of acquiring the feature coordinates of the feature position in the standard design image comprises the following steps:
[0022] Select the midpoint of the left edge of the standard design image as the coordinate origin, select the horizontal direction as the x-axis, and select the vertical direction as the y-axis to obtain the first xy coordinate system;
[0023] coordinate modeling the standard design image in a first xy coordinate system;
[0024] The coordinates of the center position of the feature position are obtained as the feature coordinates of the feature position.
[0025] Preferably, the step of enlarging the image of the PCB circuit board to be tested to the same size as the standard design image to obtain the image of the circuit board to be tested comprises the following steps:
[0026] Select the midpoint of the left edge of the PCB circuit board image to be tested as the coordinate origin, select the horizontal direction as the x-axis, and select the vertical direction as the y-axis to obtain the second xy coordinate system;
[0027] Coordinate modeling of the image of the PCB to be tested is performed in the second xy coordinate system;
[0028] The area ratio of the standard design image and the image of the PCB circuit board to be tested is obtained as the scaling ratio;
[0029] The midpoint of the left edge of the image of the PCB to be tested is used as the zoom point;
[0030] Multiply the coordinates of each pixel point in the image of the PCB to be tested by the scaling ratio to obtain the scaled coordinates;
[0031] The pixel values of the pixels of the PCB circuit board image to be tested are assigned to the pixels corresponding to the zoomed coordinates to obtain the circuit board image to be tested.
[0032] Preferably, the step of performing feature recognition on the circuit board image to be inspected to obtain at least one local difference image comprises the following steps:
[0033] Determine whether the difference between the pixel values of the pixel points at the same coordinates in the circuit board image to be inspected and the standard design image is less than a preset difference value. If so, no processing is performed. If not, the pixel point is regarded as a difference pixel point.
[0034] Obtaining the distance between adjacent pixel points as the identification distance;
[0035] At least one difference pixel point is classified and merged to obtain at least one local difference image. When summarizing and merging, the difference pixel points with a distance equal to the identification distance are classified into one category.
[0036] Preferably, the step of obtaining the position coordinates of the local difference image comprises the following steps:
[0037] Coordinate modeling is performed on the local difference image in the second xy coordinate system to obtain position coordinates of the local difference image.
[0038] Preferably, the step of overlapping and fusing at least one target feature defect image in the combination to be detected to obtain a fused image comprises the following steps:
[0039] sorting at least one target characteristic defect image to obtain a target characteristic defect sequence;
[0040] Obtain the center of the target feature defect image as the activity center;
[0041] Acquire the actual possible existence range of the activity center of at least one target characteristic defect image;
[0042] Evenly divide the actual possible range to obtain at least one test block;
[0043] The center of the test block is used as the test center;
[0044] Select a point in at least one test center as the location where the activity center merges;
[0045] Obtain all situations of selecting points in at least one test center as a test point group, where the test point group is an ordered point sequence;
[0046] Under the condition of each of the test point groups, at least one target characteristic defect image is overlapped and fused to obtain a fused image, wherein the activity center of the target characteristic defect sequence is located at the test center of the same position in the test point group.
[0047] Preferably, the step of using the fused image whose difference with the local difference image is less than a preset value as the calibrated feature defect image comprises the following steps:
[0048] selecting at least one first detection calibration point in the local difference image, wherein the first detection calibration point is evenly distributed in the local difference image;
[0049] Selecting a second detection calibration point in the fused image, rotating the fused image with the second detection calibration point as a rotation point and a preset angle as a rotation interval angle, to obtain at least one fused rotated image;
[0050] Overlapping the second detection calibration point of the fused rotation image with at least one first detection calibration point in the local difference image, respectively, to obtain at least one overlapping region of the fused rotation image and the local difference image;
[0051] Calculate the absolute value of the difference between the pixel values of the pixel points at the same position in each of the overlapping areas between the fused rotation image and the local difference image, and accumulate to obtain the difference judgment value of each of the overlapping areas;
[0052] In at least one overlapping area, if the difference judgment value of the overlapping area is less than the preset value, the fused image is judged to be a calibration feature defect image, otherwise, no processing is performed.
[0053] A PCB circuit board defect detection system, used to implement the above-mentioned PCB circuit board defect detection method, comprising:
[0054] A data acquisition module, wherein the data acquisition module acquires at least one conventional defect type of a PCB circuit board, acquires at least one characteristic defect image corresponding to a single conventional defect type, acquires at least one characteristic position where a single conventional defect type occurs in the circuit board, acquires an image of the PCB circuit board to be tested, and acquires a standard design image of the PCB circuit board;
[0055] A coordinate acquisition module, wherein the coordinate acquisition module acquires feature coordinates of feature positions in the standard design image and acquires position coordinates of the local difference image;
[0056] An image scaling module, which enlarges the image of the PCB circuit board to be tested to the same size as the standard design image to obtain the image of the circuit board to be tested;
[0057] A feature recognition module, wherein the feature recognition module performs feature recognition on the circuit board image to be inspected, obtains at least one local difference image, and obtains a feature position consistent with the position coordinates of the local difference image as a target feature position;
[0058] A defect preprocessing module, wherein the defect preprocessing module obtains at least one conventional defect type corresponding to a target characteristic position as a target conventional defect type, and obtains at least one characteristic defect image corresponding to the target conventional defect type as a target characteristic defect image;
[0059] A combination generation module, wherein the combination generation module obtains all combinations of at least one target feature defect image corresponding to the target feature position to obtain at least one combination to be detected;
[0060] The defect recognition module uses the fused image whose difference with the local difference image is less than a preset value as a calibrated feature defect image, summarizes the defect type of at least one local difference image, and obtains the defect type of the PCB circuit board image to be tested.
[0061] Compared with the prior art, the present invention has the following beneficial effects:
[0062] By setting up a feature recognition module, a defect preprocessing module, a combination generation module and a defect recognition module, all combinations of multiple defects that may appear in the same position can be enumerated during defect detection, and all situations can be detected, so that a wide variety of combined defects can be identified without missing any. At the same time, during identification, the imaging position offset and the imaging angle offset are included in the detection process, and defects with position movement and rotation can be identified. Furthermore, during identification, many interference factors in actual situations can be avoided, and defects can be identified as accurately as possible. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 It is a schematic diagram of the process of the PCB circuit board defect detection method of the present invention;
[0064] Figure 2 It is a schematic diagram of a process flow of obtaining feature coordinates of feature positions in a standard design image according to the present invention;
[0065] Figure 3 The present invention is to enlarge the image of the PCB circuit board to be tested to the same size as the standard design image to obtain the flow chart of the image of the circuit board to be tested;
[0066] Figure 4 A schematic diagram of a process of performing feature recognition on an image of a circuit board to be inspected to obtain at least one local difference image according to the present invention;
[0067] Figure 5 A schematic diagram of a flow chart of performing image overlap fusion on at least one target feature defect image in a combination to be detected to obtain a fused image;
[0068] Figure 6 This is a schematic diagram of the process of using a fused image whose difference with a local difference image is less than a preset value as a calibration feature defect image. DETAILED DESCRIPTION
[0069] The following description is used to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are only examples, and those skilled in the art may think of other obvious variations.
[0070] Reference Figure 1 As shown, a PCB circuit board defect detection method includes:
[0071] Acquire at least one conventional defect type of the PCB circuit board, and acquire at least one characteristic defect image corresponding to a single conventional defect type;
[0072] Acquire at least one characteristic position where a single conventional defect type occurs in the circuit board;
[0073] Acquire an image of the PCB circuit board to be tested and acquire a standard design image of the PCB circuit board;
[0074] Obtaining feature coordinates of feature positions in a standard design image;
[0075] Enlarge the image of the PCB to be tested to the same size as the standard design image to obtain the image of the PCB to be tested;
[0076] Perform feature recognition on the circuit board image to be inspected to obtain at least one local difference image;
[0077] Acquire the position coordinates of the local difference image, and acquire the feature position consistent with the position coordinates of the local difference image as the target feature position;
[0078] Acquire at least one conventional defect type corresponding to the target feature position as the target conventional defect type;
[0079] Acquire at least one characteristic defect image corresponding to a target conventional defect type as a target characteristic defect image;
[0080] Acquire all combinations of at least one target feature defect image corresponding to the target feature position to obtain at least one combination to be detected;
[0081] Perform image overlap fusion on at least one target feature defect image in the combination to be detected to obtain a fused image;
[0082] The fused image whose difference with the local difference image is less than a preset value is used as the calibration feature defect image;
[0083] Obtaining target conventional defect types corresponding to at least one target feature defect image in the to-be-detected combination corresponding to the calibrated feature defect image, as defect types of the local difference image;
[0084] The defect types of at least one local difference image are summarized to obtain the defect types of the PCB circuit board image to be tested.
[0085] Reference Figure 2 As shown, obtaining the feature coordinates of the feature position in the standard design image includes the following steps:
[0086] Select the midpoint of the left edge of the standard design image as the coordinate origin, select the horizontal direction as the x-axis, and select the vertical direction as the y-axis to obtain the first xy coordinate system;
[0087] coordinate modeling the standard design image in a first xy coordinate system;
[0088] Obtain the coordinates of the center position of the feature position as the feature coordinates of the feature position;
[0089] Each common defect type will have a corresponding characteristic position where it will occur. Therefore, after preliminary statistics, the common defect type that will occur at that location can be determined based on the characteristic position.
[0090] Reference Figure 3 As shown, the image of the PCB circuit board to be tested is enlarged to the same size as the standard design image, and the image of the circuit board to be tested is obtained, which includes the following steps:
[0091] Select the midpoint of the left edge of the PCB circuit board image to be tested as the coordinate origin, select the horizontal direction as the x-axis, and select the vertical direction as the y-axis to obtain the second xy coordinate system;
[0092] Coordinate modeling of the image of the PCB to be tested is performed in the second xy coordinate system;
[0093] The area ratio of the standard design image and the image of the PCB circuit board to be tested is obtained as the scaling ratio;
[0094] The midpoint of the left edge of the image of the PCB to be tested is used as the zoom point;
[0095] Multiply the coordinates of each pixel point in the image of the PCB to be tested by the scaling ratio to obtain the scaled coordinates;
[0096] The pixel values of the pixels of the PCB circuit board image to be tested are assigned to the pixels corresponding to the zoomed coordinates to obtain the circuit board image to be tested;
[0097] There may be a difference in the size of the image of the PCB circuit board to be tested and the standard design image during acquisition. Therefore, it is necessary to enlarge the image of the PCB circuit board to be tested to the same size as the standard design image, so as to facilitate the subsequent comparison of the image of the PCB circuit board to be tested with the standard design image and obtain the defects in the image of the PCB circuit board to be tested.
[0098] Reference Figure 4 As shown, performing feature recognition on the circuit board image to be detected to obtain at least one local difference image includes the following steps:
[0099] Determine whether the difference between the pixel values of the pixel points at the same coordinates in the circuit board image to be inspected and the standard design image is less than a preset difference value. If so, no processing is performed. If not, the pixel point is regarded as a difference pixel point.
[0100] Obtaining the distance between adjacent pixel points as the identification distance;
[0101] Classify and merge at least one difference pixel point to obtain at least one local difference image, and when summarizing and merging, classify the difference pixels with a distance equal to the identification distance into one category;
[0102] When comparing the image of the circuit board to be inspected with the standard design image, the position of the defect in the image of the circuit board to be inspected must be different from that in the standard design image. Therefore, at least one difference pixel can be obtained, but the difference pixel is a set of points, and the difference pixel needs to be clustered to form at least one local difference image. Since the pixels in the local difference image must have adjacent pixels in the local difference image, when classifying the difference pixels, the difference pixels with a distance of the identification distance are classified into one category. The purpose is to classify adjacent difference pixels into one category. If the difference pixel A is adjacent to the difference pixel B, and the difference pixel B is adjacent to the difference pixel C, then the difference pixel A and the difference pixel B are classified into one category, and the difference pixel B and the difference pixel C are classified into one category. Then the difference pixel A, the difference pixel B and the difference pixel C are classified into one category. By classifying through such a transfer relationship, the difference pixels of the same type can be used as a local difference image.
[0103] Obtaining the position coordinates of the local difference image includes the following steps:
[0104] Performing coordinate modeling on the local difference image in a second xy coordinate system to obtain position coordinates of the local difference image;
[0105] By acquiring the position coordinates of the local difference image, at least one conventional defect type occurring at the position can be obtained based on the position coordinates of the local difference image, because, in the previous step, at least one characteristic position of a single conventional defect type occurring in the circuit board is obtained in advance.
[0106] Reference Figure 5 As shown, performing image overlap fusion on at least one target feature defect image in the combination to be detected to obtain a fused image includes the following steps:
[0107] sorting at least one target characteristic defect image to obtain a target characteristic defect sequence;
[0108] Obtain the center of the target feature defect image as the activity center;
[0109] Acquire the actual possible existence range of the activity center of at least one target characteristic defect image;
[0110] Evenly divide the actual possible range to obtain at least one test block;
[0111] The center of the test block is used as the test center;
[0112] Select a point in at least one test center as the location where the activity center merges;
[0113] Obtain all situations of selecting points in at least one test center as a test point group, where the test point group is an ordered point sequence;
[0114] Under the condition of each of the test point groups, at least one target characteristic defect image is overlapped and fused to obtain a fused image, wherein the activity center of the target characteristic defect sequence is located at the test center of the same position in the test point group;
[0115] When fusing the images in the combination to be detected, the possible relative positional relationship of the images is taken into consideration, and a plurality of fused images are obtained. Thus, the plurality of fused images cover various possibilities that may occur in practice.
[0116] Reference Figure 6 As shown in the figure, using the fused image whose difference with the local difference image is less than a preset value as the calibrated feature defect image includes the following steps:
[0117] selecting at least one first detection calibration point in the local difference image, wherein the first detection calibration point is evenly distributed in the local difference image;
[0118] Selecting a second detection calibration point in the fused image, rotating the fused image with the second detection calibration point as a rotation point and a preset angle as a rotation interval angle, to obtain at least one fused rotated image;
[0119] Overlapping the second detection calibration point of the fused rotation image with at least one first detection calibration point in the local difference image, respectively, to obtain at least one overlapping region of the fused rotation image and the local difference image;
[0120] Calculate the absolute value of the difference between the pixel values of the pixel points at the same position in each of the overlapping areas between the fused rotation image and the local difference image, and accumulate to obtain the difference judgment value of each of the overlapping areas;
[0121] In at least one overlapping area, if the difference judgment value of the overlapping area is less than the preset value, the fused image is judged to be a calibration feature defect image, otherwise, no processing is performed;
[0122] In actual situations, the fused image may need to be rotated or translated in order to coincide with the local difference image. Therefore, the fused image needs to be rotated or translated to obtain a fused image that is almost consistent with the local difference image. Then, based on at least one target feature defect image in the combination to be detected corresponding to the fused image, and based on the target conventional defect type corresponding to each target feature defect image, at least one target conventional defect type corresponding to the fused image can be obtained.
[0123] A PCB circuit board defect detection system, used to implement the above-mentioned PCB circuit board defect detection method, comprising:
[0124] A data acquisition module, wherein the data acquisition module acquires at least one conventional defect type of a PCB circuit board, acquires at least one characteristic defect image corresponding to a single conventional defect type, acquires at least one characteristic position where a single conventional defect type occurs in the circuit board, acquires an image of the PCB circuit board to be tested, and acquires a standard design image of the PCB circuit board;
[0125] A coordinate acquisition module, wherein the coordinate acquisition module acquires feature coordinates of feature positions in the standard design image and acquires position coordinates of the local difference image;
[0126] An image scaling module, which enlarges the image of the PCB circuit board to be tested to the same size as the standard design image to obtain the image of the circuit board to be tested;
[0127] A feature recognition module, wherein the feature recognition module performs feature recognition on the circuit board image to be inspected, obtains at least one local difference image, and obtains a feature position consistent with the position coordinates of the local difference image as a target feature position;
[0128] A defect preprocessing module, wherein the defect preprocessing module obtains at least one conventional defect type corresponding to a target characteristic position as a target conventional defect type, and obtains at least one characteristic defect image corresponding to the target conventional defect type as a target characteristic defect image;
[0129] A combination generation module, wherein the combination generation module obtains all combinations of at least one target feature defect image corresponding to the target feature position to obtain at least one combination to be detected;
[0130] The defect recognition module uses the fused image whose difference with the local difference image is less than a preset value as a calibrated feature defect image, summarizes the defect type of at least one local difference image, and obtains the defect type of the PCB circuit board image to be tested.
[0131] The working process of the above PCB circuit board defect detection system is as follows:
[0132] Step 1: The data acquisition module acquires at least one conventional defect type of the PCB circuit board, and acquires at least one characteristic defect image corresponding to a single conventional defect type;
[0133] Step 2: The data acquisition module acquires at least one characteristic position of a single conventional defect type occurring in the circuit board;
[0134] Step 3: The data acquisition module acquires the image of the PCB circuit board to be tested and acquires the standard design image of the PCB circuit board;
[0135] Step 4: The coordinate acquisition module acquires the feature coordinates of the feature position in the standard design image;
[0136] Step 5: The image scaling module enlarges the image of the PCB circuit board to be tested to the same size as the standard design image to obtain the image of the circuit board to be tested;
[0137] Step 6: The feature recognition module performs feature recognition on the circuit board image to be inspected to obtain at least one local difference image;
[0138] Step 7: The coordinate acquisition module acquires the position coordinates of the local difference image, and the feature recognition module acquires the feature position consistent with the position coordinates of the local difference image as the target feature position;
[0139] Step 8: The defect preprocessing module obtains at least one conventional defect type corresponding to the target feature position as the target conventional defect type;
[0140] Step nine: the defect preprocessing module obtains at least one characteristic defect image corresponding to the target conventional defect type as the target characteristic defect image;
[0141] Step 10: The combination generation module obtains all combinations of at least one target feature defect image corresponding to the target feature position to obtain at least one combination to be detected;
[0142] Step 11: The defect recognition module performs image overlap fusion on at least one target feature defect image in the combination to be detected to obtain a fused image;
[0143] Step 12: The defect recognition module uses the fused image whose difference with the local difference image is less than a preset value as the calibration feature defect image;
[0144] Step 13: obtaining target conventional defect types corresponding to at least one target feature defect image in the to-be-detected combination corresponding to the calibrated feature defect image, as defect types of the local difference image;
[0145] Step 14: The defect recognition module summarizes the defect types of at least one local difference image to obtain the defect types of the PCB circuit board image to be tested.
[0146] Furthermore, the present solution also proposes a storage medium on which a computer-readable program is stored, and when the computer-readable program is called, the above-mentioned PCB circuit board defect detection method is executed.
[0147] It is understandable that the storage medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; an optical medium, such as a DVD; or a semiconductor medium, such as a solid state drive (SSD).
[0148] To sum up, the advantages of the present invention are: by setting up a feature recognition module, a defect preprocessing module, a combination generation module and a defect recognition module, all combinations of multiple defects that may appear in the same position can be enumerated during defect detection, and all situations can be detected, so that a wide variety of combined defects can be identified without missing any situations. At the same time, during identification, the situations of imaging position offset and imaging angle offset are included in the detection process, and defects with position movement and rotation can be identified, and then during identification, many interference factors in actual situations can be avoided, and all defects can be identified as accurately as possible.
[0149] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions only describe the principles of the present invention. The present invention may be subject to various changes and improvements without departing from the spirit and scope of the present invention. These changes and improvements fall within the scope of the present invention. The scope of protection claimed by the present invention is defined by the attached claims and their equivalents.
Claims
1. A PCB circuit board defect detection method, It is characterized in that include: Acquire at least one common defect type of the PCB circuit board, and acquire at least one characteristic defect image corresponding to a single common defect type; Obtaining at least one characteristic position where a single conventional defect type occurs in the circuit board; Obtain an image of the PCB circuit board to be tested and obtain a standard design image of the PCB circuit board; Obtaining feature coordinates of feature positions in a standard design image; Enlarge the image of the PCB to be tested to the same size as the standard design image to obtain the image of the PCB to be tested; Perform feature recognition on the circuit board image to be inspected to obtain at least one local difference image; Acquire the position coordinates of the local difference image, and acquire the feature position consistent with the position coordinates of the local difference image as the target feature position; Acquire at least one conventional defect type corresponding to the target feature position as the target conventional defect type; Acquire at least one characteristic defect image corresponding to a target conventional defect type as a target characteristic defect image; Acquire all combinations of at least one target feature defect image corresponding to the target feature position to obtain at least one combination to be detected; Perform image overlap fusion on at least one target feature defect image in the combination to be detected to obtain a fused image; The fused image whose difference with the local difference image is less than a preset value is used as the calibration feature defect image; Obtaining target conventional defect types corresponding to at least one target feature defect image in the to-be-detected combination corresponding to the calibrated feature defect image, as defect types of the local difference image; Summarize the defect types of at least one local difference image to obtain the defect types of the PCB circuit board image to be tested; The method of overlapping and fusing at least one target feature defect image in the combination to be detected to obtain a fused image comprises the following steps: sorting at least one target characteristic defect image to obtain a target characteristic defect sequence; Obtain the center of the target feature defect image as the activity center; Acquire the actual possible existence range of the activity center of at least one target characteristic defect image; Evenly divide the actual possible range to obtain at least one test block; The center of the test block is used as the test center; Select a point in at least one test center as the location where the activity center merges; Obtain all situations of selecting points in at least one test center as a test point group, where the test point group is an ordered point sequence; Under the condition of each of the test point groups, at least one target characteristic defect image is overlapped and fused to obtain a fused image, wherein the activity center of the target characteristic defect sequence is located at the test center of the same position in the test point group; The method of using the fused image whose difference with the local difference image is less than a preset value as the calibrated feature defect image comprises the following steps: selecting at least one first detection calibration point in the local difference image, wherein the first detection calibration point is evenly distributed in the local difference image; Selecting a second detection calibration point in the fused image, rotating the fused image with the second detection calibration point as a rotation point and a preset angle as a rotation interval angle, to obtain at least one fused rotated image; Overlapping the second detection calibration point of the fused rotation image with at least one first detection calibration point in the local difference image, respectively, to obtain at least one overlapping region of the fused rotation image and the local difference image; Calculate the absolute value of the difference between the pixel values of the fused rotation image and the local difference image at the same position in each of the overlapping areas, and accumulate to obtain the difference judgment value of each of the overlapping areas; In at least one overlapping area, if the difference judgment value of the overlapping area is less than the preset value, the fused image is judged to be a calibration feature defect image, otherwise, no processing is performed.
2. A PCB circuit board defect detection method according to claim 1, It is characterized in that The step of obtaining the feature coordinates of the feature position in the standard design image comprises the following steps: Select the midpoint of the left edge of the standard design image as the coordinate origin, select the horizontal direction as the x-axis, and select the vertical direction as the y-axis to obtain the first xy coordinate system; coordinate modeling the standard design image in a first xy coordinate system; The coordinates of the center position of the feature position are obtained as the feature coordinates of the feature position.
3. A PCB circuit board defect detection method according to claim 2, It is characterized in that The step of enlarging the image of the PCB circuit board to be tested to the same size as the standard design image to obtain the image of the circuit board to be tested comprises the following steps: Select the midpoint of the left edge of the PCB circuit board image to be tested as the coordinate origin, select the horizontal direction as the x-axis, and select the vertical direction as the y-axis to obtain the second xy coordinate system; Coordinate modeling of the image of the PCB to be tested is performed in the second xy coordinate system; The area ratio of the standard design image and the image of the PCB circuit board to be tested is obtained as the scaling ratio; The midpoint of the left edge of the image of the PCB to be tested is used as the zoom point; Multiply the coordinates of each pixel point in the image of the PCB to be tested by the scaling ratio to obtain the scaled coordinates; The pixel values of the pixels of the PCB circuit board image to be tested are assigned to the pixels corresponding to the zoomed coordinates to obtain the circuit board image to be tested.
4. A PCB circuit board defect detection method according to claim 3, It is characterized in that The method of performing feature recognition on the circuit board image to be detected to obtain at least one local difference image comprises the following steps: Determine whether the difference between the pixel values of the pixel points at the same coordinates in the circuit board image to be inspected and the standard design image is less than a preset difference value. If so, no processing is performed. If not, the pixel point is regarded as a difference pixel point. Obtaining the distance between adjacent pixel points as the identification distance; At least one difference pixel point is classified and merged to obtain at least one local difference image. When summarizing and merging, the difference pixel points with a distance equal to the identification distance are classified into one category.
5. A PCB circuit board defect detection method according to claim 4, It is characterized in that The obtaining of the position coordinates of the local difference image comprises the following steps: Coordinate modeling is performed on the local difference image in the second xy coordinate system to obtain position coordinates of the local difference image.
6. A PCB circuit board defect detection system, used to implement the PCB circuit board defect detection method according to any one of claims 1 to 5, It is characterized in that include: A data acquisition module, wherein the data acquisition module acquires at least one conventional defect type of a PCB circuit board, acquires at least one characteristic defect image corresponding to a single conventional defect type, acquires at least one characteristic position where a single conventional defect type occurs in the circuit board, acquires an image of the PCB circuit board to be tested, and acquires a standard design image of the PCB circuit board; A coordinate acquisition module, wherein the coordinate acquisition module acquires feature coordinates of feature positions in the standard design image and acquires position coordinates of the local difference image; An image scaling module, which enlarges the image of the PCB circuit board to be tested to the same size as the standard design image to obtain the image of the circuit board to be tested; A feature recognition module, wherein the feature recognition module performs feature recognition on the circuit board image to be inspected, obtains at least one local difference image, and obtains a feature position consistent with the position coordinates of the local difference image as a target feature position; A defect preprocessing module, wherein the defect preprocessing module obtains at least one conventional defect type corresponding to a target characteristic position as a target conventional defect type, and obtains at least one characteristic defect image corresponding to the target conventional defect type as a target characteristic defect image; A combination generation module, wherein the combination generation module obtains all combinations of at least one target feature defect image corresponding to the target feature position to obtain at least one combination to be detected; The defect recognition module uses the fused image whose difference with the local difference image is less than a preset value as a calibrated feature defect image, summarizes the defect type of at least one local difference image, and obtains the defect type of the PCB circuit board image to be tested.
Citation Information
Cited By
Printed circuit board defect detection system based on virtual reality technology
CN119722664A
A printed circuit board defect detection system based on virtual reality technology
CN119722664B
PCB defect intelligent detection system and method based on image recognition
CN120689582A
PCB defect intelligent detection system and method based on image recognition
CN120689582B
