Method, system, storage medium, and device for quickly acquiring component characteristic parameters

By extracting and fitting the feature groups of the component ROI area in the patch machine, and screening the feature profiles using circular and rectangular indicators, the problem of complex and inaccurate acquisition of component feature parameters in the prior art is solved, and fast and accurate acquisition of component feature parameters is achieved.

CN120374735BActive Publication Date: 2025-09-02HEFEI ANXIN PRECISION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

It is difficult to quickly and accurately obtain the characteristic parameters of the patch machine components, especially for complex special-shaped components, which are complex in operation and have high requirements for operators.

Method used

By extracting the feature groups of the component ROI area, fitting and classification of feature profiles, screening feature profiles using circular and rectangular indicators, combining the image automatic positive and initial screening modules, component type identification and feature parameter acquisition are realized.

Benefits of technology

It realizes simple operation, fast and accurate component feature parameters acquisition, and is suitable for components in various packaging forms, reducing the learning cost and processing time of operators.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120374735B_ABST
    Figure CN120374735B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of component identification and positioning technology for chip placement machines, and specifically discloses a method and system, storage medium, and device for quickly acquiring component characteristic parameters. The method includes the following steps: extracting characteristic profiles for each feature group in the component ROI region, wherein the feature group is a group of features with consistent shapes and uniform distribution in the component ROI region; fitting the characteristic profiles of each feature group to determine the shape parameters of the characteristic profiles; counting the shape parameters of all the characteristic profiles and determining the component type based on the statistical results; and based on the determined component type, integrating the shape parameters of the characteristic profiles in each feature group to obtain complete component characteristic parameters. This solution utilizes traditional image processing methods to calculate features for each feature group individually and integrate them according to certain rules. It has fast processing speed, accurate parameter results, simple operation methods, low learning costs, and low operator requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of component identification and positioning of a chip placement machine, and in particular to a method and system for quickly acquiring characteristic parameters of components of a chip placement machine, and a storage medium. Background Art

[0002] Chip placement machines are essential tools for automated integrated circuit board production, relying primarily on machine vision to accurately place various components. During the placement process, the real-time identification and positioning of various components requires the component's characteristic parameters. The accuracy of these parameters determines, to a certain extent, the difficulty and accuracy of identification. Therefore, quickly and accurately acquiring component characteristic parameters is crucial.

[0003] The parameter acquisition of a new component generally includes direct measurement, offline programming estimation, calculation using packaging information in product documents, image recognition and other methods.

[0004] The direct measurement method uses measuring tools such as vernier calipers for direct testing. This method can quickly obtain the desired characteristic parameters such as length, width and thickness for simple components such as chip components. However, it has the following defects: First, accuracy is difficult to guarantee. Both manual measurement and the measuring tools used may introduce errors, making accuracy difficult to guarantee; second, for components with many and complex features, such as special-shaped components with multiple groups of features, direct measurement is complicated to operate and it is difficult to quickly obtain accurate characteristic parameters.

[0005] The offline programming estimation method uses a component image, a camera scale, and a previously defined model of specific component feature parameters to construct the component's characteristic edges and display them above the image. The constructed characteristic edges are then visually compared to the actual component boundary in the image, and the parameters are repeatedly adjusted to complete the parameter estimation. While this method can handle most situations, it requires a high level of operator skill and the repeated debugging process is complex.

[0006] Calculation using package information from product documentation primarily involves manually calculating and recording the required characteristic parameters based on the package dimensions. This method can handle all components, but it places high demands on the operator, requiring them to understand the package data, understand the meaning of the component characteristic parameters, and be able to convert these parameters. Furthermore, this method is complex, involving the conversion of multiple parameters.

[0007] There are currently two common approaches to image recognition. One is based on deep learning for object segmentation and classification. This approach is fully adaptive, but it is generally difficult to process components with unknown packages, and the models are generally large, requiring significant computer resources. The other is based on traditional image processing combined with a pre-set feature framework. This approach also struggles to obtain accurate results for unknown components. With over a hundred different package types for SMD components, it's difficult to design algorithms that account for all of them. Therefore, both approaches have limitations.

[0008] In summary, it is difficult for existing methods to quickly and accurately obtain characteristic parameters applicable to various types of placement machine components. Summary of the Invention

[0009] The purpose of the present invention is to overcome the problems existing in the prior art and provide a method and system for quickly acquiring component characteristic parameters, a storage medium, and a device, which can quickly and accurately acquire the characteristic parameters of various types of placement machine components.

[0010] In order to achieve the above object, the first aspect of the present invention provides a method for quickly acquiring component characteristic parameters, comprising the following steps:

[0011] Extract feature contours for each feature group in the component ROI region, where the feature group is a set of features with consistent shapes and uniform distribution in the component ROI region;

[0012] Fitting the feature profiles of each feature group to determine shape parameters of the feature profiles;

[0013] Counting shape parameters of all the characteristic contours, and determining the component type according to the statistical results;

[0014] Based on the determined component type, shape parameters of the feature contours in each of the feature groups are integrated to obtain complete component feature parameters.

[0015] Preferably, fitting the characteristic profiles of each characteristic group to determine shape parameters of the characteristic profiles comprises the following process:

[0016] Perform circular fitting and rectangular fitting on the characteristic contour respectively to obtain the circular index Rc and rectangular index Rr of the characteristic contour, Rc=α×E+β× Tc , Rr=α×R+β× Tr, where \(E\) represents the circularity of the feature contour, \(Tc\) represents the proportion of the number of inliers after circular fitting of the feature contour to the total number of contour points before fitting, \(R\) represents the rectangularity of the feature contour, \(Tr\) represents the proportion of the number of inliers after rectangular fitting of the feature contour to the total number of contour points before fitting, the inliers are the points among the total contour points before fitting that are less than a specified pixel distance from the fitting boundary, and \(\alpha\) and \(\beta\) are weight coefficients;

[0017] According to the magnitudes of \(Rc\) and \(Rr\), retain the feature contours that meet the preset requirements and determine the shape parameters of the feature contours.

[0018] Preferably, the step of retaining the feature contours that meet the preset requirements and determining the shape parameters of the feature contours according to the magnitudes of \(Rc\) and \(Rr\) is specifically as follows:

[0019] If \(Rc < 0.5\) and \(Rr < 0.5\), then screen out the corresponding feature contours, otherwise retain them;

[0020] If \(Rc > Rr\), then determine that the feature contour is circular, and use the diameter and center obtained by circular fitting of the feature contour as the diameter and center of the contour respectively. If \(Rc < Rr\), then determine that the feature contour is rectangular, and use the length, width and center obtained by rectangular fitting of the feature contour as the length, width and center of the contour respectively.

[0021] The second aspect of the present invention provides a system for quickly obtaining component feature parameters, including:

[0022] A feature contour extraction module configured to extract feature contours for each feature group in the ROI area of the component, where the feature group is a group of features with the same shape and uniform distribution in the ROI area of the component;

[0023] A fitting module configured to fit the feature contours of each feature group to determine the shape parameters of the feature contours;

[0024] A component type determination module configured to count the shape parameters of all the feature contours and determine the component type according to the statistical results;

[0025] A component parameter calculation module configured to integrate the shape parameters of the feature contours in each feature group based on the determined component type to obtain complete component feature parameters.

[0026] Preferably, it further includes a user interaction module configured to implement the box selection interaction of the component ROI area and the feature group.

[0027] Preferably, it further includes:

[0028] An image automatic rotation module, configured to extract the contour of the ROI region of the component and perform multi-angle rotation; statistically calculate the sum of the projection extreme values of all contours in the horizontal and vertical directions after each rotation, and obtain the rotation angle when the sum of the projection extreme values is the largest as the angle estimation in the ROI region of the component; rotate and correct the ROI region of the component with the estimated angle;

[0029] A preliminary screening module, configured to perform preliminary screening on the connected contours of the feature group to remove interfering contours and obtain the feature contours.

[0030] Preferably, the process of fitting the feature contours of each feature group to determine the shape parameters of the feature contours includes the following steps:

[0031] Perform circular fitting and rectangular fitting on the feature contours respectively to obtain the circular index Rc and rectangular index Rr of the feature contours. Rc = α×E + β× Tc ,Rr = α×R + β× Tr where E represents the circularity of the feature contour, Tc represents the proportion of the number of inliers after circular fitting of the feature contour to the total number of contour points before fitting, R represents the rectangularity of the feature contour, Tr represents the proportion of the number of inliers after rectangular fitting of the feature contour to the total number of contour points before fitting, the inliers are the points among the total contour points before fitting whose distance from the fitting boundary is less than the specified pixel, and α and β are weight coefficients;

[0032] If Rc < 0.5 and Rr < 0.5, then screen out the corresponding feature contours, otherwise retain them;

[0033] If Rc > Rr, then determine that the feature contour is circular, and use the diameter and center obtained by circular fitting of the feature contour as the diameter and center of the contour respectively. If Rc < Rr, then determine that the feature contour is rectangular, and use the length, width and center obtained by rectangular fitting of the feature contour as the length, width and center of the contour respectively.

[0034] The third aspect of the present invention provides a machine-readable storage medium, on which instructions are stored, and the instructions are used to make a machine execute the above-mentioned method for quickly obtaining component feature parameters.

[0035] The fourth aspect of the present invention provides an electronic device, the electronic device includes: one or more processors; and a memory for storing one or more programs, when the one or more programs are executed by the one or more processors, the electronic device implements the above-mentioned method.

[0036] The above technical solution can meet the requirement that the operator only needs to select the approximate component ROI and feature group ROI to automatically obtain the component feature parameters. The operation method is simple, the learning cost is low, and the requirements for the operator are low. Only the traditional image processing method is used to calculate the features of each feature group separately and integrate them according to certain rules. The processing speed is fast and the parameter results are accurate. Conventional components and special-shaped components are designed separately. Special-shaped components are not constrained by specific template forms and can be applied to components of various packaging forms. The method has a wide range of applications. Therefore, the technical solution proposed by the present invention has the advantages of simple operation, low requirements for personnel, fast parameter acquisition speed, and a wide range of applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 A schematic flow chart of a method for rapidly acquiring characteristic parameters of components of a placement machine disclosed in the present invention;

[0038] Figure 2 This is a feature group ROI frame selection diagram in the embodiment disclosed in the present invention;

[0039] Figure 3 This is a diagram showing the characteristic parameter results of a multi-pin component obtained in the embodiment disclosed in the present invention. DETAILED DESCRIPTION

[0040] The following describes the specific implementation of the embodiment of the present invention in detail with reference to the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the embodiment of the present invention and is not used to limit the embodiment of the present invention.

[0041] Taking the rapid acquisition of characteristic parameters of QFP multi-pin components as an example, the technical solution and specific implementation methods of the method for rapid acquisition of characteristic parameters of components of a placement machine according to the present invention are described in detail below.

[0042] The first aspect of the embodiment of the present invention provides a method for quickly acquiring characteristic parameters of a component of a placement machine, referring to Figure 1 As shown, the following steps are included:

[0043] S1. Select the target component ROI area and automatically straighten the image. First, select the ROI area containing the target component on the grayscale image containing the component whose parameters are to be obtained. Then, extract all contours in the ROI area using the Canny or binarization method. Then, perform multi-angle rotation on the extracted contours and calculate the sum of the horizontal and vertical projection extremes of the contour points after rotation. The rotation angle at which the sum of the projection extremes is the maximum is used as the estimated angle of the component in the image. Finally, rotate the ROI area at the estimated angle to rotate the component in the image to a horizontal state.

[0044] Furthermore, step S1 includes the following process:

[0045] S11. Component ROI selection. For example, manually select the ROI range containing the target component on the component image with the mouse, or the machine can automatically select it. Generally speaking, the component whose parameters are to be obtained only occupies a part of the entire image. If the entire image is processed, it will not only take more time but also easily introduce interference, resulting in inaccurate results. Therefore, the ROI area of ​​the component whose parameters are to be obtained is roughly selected through human-computer interaction, so that the selected ROI is as small as possible to facilitate subsequent rapid processing and accurate angle estimation;

[0046] S12. Contour extraction: Use the Canny algorithm to extract the edges of the image of interest, and then use the connected component method to obtain all contours.

[0047] S13. Component rotation angle estimation. Within the set angle range, all extracted contours are rotated multiple times with a set angle step size, where the rotation center is the center of the framed ROI. In the embodiment of the present invention, it is preferred to use [-45°, 45°] as the rotation range, 0.2° as the angle step size, and a three-layer search pyramid is designed for acceleration. The sum of the projection extreme values ​​of the contour points in the horizontal and vertical directions after each rotation is counted. The rotation angle with the maximum sum of the projection extreme values ​​is used as the component rotation angle estimate.

[0048] S14: Image rotation. Using the estimated component angle as the rotation angle and the center of the selected ROI as the rotation center, the image is rotated to rotate the component ROI area to a horizontal state.

[0049] S2, select the feature group. Figure 2 As shown, a group of features with consistent shapes and uniform distribution in the component ROI area image is regarded as a feature group. The ROI area of ​​each feature group is roughly selected in the image with the mouse and saved to obtain each feature group.

[0050] S3. Extract feature contours for each feature group and perform feature calculations, including feature types and feature parameters. Using the OTSU and connected domain contour extraction methods, extract feature contours from each feature group; perform preliminary screening of the extracted contours using area, number of contour points, roundness, rectangularity, and convexity; perform circular and rectangular fitting on the initially screened contours; calculate the circular and rectangular indices of the initially screened contours, and further screen them using the size of the circular and rectangular indices; perform feature classification on the retained contours based on the size of the circular and rectangular indices; and determine the feature size parameters of the classified contours based on the circular and rectangular fitting results.

[0051] Furthermore, step S3 includes the following process:

[0052] S31, connected contour extraction: First, use OTSU to binarize the current feature group, and then use the connected domain contour extraction method to obtain all connected contours in the current feature group.

[0053] S32 , preliminarily screening the extracted connected contours to remove interfering contours and obtain the characteristic contours.

[0054] All connected contours extracted are screened by area, number of contour points, roundness, rectangularity, and convexity. The initial screening method is as follows:

[0055] Remove the contours whose closed area of ​​the connected contours is smaller than the specified pixel or the contours whose closed area differs from the ROI image area of ​​the feature group by less than the specified pixel;

[0056] Remove the connected contours whose number of contour points is less than a specified number;

[0057] Removing contours whose rectangularity of the connected contours is less than a threshold;

[0058] Removing the contours whose roundness of the connected contours is less than a threshold;

[0059] The contours of the connected contours whose convexity is less than a threshold are removed.

[0060] In the embodiment of the present invention, exemplary selection rules are as follows:

[0061] (1) Remove the contours whose closed area is less than 5 pixels or the contours whose closed area differs from the ROI image area of ​​the feature group by less than 5 pixels;

[0062] (2) Remove contours with less than 8 contour points;

[0063] (3) Remove the contours with a rectangularity less than 0.5;

[0064] (4) Remove contours with a roundness less than 0.5;

[0065] (5) Remove contours with convexity less than 0.75.

[0066] S33, fitting the feature profiles of each feature group to determine shape parameters of the feature profiles.

[0067] The characteristic contours after the initial screening are respectively subjected to circular fitting and rectangular fitting. For the current characteristic contour, the iterative weighted least squares circular fitting method is used to calculate the circular fitting and obtain the circular parameters that best fit the current contour. At the same time, the same characteristic contour is subjected to rectangular fitting using methods such as Hough transform and inverse transform, the relationship between the four sides of the rectangle, and iterative weighted least squares linear fitting to obtain the rectangular parameters that best fit the current contour. Specifically, the Hough transform and inverse transform are first used to obtain multiple straight line point sets and the approximate angles corresponding to each straight line point set, where the angle step size of the Hough transform is set to 1 degree, the shortest straight line length is set to 4 pixels, and the minimum spacing is set to 1 pixel; then, the rectangle is combined using the angle constraints that the adjacent sides of the rectangle are perpendicular to each other and the opposite sides are parallel to each other, where the angle threshold for perpendicularity and parallelism is set to 5°; then, a set of straight lines that meet the conditions are respectively fitted using the iterative weighted least squares method, and the intersection of the four sides after fitting and the angle of the straight line are calculated; finally, the center, length, and width of the rectangle are calculated using the four corner points, and the angle of the rectangle is calculated using the angles of the four straight lines.

[0068] S34. Fitting the feature profiles of each feature group to determine shape parameters of the feature profiles, so as to achieve re-screening and classification of the profiles.

[0069] After the initial screening, the circular index and rectangular index of the contour are calculated respectively. The contour is re-screened and the feature classification is performed based on the size of the circular index and rectangular index. Specifically, for the current contour, the circular index Rc is calculated using formula (1), and the rectangular index Rr is calculated using formula (2).

[0070] Rc=α×E+β× Tc (1)

[0071] Wherein, E represents the circularity of the characteristic contour, Tc represents the ratio of the number of inner points of the characteristic contour after circular fitting to the total number of contour points before fitting, the inner point is a point in the total contour points before fitting that is less than a specified pixel away from the circle fitting boundary, α and β are weight coefficients, and α+β=1. In this embodiment, α is 0.6 and β is 0.4.

[0072] Rr=α×R+β× Tr (2)

[0073] Wherein, R represents the rectangularity of the characteristic contour, Tr represents the ratio of the number of inner points of the characteristic contour after rectangular fitting to the total number of contour points before fitting, the inner point is a point in the total contour points before fitting that is less than a specified pixel away from the rectangular fitting boundary, α and β are weight coefficients, and α+β=1. In this embodiment, α is 0.6 and β is 0.4.

[0074] Further, according to the magnitudes of Rc and Rr, the feature profiles meeting the preset requirements are retained and the shape parameters of the determined feature profiles are as follows:

[0075] If Rc < 0.5 and Rr < 0.5, the corresponding feature profiles are screened out; otherwise, they are retained.

[0076] If Rc > Rr, it is determined that the feature profile is circular; if Rc < Rr, it is determined that the feature profile is rectangular.

[0077] S35. Calculation of profile feature parameters. For each retained profile, according to its feature classification, the corresponding circular parameters or rectangular parameters are used as the size parameters of the current feature.

[0078] S4. Statistically analyze the shape parameters of the retained feature profiles in all the feature groups, and determine the component type according to the statistical results.

[0079] Automatically classify the components by using the number, feature type, feature distribution, etc. of the retained feature profiles in all the feature groups. The specific classification rules are as follows:

[0080] (1) When the number of the feature profiles is unique: If the shape is rectangular, it is determined that the component is a Chip component; if the shape is circular, it is determined that the component is a BGA component.

[0081] (2) When the number of the feature profiles is not unique:

[0082] If both circular and rectangular shapes exist in the feature profile shapes, it is determined that the component is a special-shaped component.

[0083] If the shapes of the feature profiles are all circular, the fluctuation of the fitted circle diameter is within the threshold range, and the distribution is in a grid pattern, it is determined that the component is a BGA component.

[0084] If the shapes of the feature profiles are all rectangular, they are distributed in the NSEW directions, and the fluctuation of the length and width of the fitted rectangles in the same direction is within the threshold range, it is determined that the component is a multi-pin component.

[0085] (3) For the rest that do not meet the conditions in (1) and (2) above, it is determined that the component is a special-shaped component.

[0086] S5. Based on the determined component type, integrate the shape parameters of the feature profiles in each feature group to obtain the complete component feature parameters.

[0087] According to the classification results, combine the feature parameters, feature positions, etc. of the retained profiles in each feature group to calculate the overall length and width of the component and the feature description parameters. The integration is performed according to the statistical results of the shape parameters of the retained feature profiles in the feature groups, and the process is as follows:

[0088] (1) When the component type is a chip component, the length and width of the fitted rectangle of the unique characteristic outline are the length and width of the complete component.

[0089] (2) When the component type is a BGA component, the method for integrating the characteristics of the BGA component and obtaining the complete component parameters is as follows:

[0090] Taking the average of the circle fitting diameters of all feature contours retained in each feature group as the BGA component terminal diameter;

[0091] The average of the distances between the circle fitting centers of two adjacent contours in the horizontal direction among all the characteristic contours retained in each of the characteristic groups is used as the distribution spacing of the BGA component terminals in the horizontal direction;

[0092] The average of the distances between the circle fitting centers of two vertically adjacent contours of all the characteristic contours retained in each of the characteristic groups is used as the distribution spacing of the BGA component terminals in the vertical direction;

[0093] Obtaining the maximum number of terminals of the BGA component in the horizontal direction by taking the ratio of the horizontal spacing between the circular fitting centers of the two farthest contours in the horizontal direction among all the characteristic contours retained in each of the characteristic groups to the distribution spacing of the BGA component terminals in the horizontal direction;

[0094] Obtaining the maximum number of terminals of the BGA component in the vertical direction by taking the ratio of the vertical spacing between the circular fitting centers of the two most distant contours in the vertical direction among all the characteristic contours retained in each of the characteristic groups to the distribution spacing of the BGA component terminals in the vertical direction;

[0095] Obtaining the overall size of the BGA component in the horizontal direction based on the maximum number of terminals of the BGA component in the horizontal direction, the distribution spacing of the BGA component terminals in the horizontal direction, and the diameter of the BGA component terminals;

[0096] The overall size of the BGA component in the vertical direction is obtained by the maximum number of terminals of the BGA component in the vertical direction, the distribution spacing of the BGA component terminals in the vertical direction, and the diameter of the BGA component terminals.

[0097] (3) When the component type is a multi-pin component, the method for integrating the features of the multi-pin component and obtaining the complete component parameters is as follows:

[0098] Calculate the average length, average width, average spacing between adjacent contours, and average center coordinates of the fitted rectangles of all feature contours retained in each feature group, and use them as the characteristic parameters of the pin length, pin width, pin spacing, and center coordinates of the pin group in the corresponding feature group. Use the number of fitted rectangles as the number of pins in the pin group.

[0099] According to the relative position relationship of the center coordinates of the pin groups in each of the feature groups and the pin distribution direction, each group of pins is divided into four directions of NSEW;

[0100] Calculate the maximum and minimum values ​​of the horizontal and vertical coordinates of the minimum circumscribed rectangle of each group of pins based on the pin length, pin width, pin spacing, center coordinates, pin quantity, and pin distribution direction of the pin group in the feature group;

[0101] Determine the length, width and center coordinates of the complete component based on the maximum and minimum values ​​of the horizontal and vertical coordinates of the minimum circumscribed rectangular area of ​​each pin group in all the feature groups;

[0102] The position offset of the pin group in each feature group is obtained based on the offset between the center coordinates of the pin group in each feature group and the center coordinates of the complete component.

[0103] The characteristic parameter results of multi-pin components are shown as follows Figure 3 As shown, through Figure 2 The four roughly feature group images of the pin feet in different directions selected in the box shown can automatically calculate the complete component feature parameters, including the overall length and width, pin length, pin width, pin spacing, pin distribution and pin quantity in each direction, and the calculated features can be completely consistent with the actual component features.

[0104] (4) When the component type is a special-shaped component, the method for integrating the characteristics of the special-shaped component and obtaining the complete component parameters is as follows:

[0105] Loop through each feature group and determine the feature types of all retained contours in the current feature group. If there are both rectangular features and circular features, skip the current feature group.

[0106] Select the feature group whose shape parameters are all rectangular, calculate the length mean, width mean, spacing mean of adjacent contours and center coordinate mean of the fitting rectangles of all retained feature contours, and use them as the feature length, feature width, feature spacing and center coordinate of the feature group respectively; use the number of all retained feature contours in the feature group as the number of features of the feature group; divide the distribution characteristics of the feature group according to the angle of the center coordinate connection line of all retained feature contours in the feature group; calculate the maximum and minimum values ​​of the horizontal and vertical coordinates of the minimum circumscribed rectangle of the feature group according to the feature length, feature width, feature spacing, center coordinate, feature number and distribution characteristics of the feature group;

[0107] Select the feature group whose shape parameters are all circular, calculate the mean diameter of the fitted circle of all retained feature contours, the mean spacing between adjacent contours, and the mean center coordinate, respectively, as the characteristic diameter, characteristic spacing, and center coordinate of the feature contour; take the number of all retained feature contours in the feature group as the number of features of the feature group; divide the distribution characteristics of the feature group according to the angle of the center coordinate connection line of all retained feature contours in the feature group; calculate the maximum and minimum values ​​of the horizontal and vertical coordinates of the minimum circumscribed rectangular area of ​​the feature group according to the characteristic diameter, characteristic spacing, center coordinate, number of features, and distribution characteristics of the feature group;

[0108] According to the maximum and minimum values ​​of the horizontal and vertical coordinates of the minimum circumscribed rectangle of each feature group, the overall length and width of the complete component and the coordinates of the upper left corner of the complete component are determined; according to the offset of the center coordinates of each feature group relative to the coordinates of the upper left corner, the position offset of the feature group is obtained.

[0109] Based on the same inventive concept, a second aspect of an embodiment of the present invention provides a system for quickly acquiring component characteristic parameters, including:

[0110] A feature contour extraction module is configured to extract feature contours for each feature group in the component ROI region, wherein the feature group is a group of features with consistent shapes and uniform distribution in the component ROI region;

[0111] a fitting module configured to fit the feature profiles of each feature group to determine shape parameters of the feature profiles;

[0112] a component type determination module configured to count shape parameters of all the characteristic contours and determine the component type based on the statistical results;

[0113] The component parameter calculation module is configured to integrate the shape parameters of the feature profiles in each feature group based on the determined component type to obtain complete component feature parameters.

[0114] Furthermore, it also includes a user interaction module, an image automatic correction module and a preliminary screening module.

[0115] A user interaction module is configured to implement frame selection interaction between the component ROI area and the feature group;

[0116] The automatic image rotation module is configured to extract the contour of the component ROI area and perform multi-angle rotation; calculate the sum of the projection extreme values ​​of all contours in the horizontal and vertical directions after each rotation, and calculate the rotation angle when the sum of the projection extreme values ​​is the maximum as the angle estimate of the component ROI area; and perform rotation correction on the component ROI area using the estimated angle;

[0117] The primary screening module is configured to perform primary screening on the connected contours of the feature groups to remove interfering contours and obtain the feature contours.

[0118] Further, the process of fitting the feature contours of each feature group to determine the shape parameters of the feature contours includes the following steps:

[0119] Perform circular fitting and rectangular fitting on the feature contours respectively to obtain the circular index Rc and rectangular index Rr of the feature contours. Rc = α × E + β × Tc , Rr = α × R + β × Tr , where E represents the circularity of the feature contour, Tc represents the proportion of the number of interior points after circular fitting of the feature contour to the total number of contour points before fitting, R represents the rectangularity of the feature contour, Tr represents the proportion of the number of interior points after rectangular fitting of the feature contour to the total number of contour points before fitting. The interior points are the points among the total contour points before fitting that are less than a specified pixel away from the fitting boundary. α and β are weight coefficients;

[0120] If Rc < 0.5 and Rr < 0.5, then screen out the corresponding feature contour; otherwise, retain it.

[0121] If Rc > Rr, then determine that the feature contour is circular, and use the diameter and center obtained by circular fitting of the feature contour as the diameter and center of the contour respectively. If Rc < Rr, then determine that the feature contour is rectangular, and use the length, width and center obtained by rectangular fitting of the feature contour as the length, width and center of the contour respectively.

[0122] In a third aspect of the embodiments of the present invention, a machine-readable storage medium is provided. Instructions are stored on the machine-readable storage medium, and the instructions are used to cause a machine to execute the above-mentioned method for quickly obtaining element feature parameters.

[0123] In a fourth aspect of the embodiments of the present invention, an electronic device is provided. The electronic device includes: one or more processors; and a memory for storing one or more programs. When the one or more programs are executed by the one or more processors, the electronic device implements the method for quickly obtaining element feature parameters.

[0124] In summary, in the technical solution of the present invention, the operator only needs to select the approximate component ROI and feature group ROI to automatically obtain the component feature parameters. The operation is simple, the learning cost is low, and the requirements for the operator are low. The traditional image processing method is used to calculate the features of each feature group separately and integrate them according to certain rules. The processing speed is fast and the parameter results are accurate. The integration of conventional components and special-shaped components is designed separately. Among them, special-shaped components have no specific template form constraints and can be applied to components of various packaging forms. The method has a wide range of applications. Therefore, the technical solution proposed by the present invention has the advantages of simple operation, low personnel requirements, fast parameter acquisition speed, and a wide range of applications.

[0125] The preferred embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited thereto. Within the scope of the technical concept of the present invention, the technical solution of the present invention may be subjected to various simple modifications, including combining the various specific technical features in any suitable manner. To avoid unnecessary repetition, the present invention will not further describe various possible combinations. However, these simple modifications and combinations should also be regarded as disclosed in the present invention and fall within the scope of protection of the present invention.

Claims

1. A method for quickly acquiring component characteristic parameters, characterized in that: It includes the following steps: Extract the feature contours of each feature group in the component ROI area respectively, where the feature group is a group of features with the same shape and uniform distribution in the component ROI area; Fitting the characteristic contours of each characteristic group to determine the shape parameters of the characteristic contours includes the following process: performing circular fitting and rectangular fitting on the characteristic contours respectively to obtain the circular index Rc and the rectangular index Rr of the characteristic contours, Rc=α×E+β× Tc , Rr=α×R+β× Tr , where E represents the circularity of the characteristic contour, Tc represents the ratio of the number of inner points of the characteristic contour after circular fitting to the total number of contour points before fitting, R represents the rectangularity of the characteristic contour, Tr represents the ratio of the number of inner points of the characteristic contour after rectangular fitting to the total number of contour points before fitting, the inner point is the point in the total contour points before fitting that is less than the specified pixel from the fitting boundary, α and β are weight coefficients; according to the size of Rc and Rr, retain the characteristic contour that meets the preset requirements and determine the shape parameters of the characteristic contour; Statistically calculate the shape parameters of all the feature contours, and determine the component type according to the statistical results; Based on the determined component type, integrate the shape parameters of the feature contours in each feature group to obtain the complete component feature parameters.

2. The method according to claim 1, characterized in that The shape parameters of the feature contours that meet the preset requirements and are determined according to the sizes of Rc and Rr are specifically: If Rc < 0.5 and Rr < 0.5, then screen out the corresponding feature contours, otherwise retain them; If Rc > Rr, then determine that the feature contour is circular, and use the diameter and center obtained by fitting the feature contour into a circle as the diameter and center of the contour respectively. If Rc < Rr, then determine that the feature contour is rectangular, and use the length, width and center obtained by fitting the feature contour into a rectangle as the length, width and center of the contour respectively.

3. The method according to claim 1, wherein The circular fitting is performed by using the iterative weighted least squares circle fitting method; For the rectangular fitting, first use the Hough transform to obtain multiple straight-line point sets and the angles of the corresponding straight lines, then use the angle constraint for rectangular combination, then use straight-line fitting to fit the four sides of the rectangle and calculate the intersection points and angles, and finally integrate the four corner points and angles.

4. The method according to claim 1, wherein Statistically calculate the shape parameters of the retained feature contours in all the feature groups, and determine the component type according to the statistical results, specifically: When the number of the feature contours is unique: If the shape is rectangular, then determine that the component is a Chip component. If the shape is circular, then determine that the component is a BGA component; When the number of the feature contours is not unique: If both circular and rectangular shapes exist in the feature contour shapes, determine that the component is a special-shaped component; If the feature contour shapes are all circular and the fluctuation of the fitted circle diameter is within the threshold range and the distribution is in a grid pattern, determine that the component is a BGA component; If the feature contour shapes are all rectangular and are distributed in the NSEW directions and the fluctuations of the lengths and widths of the fitted rectangles in the same direction are within the threshold range, determine that the component is a multi-pin component; Otherwise, determine that the component is a special-shaped component.

5. The method according to claim 4, characterized in that When the component type is a special-shaped component, perform the integration according to the statistical results of the shape parameters of the retained feature contours in the feature group, and the process is as follows: Select the feature groups with all shape parameters being rectangular, calculate the mean length, mean width, mean spacing between adjacent contours and mean center coordinates of the fitted rectangles of all the retained feature contours respectively as the feature length, feature width, feature spacing and center coordinates of the feature group; use the number of all the retained feature contours in the feature group as the feature quantity of the feature group; divide the distribution characteristics of the feature group according to the connection angles of the center coordinates of all the retained feature contours in the feature group; calculate the maximum and minimum horizontal and vertical coordinates of the minimum bounding rectangle of the feature group according to the feature length, feature width, feature spacing, center coordinates, feature quantity and distribution characteristics of the feature group; Select the feature group whose shape parameters are all circular, calculate the mean diameter of the fitted circle of all retained feature contours, the mean spacing between adjacent contours, and the mean center coordinate, respectively, as the characteristic diameter, characteristic spacing, and center coordinate of the feature contour; take the number of all retained feature contours in the feature group as the number of features of the feature group; divide the distribution characteristics of the feature group according to the angle of the center coordinate connection line of all retained feature contours in the feature group; calculate the maximum and minimum values ​​of the horizontal and vertical coordinates of the minimum circumscribed rectangle of the feature group according to the characteristic diameter, characteristic spacing, center coordinate, number of features, and distribution characteristics of the feature group; According to the maximum and minimum values ​​of the horizontal and vertical coordinates of the minimum circumscribed rectangle of each feature group, the overall length and width of the complete component and the coordinates of the upper left corner of the complete component are determined; according to the offset of the center coordinates of each feature group relative to the coordinates of the upper left corner, the position offset of the feature group is obtained.

6. The method according to claim 4, characterized in that When the component type is a chip component, the integration is performed based on the statistical results of the shape parameters of the characteristic contours retained in the characteristic group. The process is as follows: the length and width of the fitting rectangle of the unique characteristic contour are used as the length and width of the complete component.

7. The method according to claim 4, characterized in that When the component type is a BGA component, the integration is performed according to the statistical results of the shape parameters of the feature profiles retained in the feature group, and the process is as follows: Taking the average of the circle fitting diameters of all feature contours retained in each feature group as the BGA component terminal diameter; The average of the distances between the circle fitting centers of two adjacent contours in the horizontal direction among all the characteristic contours retained in each of the characteristic groups is used as the distribution spacing of the BGA component terminals in the horizontal direction; The average of the distances between the circle fitting centers of two vertically adjacent contours of all the characteristic contours retained in each of the characteristic groups is used as the distribution spacing of the BGA component terminals in the vertical direction; Obtaining the maximum number of terminals of the BGA component in the horizontal direction by taking the ratio of the horizontal spacing between the circular fitting centers of the two farthest contours in the horizontal direction among all the characteristic contours retained in each of the characteristic groups to the distribution spacing of the BGA component terminals in the horizontal direction; Obtaining the maximum number of terminals of the BGA component in the vertical direction by taking the ratio of the vertical spacing between the circular fitting centers of the two most distant contours in the vertical direction among all the characteristic contours retained in each of the characteristic groups to the distribution spacing of the BGA component terminals in the vertical direction; Obtaining the overall size of the BGA component in the horizontal direction based on the maximum number of terminals of the BGA component in the horizontal direction, the distribution spacing of the BGA component terminals in the horizontal direction, and the diameter of the BGA component terminals; The overall size of the BGA component in the vertical direction is obtained by the maximum number of terminals of the BGA component in the vertical direction, the distribution spacing of the BGA component terminals in the vertical direction, and the diameter of the BGA component terminals.

8. The method according to claim 7, characterized in that The distribution grid of the BGA component is calculated based on the distribution spacing, maximum terminal number, overall size and terminal diameter of the BGA component in the horizontal and vertical directions respectively; and the BGA terminal missing status is determined based on whether the distribution grid contains the circle fitting center.

9. The method according to claim 4, characterized in that When the component type is a multi-pin component, the integration is performed based on the statistical results of the shape parameters of the feature profiles retained in the feature group, and the process is as follows: Calculate the average length, average width, average spacing between adjacent contours, and average center coordinates of the fitted rectangles of all feature contours retained in each feature group, and use them as the characteristic parameters of the pin length, pin width, pin spacing, and center coordinates of the pin group in the corresponding feature group. Use the number of fitted rectangles as the number of pins in the pin group. According to the relative position relationship of the center coordinates of the pin groups in each of the feature groups and the pin distribution direction, each group of pins is divided into four directions of NSEW; Calculate the maximum and minimum values ​​of the horizontal and vertical coordinates of the minimum circumscribed rectangle of each group of pins based on the pin length, pin width, pin spacing, center coordinates, pin quantity, and pin distribution direction of the pin group in the feature group; Determine the length, width and center coordinates of the complete component based on the maximum and minimum values ​​of the horizontal and vertical coordinates of the minimum circumscribed rectangular area of ​​each pin group in all the feature groups; The position offset of the pin group in each feature group is obtained based on the offset between the center coordinates of the pin group in each feature group and the center coordinates of the complete component.

10. The method according to any one of claims 1 to 9, characterized in that: The step of extracting feature contours from each feature group in the component ROI area comprises the following steps: The feature group is binarized using the OTSU method, and all connected contours are extracted using the connected domain contour extraction method; The extracted connected contours are preliminarily screened to remove interfering contours and obtain the characteristic contours.

11. The method according to claim 10, characterized in that The primary screening method is as follows: Remove the contours whose closed area of ​​the connected contours is smaller than the specified pixel or the contours whose closed area differs from the ROI image area of ​​the feature group by less than the specified pixel; Remove the connected contours whose number of contour points is less than a specified number; Removing contours whose rectangularity of the connected contours is less than a threshold; Removing the contours whose roundness of the connected contours is less than a threshold; The contours of the connected contours whose convexity is less than a threshold are removed.

12. The method according to claim 10, characterized in that The component ROI area and each feature group are manually framed or machine-selected.

13. The method according to claim 12, characterized in that After selecting the component ROI area, the component ROI area is rotated and turned to the right, specifically: Extracting the outline of the component ROI area and then performing multi-angle rotation; Counting the sum of the projection extremes of all contours in the horizontal and vertical directions after each rotation, and calculating the rotation angle when the sum of the projection extremes is the maximum as the angle estimation in the ROI area of ​​the component; The component ROI region is rotationally corrected using the estimated angle.

14. A system for quickly acquiring component characteristic parameters, characterized in that: include: A feature contour extraction module is configured to extract feature contours for each feature group in the component ROI region, wherein the feature group is a group of features with consistent shapes and uniform distribution in the component ROI region; The fitting module is configured to fit the feature profiles of each feature group to determine the shape parameters of the feature profiles, including the following process: performing circular fitting and rectangular fitting on the feature profiles to obtain the circular index Rc and rectangular index Rr of the feature profiles, Rc=α×E+β× Tc , Rr=α×R+β× Tr , where E represents the circularity of the characteristic contour, Tc represents the ratio of the number of inner points of the characteristic contour after circular fitting to the total number of contour points before fitting, R represents the rectangularity of the characteristic contour, Tr represents the ratio of the number of inner points of the characteristic contour after rectangular fitting to the total number of contour points before fitting, the inner point is the point in the total contour points before fitting that is less than the specified pixel from the fitting boundary, α and β are weight coefficients; according to the size of Rc and Rr, retain the characteristic contour that meets the preset requirements and determine the shape parameters of the characteristic contour; A component type determination module, configured to count the shape parameters of all the feature contours and determine the component type according to the statistical results; A component parameter calculation module, configured to integrate the shape parameters of the feature contours in each of the feature groups based on the determined component type to obtain complete component feature parameters.

15. The system according to claim 14, wherein: It further includes a user interaction module, configured to implement the box selection interaction of the component ROI region and the feature groups.

16. The system according to claim 14 or 15, characterized in that It further includes: An image automatic rotation module, configured to extract the contour of the component ROI region and perform multi-angle rotation; Count the sum of the projection extreme values of all the contours in the horizontal and vertical directions after each rotation, and take the rotation angle when the sum of the projection extreme values is the largest as the angle estimate in the component ROI region; rotate and correct the component ROI region with the estimated angle; A preliminary screening module, configured to preliminarily screen the connected contours of the feature groups to remove interfering contours and obtain the feature contours.

17. The system according to claim 16, wherein: The shape parameters of the feature contours determined by retaining the feature contours that meet the preset requirements according to the magnitudes of Rc and Rr are specifically: If Rc < 0.5 and Rr < 0.5, then screen out the corresponding feature contours, otherwise retain them; If Rc > Rr, then determine that the feature contour is circular, and take the diameter and center obtained by fitting the feature contour as a circle as the diameter and center of the contour respectively. If Rc < Rr, then determine that the feature contour is rectangular, and take the length, width and center obtained by fitting the feature contour as a rectangle as the length, width and center of the contour respectively.

18. A machine-readable storage medium, on which instructions are stored, and the instructions are used to cause a machine to execute the method for quickly obtaining component feature parameters according to any one of claims 1-13.

19. An electronic device, comprising: One or more processors; And a memory, configured to store one or more programs, and when the one or more programs are executed by the one or more processors, cause the electronic device to implement the method according to any one of claims 1-13.

Citation Information

Patent Citations

  • Component classification method for automatic demonstration of chip mounter

    CN116977721A