Method for generating PCB reference points using parallel line segments on copper surfaces

By generating the intersection of the center line of the parallel line segment group on the copper clad surface of the PCB board as a virtual reference point, the problem of small number of reference points and uneven distribution in the traditional method is solved, and high-precision alignment correction of the PCB board with elementless polygon closed copper clad surface is achieved.

CN114357938BActive Publication Date: 2025-09-02HANGZHOU DIANZI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111616280.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-27
Publication Date
2025-09-02
Estimated Expiration
2041-12-27

AI Technical Summary

Technical Problem

In the automatic optical detection of traditional PCB boards, the actual number of reference points is small and the distribution is uneven, resulting in low or failure in graphic image correction accuracy, especially the elementless polygon closed copper-clad PCB board is difficult to effectively align.

Method used

By identifying and calculating the intersection of the center line segment group on the copper clad surface as a virtual reference point, a virtual reference point of graphics and image are generated, and the effective area of ​​the graphics is positioned and offset is verified for compensation, so as to achieve alignment correction.

Benefits of technology

The number and distribution uniformity of virtual reference points are increased, the alignment accuracy of the PCB board is improved, and it is suitable for high-precision image correction of elementless polygon closed copper-clad PCB board.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114357938B_ABST
    Figure CN114357938B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for generating PCB reference points using available parallel line segment groups on a copper-clad surface, comprising the following steps: S1, traversing all copper-clad surface contours in a PCB to obtain available parallel line segment groups in the PCB board pattern; S2, calculating the virtual intersection of the centerlines of two parallel line segment groups as a virtual reference point of the pattern, calculating the central area of ​​each parallel line segment group, and obtaining the effective area of ​​each parallel line segment group; S3, using the effective area of ​​the pattern to locate the corresponding area of ​​a scanned image of the PCB board, extracting the image contour in the area, and calculating the image virtual reference point; S4, verifying the graphic virtual reference point and the image virtual reference point. The present invention effectively increases the number of reference points in optical inspection of PCB boards, helping to solve the problem of low PCB board alignment accuracy or alignment failure caused by a small number of reference points.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of automatic optical detection of PCB boards and relates to a method for generating reference points of a PCB board by using a group of parallel line segments on a copper-clad surface. Background Art

[0002] PCB (Printed Circuit Board), also known as a printed circuit board, is an important electronic component that supports electronic components and serves as a carrier for the electrical connections between them. In the automatic optical inspection of PCB boards, alignment of the PCB board's graphic images is an indispensable step. In traditional methods, alignment reference points are generally generated by engineers using graphic elements on the PCB board to generate actual reference points. Actual reference points refer to actual points on the PCB board, such as the intersection of line elements and the center of a circle. Actual reference points are limited by the number and position of graphic elements. Their small number and uneven distribution make them prone to low accuracy or even calibration failure in later stages of graphic image correction.

[0003] In addition, traditional methods use special graphic elements to calculate reference points, such as line and pad elements in CAD. A PCB is typically composed of lines, pads, and closed polygonal copper surfaces without elements. However, with the continuous development of the industry, some special PCBs have emerged. For example, PCBs with a majority of graphics consisting of closed polygonal copper surfaces without elements, making alignment based solely on line and pad elements insufficient. Summary of the Invention

[0004] To solve the above problems, the technical solution of the present invention is a method for generating reference points on a PCB board using a group of parallel line segments on a copper-clad surface, comprising the following steps:

[0005] S1, traverse all copper-clad surface contours in the PCB board to obtain the available parallel line segment groups in the PCB board graphics;

[0006] S2, calculating the virtual intersection of the center lines of the two parallel line segment groups as the virtual reference point of the graphic, calculating the central area of ​​each parallel line segment group, and obtaining the effective area of ​​each parallel line segment group;

[0007] S3, using the effective area of ​​the graphic to locate the corresponding area of ​​the PCB board scan image, extracting the image contour in the area, and calculating the image virtual reference point;

[0008] S4, verifying the graphic virtual reference points and the image virtual reference points, calculating the offset between the graphic and image virtual reference points to compensate the PCB board, calculating the error between the compensated PCB and the actual PCB image, and verifying the set of graphic image reference points.

[0009] Preferably, the copper-clad surface refers to a polygonal closed copper-clad surface without elements on the PCB board, and does not include circuit and pad elements.

[0010] Preferably, the S1 specifically includes the following steps:

[0011] S11, parsing the CAD data of the PCB board, and processing the parsed standard graphics into a size consistent with the size of the collected PCB board scan image;

[0012] S12, setting a minimum length constraint, traversing all copper-clad surface contours in the graphic, determining for each line segment whether it satisfies the minimum length constraint, and obtaining a set of line segments with the minimum length constraint;

[0013] S13, based on the expansion and contraction directions of the line segments, every two line segments with opposite expansion and contraction directions form a parallel line segment group;

[0014] S14, setting a maximum distance constraint, determining whether the maximum distance between each parallel line segment group is less than the maximum distance constraint, screening out line segment groups less than the maximum distance constraint, and obtaining available parallel line segment groups.

[0015] Preferably, the step S3 specifically includes the following steps:

[0016] S31, converting the graphic coordinate system and the image coordinate system into the same coordinate system;

[0017] S32, obtaining the corresponding area of ​​the PCB board scan image according to the effective area positioning of the graphic, extracting the target pixel contour in the area using a contour tracking algorithm, and obtaining a target pixel contour set;

[0018] S33, setting a minimum number of pixels, filtering out target pixel contours having pixel counts greater than the minimum number of pixels, and obtaining a correct target pixel contour;

[0019] S34, performing sub-pixel conversion on the correct target pixel contour set to obtain a sub-pixel contour set;

[0020] S35, setting a minimum fitting accuracy error, fitting the sub-pixel profile set into a parallel straight line group, determining whether the accuracy error meets the error requirement, and obtaining the fitted straight line group;

[0021] S36, calculating the center lines of the two parallel straight line groups after fitting, and calculating the intersection of the two center lines as a virtual reference point of the image.

[0022] Preferably, the S4 specifically includes the following steps:

[0023] S41, calculating the horizontal offset and vertical offset between the group of graphic image reference points, and compensating for the PCB board and other groups of graphic reference points;

[0024] S42, using the group of image reference points as the origin, calculating the rotation angle and scaling coefficient between the image reference points of other groups and the compensated graphic reference points, and performing rotation compensation on the PCB;

[0025] S43, setting a minimum precision error, calculating the error between the compensated PCB board and the actual PCB image, and determining whether the minimum precision error requirement is met.

[0026] The beneficial effects of the present invention are as follows:

[0027] This paper proposes a method for generating virtual reference points using available parallel line segments on a copper-clad surface. This method effectively addresses the issue of a limited number of actual reference points and their uneven distribution, and can effectively implement alignment for certain specialized PCBs. Parallel line segments exist within the copper-clad surface. These parallel line segments, similar to Line elements, are less affected by expansion and contraction. Therefore, the intersection of the centerlines of two parallel line segment groups can be calculated as a virtual reference point, thereby increasing the number of virtual reference points and achieving better alignment. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 This is a flowchart of the steps of a method for generating PCB reference points using a group of parallel line segments on a copper-clad surface according to an embodiment of the present invention;

[0029] Figure 2 A flowchart of PCB automatic optical inspection using a method of generating PCB reference points using a group of parallel line segments on a copper-clad surface according to the present invention;

[0030] Figure 3 A schematic diagram of a method for generating PCB board reference points using a group of parallel line segments on a copper-clad surface according to an embodiment of the present invention;

[0031] Figure 4 A schematic diagram of a method for generating PCB board reference points using a group of parallel line segments on a copper-clad surface according to an embodiment of the present invention;

[0032] Figure 5 Schematic diagram of reference point verification according to a method for generating PCB reference points using a group of parallel line segments on a copper clad surface according to an embodiment of the present invention. DETAILED DESCRIPTION

[0033] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0034] On the contrary, the present invention covers any alternatives, modifications, equivalents, and solutions that fall within the spirit and scope of the present invention as defined by the claims. Furthermore, to facilitate a better understanding of the present invention, certain specific details are described in detail below in the detailed description of the present invention. Those skilled in the art will be able to fully understand the present invention without these details.

[0035] See also Figure 1 , which is a flowchart of a method for generating PCB reference points using a group of parallel line segments on a copper-clad surface according to an embodiment of the present invention, comprising the following steps:

[0036] S1, traverse all copper-clad surface contours in the PCB board to obtain the available parallel line segment groups in the PCB board graphics;

[0037] S2, calculating the virtual intersection of the center lines of the two parallel line segment groups as the virtual reference point of the graphic, calculating the central area of ​​each parallel line segment group, and obtaining the effective area of ​​each parallel line segment group;

[0038] S3, using the effective area of ​​the graphic to locate the corresponding area of ​​the PCB board scan image, extracting the image contour in the area, and calculating the image virtual reference point;

[0039] S4, verifying the graphic virtual reference points and the image virtual reference points, calculating the offset between the graphic and image virtual reference points to compensate the PCB board, calculating the error between the compensated PCB and the actual PCB image, and verifying the set of graphic image reference points.

[0040] In a specific embodiment, an optional application scenario of the present invention is shown in Figure 2 In a simple PCB automatic optical inspection system, the standard graphics of the PCB board are designed using CAD software, and the PCB board is processed and produced according to the design. The PCB board can generate an image under the CCD imaging system; the position and scale of the graphic are corrected by calculating the reference points on the graphic and image respectively; by comparing the image and the corrected graphic, errors such as short circuit, open circuit, copper slag, etc. of the PCB board can be found, and the inspection is completed.

[0041] The specific steps are as follows:

[0042] S11, parsing the CAD data of the PCB board, and processing the parsed standard graphics into a size consistent with the size of the collected PCB board scan image;

[0043] S12, setting a minimum length constraint, traversing all copper-clad surface contours in the graphic, determining whether each line segment meets the minimum length constraint, and obtaining a set of line segments with the minimum length constraint;

[0044] S13, based on the expansion and contraction directions of the line segments, every two line segments with opposite expansion and contraction directions form a parallel line segment group;

[0045] S14, setting a maximum distance constraint, determining whether the maximum distance between each parallel line segment group is less than the maximum distance constraint, screening out line segment groups less than the maximum distance constraint, and obtaining available parallel line segment groups.

[0046] S21, calculating a virtual intersection point of the center lines of two parallel line segment groups as a virtual reference point of the graphic;

[0047] S22, calculate the view frame of the parallel line segment group, see Figure 3 , each line segment generates a rectangular area with a length of r and a width of 2d with the current line segment as the center line as the viewfinder; where r is the effective length of the line segment and d is the line extension distance;

[0048] S32, using the center point of the PCB as a reference point, roughly aligning the graphic image to obtain the corresponding area of ​​the viewfinder on the image;

[0049] In step S33, the frame is pixelated, and the pixel points within the frame are assigned a value of 1. A bitwise AND operation is performed on the pixels of the frame and the corresponding area in step S32. The remaining pixel points with a value of 1 are the contours of the corresponding graphic elements, and contour tracing is used to obtain the contours of the image line segments.

[0050] S34, performing sub-pixel conversion on the image contour to obtain a sub-pixel contour;

[0051] S35, fitting the sub-pixel contour to obtain a straight line graph;

[0052] S36, see Figure 4 , calculate the center lines of the two sets of fitted parallel straight lines, and calculate the intersection of the center lines as the image reference point;

[0053] S4, see Figure 5 Calculate the horizontal and vertical offsets between graphic reference point A1 and image reference point A2. Calculate the rotational offset and expansion / contraction ratio of reference points in group B, centered around group A's graphic image reference points. Use these offsets to calculate the offset coordinates of other points on the PCB. Compare these coordinates to the positions on the image. If the distance error is less than the minimum error required for accuracy, retain that group of reference points.

[0054] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for generating PCB reference points using a group of parallel line segments on a copper clad surface, characterized in that: The following steps are involved: S1, traverse all copper-clad surface contours in the PCB board to obtain the available parallel line segment groups in the PCB board graphics; S2, calculating the virtual intersection of the center lines of the two parallel line segment groups as the virtual reference point of the graphic, calculating the central area of ​​each parallel line segment group, and obtaining the effective area of ​​each parallel line segment group; S3, using the effective area of ​​the graphic to locate the corresponding area of ​​the PCB board scan image, extracting the image contour in the area, and calculating the image virtual reference point; S4, verifying the graphic virtual reference points and the image virtual reference points, calculating the offset between the graphic and image virtual reference points to compensate the PCB board, calculating the error between the compensated PCB and the actual PCB image, and verifying the set of graphic virtual reference points and image virtual reference points; The copper-clad surface refers to a polygonal closed copper-clad surface without any elements on the PCB board, and does not include circuit and pad elements; The S1 specifically includes the following steps: S11, parsing the CAD data of the PCB board, and processing the parsed standard graphics into a size consistent with the size of the collected PCB board scan image; S12, setting a minimum length constraint, traversing all copper-clad surface contours in the graphic, determining for each line segment whether it satisfies the minimum length constraint, and obtaining a set of line segments with the minimum length constraint; S13, based on the expansion and contraction directions of the line segments, every two line segments with opposite expansion and contraction directions form a parallel line segment group; S14, setting a maximum distance constraint, determining whether the maximum distance between each parallel line segment group is less than the maximum distance constraint, screening out line segment groups less than the maximum distance constraint, and obtaining available parallel line segment groups.

2. The method according to claim 1, characterized in that The S3 specifically includes the following steps: S31, converting the graphic coordinate system and the image coordinate system into the same coordinate system; S32, obtaining the corresponding area of ​​the PCB board scan image according to the effective area positioning of the graphic, extracting the target pixel contour in the area using a contour tracking algorithm, and obtaining a target pixel contour set; S33, setting a minimum number of pixels, filtering out target pixel contours having pixel counts greater than the minimum number of pixels, and obtaining a correct target pixel contour; S34, performing sub-pixel conversion on the correct target pixel contour set to obtain a sub-pixel contour set; S35, setting a minimum fitting accuracy error, fitting the sub-pixel profile set into a parallel straight line group, determining whether the accuracy error meets the error requirement, and obtaining the fitted straight line group; S36, calculating the center lines of the two parallel straight line groups after fitting, and calculating the intersection of the two center lines as a virtual reference point of the image.

3. The method according to claim 1, characterized in that The S4 specifically includes the following steps: S41, calculating the horizontal offset and vertical offset between the group of graphic virtual reference points and the image virtual reference points, and compensating for the PCB board and other groups of graphic virtual reference points; S42, using the image virtual reference point in the group as the origin, calculating the rotation angle and scaling coefficient between the image virtual reference points of other groups and the compensated graphic virtual reference points, and performing rotation compensation on the PCB; S43, setting a minimum precision error, calculating the error between the compensated PCB board and the actual PCB image, and determining whether the minimum precision error requirement is met.

Citation Information

Patent Citations

  • Method for locating Mark points on PCB (printed circuit board) by utilizing outline gravity center method

    CN102930266A

  • Precision compensation system suitable for chip mounter

    CN112367828A