An automatic teaching method for BGA

Through the automatic teaching method, image processing technology is used to automatically extract and calculate BGA component parameters, which solves the problem of low manual measurement accuracy in the prior art, and improves the efficiency and product quality of the patch machine.

CN112733844BActive Publication Date: 2025-01-10SHENZHEN FAROAD INTELLIGENT EQUIP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011613459.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-30
Publication Date
2025-01-10
Estimated Expiration
2040-12-30

AI Technical Summary

Technical Problem

In the prior art, the parameter measurement of BGA components relies on manual operation, resulting in low accuracy and low efficiency and prone to errors.

Method used

Automatic teaching methods are adopted, including image preprocessing, contour extraction, filtering out interference points and MARK points, rotating the ball, calculating the number of ball rows and columns, generating ball states and calculating component parameters, and automatically extracting and calculating BGA through image processing technology Parameters of components.

Benefits of technology

It realizes rapid and accurate measurement of BGA component parameters, improves the efficiency and product quality of the patch machine, avoids manual measurement errors, and enhances the intelligence and humanization of the machine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112733844B_ABST
    Figure CN112733844B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides an automatic teaching method for BGA, comprising the following steps: S1: image pre-processing, performing binarization, opening operation and closing operation on the image; S2: image contour extraction, least square fitting circle, extracting all balls; S3: filtering interference points; S4: filtering MARK points; S5: rotating all balls; S6: calculating the number of rows and columns of balls; S7: generating ball states; S8: calculating component parameters. The embodiment of the present invention facilitates effective, fast and accurate positioning of BGA, and is applied in the production process of placement machines to avoid poor production quality, thereby making the machine more humane and intelligent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of chip mounters, and more specifically, to an automatic teaching method for BGA. Background Art

[0002] In the production process, the parameters of the mounted components need to be set first, including component length, component width, etc. For different electronic components, more parameters need to be set. For BGA components, the basic parameters include component length, component width, number of ball rows, number of ball columns, ball row spacing, ball column spacing, ball diameter, etc. In the past, these data were manually measured and input into the user interface, which was not only time-consuming and labor-intensive, but also low in precision and prone to errors.

[0003] SUMMARY OF THE INVENTION

[0004] In order to overcome the deficiencies of the prior art, the present invention provides an automatic teaching method for BGA to solve the problems of low accuracy and low efficiency caused by manual measurement of various parameters of BGA with a vernier caliper.

[0005] The technical solution adopted by the present invention to solve the technical problem is: to provide an automatic teaching method of BGA, comprising the following steps:

[0006] S1: Image pre-processing, performing binarization, opening and closing operations on the image;

[0007] S2: Image contour extraction, least squares fitting circle, extracting all spheres;

[0008] S3: filter out interference points;

[0009] S4: filter out MARK points;

[0010] S5: rotate all balls;

[0011] S6: Calculate the number of rows and columns of balls;

[0012] S7: Generate ball state;

[0013] S8: Calculate component parameters.

[0014] Specifically, the image pre-processing step includes:

[0015] The image was binarized using Otsu automatic thresholding;

[0016] Use open operation to filter out interference points;

[0017] The shape of the BGA ball imaging is closed using a closing operation.

[0018] Specifically, the image contour extraction, least squares fitting circle, and extraction of all spheres, the steps include:

[0019] For contour fitting circles with actual areas greater than 25, the score is calculated based on the aspect ratio, and the score of each circle is:

[0020]

[0021] Among them, box.size represents the size of the minimum circumscribed rectangle of the outline, height represents the height of the minimum circumscribed rectangle of the outline, and width represents the width of the minimum circumscribed rectangle of the outline;

[0022] When the score of the circle is greater than 0.7, the circle is considered to be the target ball.

[0023] Specifically, the step of filtering out interference points includes:

[0024] Calculate the minimum enclosing rectangle of all balls;

[0025] Filter out the 4 balls closest to the minimum circumscribed rectangle;

[0026] Repeat the iteration three times until the area of ​​the minimum enclosing rectangle is the same as the previous one or the difference is less than 5%, then terminate the process early.

[0027] Specifically, the step of filtering out the MARK points includes:

[0028] Calculate the minimum enclosing rectangle for all balls;

[0029] Calculate the ball closest to the four vertices as the candidate ball for filtering;

[0030] Exclude the balls closest to the four vertices and calculate the minimum enclosing rectangle again;

[0031] Determine whether the ball closest to the four vertices is within the minimum circumscribed rectangle;

[0032] When the balls closest to the four vertices are all within the minimum circumscribed rectangle, the balls closest to the vertices are filtered out.

[0033] Specifically, the step of rotating all balls includes:

[0034] Calculate the angles of the four sides formed by the outermost sphere respectively;

[0035] After rotation, calculate the coordinates of the four corner points and sort them from top left to bottom right as corner[4];

[0036] Among them, corner[4] represents the coordinates of the four corner points.

[0037] Specifically, the step of calculating the number of rows and columns of balls includes:

[0038] Calculate the X-direction projection;

[0039]

[0040] xpro[i] represents the projection of the i-th column in the X direction, i represents the i-th column, corner[0].x represents the X coordinate of the lower left corner, corner[3].x represents the X coordinate of the lower right corner, It means to sum all pixel values ​​in the specified interval of column i;

[0041] Similarly, calculate the Y-direction projection and the local maximum points of the X and Y-direction projections. Theoretically, the maximum point in the X direction is the number of columns, and the maximum point in the Y direction is the number of rows.

[0042] When the entire row or column is missing, interpolation is performed to obtain the x, y maximum position as pos_x, pos_y. Specifically, the step of generating the ball state includes:

[0043] Generate a two-dimensional matrix;

[0044] According to the position of the ball, calculate whether there is a ball at the corresponding position in the two-dimensional matrix;

[0045] When there is no ball at the corresponding position in the two-dimensional matrix, it is marked as missing.

[0046] Specifically, the calculation parameters include:

[0047] Calculate the element length, element width, number of ball columns, and number of ball rows respectively;

[0048] w = pos_x[k] - pos_x[0]

[0049] h = pos_y[k] - pos_y[0]

[0050] num_x = pos_x.size

[0051] num_y = pos_y.size

[0052] Where w is the length of the element, h is the width of the element, num_x is the number of ball columns, num_y is the number of ball rows, and pos_x[k] is the X coordinate of the last local maximum, pos_y[k] is the Y coordinate of the last local maximum, pos_x.size is the number of local maxima in the X direction, and pos_y.size is the number of local maxima in the Y direction.

[0053] Specifically, the calculation parameters include:

[0054] Calculate the spacing between ball columns and ball rows respectively;

[0055]

[0056]

[0057] Among them, pitch_x represents the distance between the balls in columns, and pitch_y represents the distance between the balls in rows.

[0058] The beneficial effects of the present invention are: S1: image pre-processing, performing binarization, opening operation and closing operation on the image; S2: image contour extraction, least squares fitting circle, extracting all balls; S3: filtering out interference points; S4: filtering out MARK points; S5: rotating all balls; S6: generating result matrix; S7: comparison; S8: iterative linear difference; S9: calculating MARK position; S10: calculating component position and angle, so as to effectively, quickly and accurately locate BGA, which is applied in the production process of placement machines to avoid poor production quality, thereby making the machine more humane and intelligent. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 The present invention is a flow chart of an automatic teaching method of BGA.

[0060] Figure 2 It is a schematic diagram of the effect of the automatic teaching method of BGA.

[0061] Figure 3 It is another schematic diagram of the effect of the automatic teaching method of BGA.

[0062] Figure 4 It is another schematic diagram of the effect of the automatic teaching method of BGA.

[0063] Figure 5 It is another schematic diagram of the effect of the automatic teaching method of BGA.

[0064] Figure 6 It is another schematic diagram of the effect of the automatic teaching method of BGA.

[0065] Figure 7 It is another schematic diagram of the effect of the automatic teaching method of BGA.

[0066] Figure 8 It is another schematic diagram of the effect of the automatic teaching method of BGA.

[0067] Fig. 9 It is another schematic diagram of the effect of the automatic teaching method of BGA.

[0068] Fig.10 It is another schematic diagram of the effect of the automatic teaching method of BGA.

[0069] Fig.11It is another schematic diagram of the effect of the automatic teaching method of BGA. DETAILED DESCRIPTION

[0070] The specific implementation of the present invention is described in detail below in conjunction with specific embodiments:

[0071] Embodiment 1:

[0072] Figure 1 The implementation process of an automatic teaching method for BGA provided in the first embodiment of the present invention is shown. For the convenience of explanation, only the part related to the embodiment of the present invention is shown, which is described in detail as follows:

[0073] In step S101: image pre-processing, performing binarization, opening operation and closing operation on the image;

[0074] Specifically, the image pre-processing step includes:

[0075] The image was binarized using Otsu automatic thresholding;

[0076] Use open operation to filter out interference points;

[0077] The shape of the BGA ball imaging is closed using a closing operation.

[0078] In step S102: extract image contour, fit the circle by least squares, and extract all spheres;

[0079] Specifically, image contour extraction, least squares fitting circle, and extraction of all spheres, the steps include:

[0080] For contour fitting circles with actual areas greater than 25, the score is calculated based on the aspect ratio, and the score of each circle is:

[0081]

[0082] Among them, box.size represents the size of the minimum enclosing rectangle of the outline, height represents the height of the minimum enclosing rectangle of the outline, and width represents the width of the minimum enclosing rectangle of the outline.

[0083] When the score of the circle is greater than 0.7, the circle is considered to be the target ball.

[0084] In step S103: filtering out interference points;

[0085] Specifically, the step of filtering out interference points includes:

[0086] Calculate the minimum enclosing rectangle of all balls;

[0087] Filter out the 4 balls closest to the minimum circumscribed rectangle;

[0088] Repeat the iteration three times until the area of ​​the minimum enclosing rectangle is the same as the previous one or the difference is less than 5%, then terminate the process early.

[0089] In step S104: filter out MARK points;

[0090] Specifically, the step of filtering out the MARK points includes:

[0091] Calculate the minimum enclosing rectangle for all balls;

[0092] Calculate the ball closest to the four vertices as the candidate ball for filtering;

[0093] Exclude the balls closest to the four vertices and calculate the minimum enclosing rectangle again;

[0094] Determine whether the ball closest to the four vertices is within the minimum circumscribed rectangle;

[0095] When the balls closest to the four vertices are all within the minimum circumscribed rectangle, the balls closest to the vertices are filtered out.

[0096] In step S105: rotate all balls;

[0097] Specifically, all the balls are rotated, and the steps include:

[0098] Calculate the angles of the four sides formed by the outermost sphere respectively.

[0099] After rotation, calculate the coordinates of the four corner points and sort them from top left to bottom right as corner[4];

[0100] Among them, corner[4] represents the coordinates of the four corner points.

[0101] In step S106: the number of rows and columns of balls is calculated;

[0102] Specifically, the number of rows and columns of balls is calculated, and the steps include:

[0103] Calculate the X and Y direction projection;

[0104]

[0105] Among them, xpro[i] represents the projection of the i-th column in the X direction, i represents the i-th column, corner[0].x represents the X coordinate of the lower left corner, corner[3].x represents the X coordinate of the lower right corner, It means to sum all pixel values ​​in the specified interval of column i;

[0106] Similarly, calculate the Y-direction projection and the local maximum points of the X and Y-direction projections. Theoretically, the maximum point in the X direction is the number of columns, and the maximum point in the Y direction is the number of rows.

[0107] When the entire row or column is missing, interpolation is performed to obtain the x, y maximum position as pos_x, pos_y. In step S107: generate the ball state;

[0108] Specifically, the ball state is generated, and the steps include:

[0109] Generate a two-dimensional matrix;

[0110] According to the position of the ball, calculate whether there is a ball at the corresponding position in the two-dimensional matrix;

[0111] When there is no ball at the corresponding position in the two-dimensional matrix, it is marked as missing.

[0112] In step S108: component parameters are calculated.

[0113] Specifically, the parameters are calculated, and the steps include:

[0114] Calculate the element length, element width, number of ball columns, and number of ball rows respectively;

[0115] w = pos_x[k] - pos_x[0]

[0116] h = pos_y[k] - pos_y[0]

[0117] num_x = pos_x.size

[0118] num_y = pos_y.size

[0119] Where w is the length of the element, h is the width of the element, num_x is the number of ball columns, num_y is the number of ball rows, and pos_x[k] is the X coordinate of the last local maximum, pos_y[k] is the Y coordinate of the last local maximum, pos_x.size is the number of local maxima in the X direction, and pos_y.size is the number of local maxima in the Y direction;

[0120] Calculate the spacing between ball columns and ball rows respectively;

[0121]

[0122]

[0123] Among them, pitch_x represents the distance between the balls in columns, and pitch_y represents the distance between the balls in rows.

[0124] A person skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, such as ROM / RAM, disk, CD-ROM, etc.

[0125] Embodiment 2:

[0126] Figures 2 to 11 The effect schematic diagram of an automatic teaching method for BGA provided by the second embodiment of the present invention is shown. For the convenience of explanation, only the part related to the embodiment of the present invention is shown, which is described in detail as follows:

[0127] The specific description of each step is as follows:

[0128] Step 1): Pre-treatment

[0129] like Figure 2 , 3 As shown, the image is first binarized using Otsu automatic thresholding. Because there may be some interference points in the image, an open operation is first used to filter them out, and then a closed operation is used to close the circle (the shape of the BGA ball imaging).

[0130] Step 2): Extract all balls

[0131] like Figure 4 As shown in the figure, image contour extraction, contour fitting circles with actual area greater than 25, and score calculation based on aspect ratio, the score of each circle is:

[0132]

[0133] Among them, box.size represents the size of the minimum circumscribed rectangle of the outline, height represents the height of the minimum circumscribed rectangle of the outline, and width represents the width of the minimum circumscribed rectangle of the outline;

[0134] When the score is greater than 0.7, it is considered to be the target ball, and its position is the center of the fitting circle.

[0135] like Figure 4 Shown are all the balls extracted.

[0136] Step 3): Filter out interference points

[0137] Because there may be interference factors in the image and outside the component, they need to be filtered out. For all the balls extracted in the previous step, first calculate their minimum enclosing rectangle, and then filter out the four balls closest to the four sides of the rectangle. Then calculate the minimum enclosing rectangle formed by the remaining balls again, and filter out the four balls closest to the four sides of the rectangle again. This process is iterated 3 times. If the area of ​​the minimum enclosing rectangle this time is the same as the previous one or the difference is 5% less, end this process early.

[0138] The results are as follows Figure 5 As shown, the red solid circles are the filtered balls (it can be seen that some balls are "overkilled" and will be processed later).

[0139] Step 4): Filter out MARK points

[0140] like Figure 6 As shown, the BGA component has only one MARK point, which is located at the corner of the component (it may be at the lower left corner, upper left corner, upper right corner or lower right corner), and is generally in the shape of a triangle. The distance from the nearest ball is not fixed, some are closer, and some are farther. Calculate the minimum circumscribed rectangle for all balls, calculate the ball closest to the four vertices as the candidate balls for filtering, exclude these four balls and calculate the minimum circumscribed rectangle again, and calculate whether the four balls are within this rectangle. If they are, they do not need to be filtered out. If they are, filter out the ball closest to the vertex (in this case, because the MARK point is far away from the ball, it has been filtered out in the previous step).

[0141] Step 5): Spin the ball

[0142] The outermost sphere forms four edges. Calculate the angle of each edge and round it to near 0 degrees. Find the average and rotate it. Calculate the coordinates of the four corner points as corner[4], as follows: Figure 7 Shown by red, green, blue and yellow circles.

[0143] Step 6): Calculate the number of rows and columns of balls

[0144] First, calculate the X and Y projections, and then calculate the local maximum points of the projections in the two directions. If the entire row or column of the ball is missing, interpolation is required.

[0145] The following takes the calculation of the number of columns as an example to illustrate. The calculation of the number of rows is similar.

[0146] First, calculate the X-direction projection

[0147]

[0148] Among them, xpro[i] represents the projection of the i-th column in the X direction, i represents the i-th column, corner[0].x represents the X coordinate of the lower left corner, corner[3].x represents the X coordinate of the lower right corner, It means to sum all pixel values ​​in the specified interval of column i;

[0149] Similarly, calculate the Y-direction projection and calculate the local maximum. Theoretically, the number of maximum values ​​is the number of columns, such as Figure 8 As shown: However, due to the influence of the internal interference points of the component, the actual projection will have the following extreme points, which can be filtered out by dynamic threshold.

[0150] like Fig. 9 As shown in the figure, this is caused by the missing balls of the BGA itself and will be retained during dynamic threshold filtering.

[0151] like Fig.10 As shown, there are three missing rows, which are achieved by distance classification and then interpolation.

[0152] After interpolation, the obtained x,y local maximum positions are pos_x,pos_y.

[0153] Step 7): Generate ball state

[0154] First, generate a two-dimensional matrix with a total of x×y grids, and then calculate whether there is a ball at the corresponding position in the two-dimensional matrix based on the position of the ball. If there is no ball at the corresponding position in the two-dimensional matrix, mark the ball missing.

[0155] Step 8): Calculate parameters

[0156] The component parameters are calculated as follows:

[0157] w, h, num_x, num_y, pitch_x, and pitch_y represent the component length, component width, number of ball columns, number of ball rows, ball column spacing, and ball row spacing, respectively.

[0158] w = pos_x[k] - pos_x[0]

[0159] h = pos_y[k] - pos_y[0]

[0160] num_x = pos_x.size

[0161] num_y = pos_y.size

[0162]

[0163]

[0164] w,h,num_x,num_y,pitch_x,pitch_y represent the element length, element width, number of ball columns, number of ball rows, ball column spacing, ball row spacing, respectively; pos_x[k] represents the X coordinate of the last local maximum, pos_y[k] represents the Y coordinate of the last local maximum, pos_x.size represents the number of local maxima in the X direction, and pos_y.size represents the number of local maxima in the Y direction.

[0165] Those skilled in the art will appreciate that the units and algorithm steps of the embodiments described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware or in a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution.

[0166] Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention. The above is only a specific implementation of the present invention, but the protection scope of the present invention is not limited thereto. Any person familiar with the technical field can easily think of changes or replacements within the technical scope disclosed by the present invention, which should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A BGA automatic teaching method, characterized in that: The following steps are involved: S1: Image pre-processing, performing binarization, opening and closing operations on the image; S2: extracting the image contour, fitting the circle by the least square method, and extracting all the balls; the steps of extracting the image contour, fitting the circle by the least square method, and extracting all the balls include: For contour fitting circles with actual areas greater than 25, the score is calculated based on the aspect ratio, and the score of each circle is: ; in, Expressed as the size of the minimum circumscribed rectangle of the outline, It is expressed as the height of the minimum circumscribed rectangle of the outline. It is expressed as the width of the minimum circumscribed rectangle of the outline; When the score of the circle is greater than 0.7, the circle is considered to be the target ball; S3: filtering out interference points; the step of filtering out interference points includes: Calculate the minimum enclosing rectangle of all balls; Filter out the 4 balls closest to the minimum circumscribed rectangle; Repeat the iteration three times until the area of ​​the minimum enclosing rectangle is the same as the previous one or the difference is less than 5%, then end the process early; S4: filtering out MARK points; the step of filtering out MARK points includes: Calculate the minimum enclosing rectangle for all balls; Calculate the ball closest to the four vertices as the candidate ball for filtering; Exclude the balls closest to the four vertices and calculate the minimum enclosing rectangle again; Determine whether the ball closest to the four vertices is within the minimum circumscribed rectangle; When the balls closest to the four vertices are all within the minimum circumscribed rectangle, the balls closest to the vertices are filtered out; S5: Rotate all balls; Rotate all balls, the steps include: Calculate the angles of the four sides formed by the outermost sphere respectively. After rotation, calculate the coordinates of the four corner points and sort them by top left, bottom right. ; in, Expressed as the coordinates of the 4 corner points; S6: Calculate the number of rows and columns of balls; Calculate the number of rows and columns of balls, the steps include: Calculate the X and Y direction projection; in, It is represented as the projection of the i-th column in the X direction, i is represented as the i-th column, Expressed as the lower left corner X coordinate, Expressed as the lower right corner X coordinate, It means to sum all pixel values ​​in the specified interval of column i; Calculate the local maximum points of the projection in the X and Y directions. Theoretically, the maximum point in the X direction is the number of columns, and the maximum point in the Y direction is the number of rows. When an entire row or column is missing, interpolation is performed to obtain The local maximum position is ; S7: Generate ball status; Generate ball status, the steps include: Generate a two-dimensional matrix; According to the position of the ball, calculate whether there is a ball at the corresponding position in the two-dimensional matrix; When there is no ball at the corresponding position in the two-dimensional matrix, it is marked as missing. S8: Calculate component parameters; The calculating element parameters, the steps include: Calculate the element length, element width, number of ball columns, and number of ball rows respectively; in, Indicates the length of the element, Indicates the width of the component. represents the number of ball columns, represents the number of ball rows, and Expressed as the X coordinate of the last local maximum, Expressed as the Y coordinate of the last local maximum, It is expressed as the number of local maxima in the X direction, It is expressed as the number of local maxima in the Y direction; The calculating element parameters, the steps include: Calculate the spacing between ball columns and ball rows respectively; in, Expressed as the ball row spacing, Ball row spacing.

2. The automatic teaching method of BGA according to claim 1, characterized in that: The image pre-processing step includes: The image was binarized using Otsu automatic thresholding; Use open operation to filter out interference points; The shape of the BGA ball imaging is closed using a closing operation.

Citation Information

Patent Citations

  • Detection and positioning method used for spherical pin element

    CN103745475A

  • Detection and positioning method for PLCC component

    CN104915963A