A machine vision-guided vacuum printed PCB board precise feeding method and system
By calculating and screening the credibility of feature points in real PCB board images, the problem of SIFT algorithm incorrectly identifying feature points due to small scratches or stains is solved, and the accuracy of PCB board positioning and the efficiency of vacuum printed PCB board precision feeding device is improved.
Patent Information
- Application Number
- CN202510149293.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-11
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-02-11
AI Technical Summary
In the prior art, since there may be fine scratches or stains in real PCB boards, the SIFT algorithm recognizes incorrect feature points, affecting the accuracy of PCB board positioning.
By calculating the reliability of feature points in the real PCB board image and filtering them, feature points with high trust are selected as target feature points, and used to match the feature points of the PCB board image to be located to complete positioning and feeding.
The efficiency and accuracy of matching the real PCB board image with the feature points of the PCB board to be located is significantly improved, the error matching situation is reduced, and the accuracy of PCB board positioning and the efficiency of the vacuum printed PCB board precision feeding device are improved.
Smart Images

Figure CN119625335B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and more specifically, to a method and system for accurately feeding vacuum printed PCB boards guided by machine vision. Background Art
[0002] Precise feeding of vacuum printed PCB boards refers to the process of accurately feeding various required components onto PCB boards using vacuum printing technology during the production and manufacturing of PCB boards. In order to ensure that various components can be installed on the PCB boards smoothly and accurately, the machine vision system is required to accurately judge the position and shape of the PCB boards and other information, thereby achieving high-precision positioning to ensure that the PCB boards will not deviate from the target position during the feeding process, thereby improving the accuracy of feeding.
[0003] In the related technology, for example, the Chinese patent application document with publication number CN106373161A discloses a PCB board positioning method based on SIFT feature points. The patent document uses the SIFT algorithm to identify the feature points in the PCB board to be positioned and the real PCB board image, and matches the feature points. This method can improve the positioning accuracy of the PCB board to a certain extent, and further improve the efficiency of the vacuum printed PCB board precision feeding device.
[0004] After using the SIFT algorithm to identify the feature points of the real PCB board image, they are directly matched with the feature points of the PCB board to be located. However, since there may be some small scratches or stains in the real PCB board, the SIFT algorithm may identify incorrect feature points. If the feature points of the real PCB board image are not screened, it will not only increase the difficulty of subsequent feature point matching, but may also cause errors in the matching of feature points, affecting the accuracy of PCB board positioning. Summary of the invention
[0005] The present invention provides a machine vision-guided vacuum printed PCB board precise feeding method and system, aiming to solve the problem in the related art that the SIFT algorithm may identify wrong feature points due to some tiny scratches or stains in the real PCB board, thus affecting the accuracy of PCB board positioning.
[0006] In a first aspect, the present invention provides a method for accurate feeding of vacuum printed PCB boards guided by machine vision, comprising: obtaining feature points of a PCB board image to be positioned and feature points of a real PCB board image; calculating the credibility of each feature point of the real PCB board image, screening out target feature points according to the size of the credibility, matching the target feature points with the feature points of the PCB board image to be positioned, so as to complete the positioning of the real PCB board image and feed the material; wherein calculating the credibility of the feature points comprises: clustering the feature points of the real PCB board image to obtain a plurality of clusters; calculating the credibility of each feature point, and using the similarity between any feature point in the same cluster and its neighboring feature points to correct the credibility of the feature point to obtain the credibility of each feature point, wherein the similarity is negatively correlated with the Euclidean distance between the two feature points, and for the feature points Trust The calculation formula is: ; In the formula, Represented as feature points The number of pixels in the local area, Represented as feature points Pixels in local area The fitting error in the surface fitting process, Represented as feature points The variance of the fitting error of all pixels in the local area, It is an exponential function with the natural constant e as the base. Its effect is that it can screen the feature point set identified by the SIFT algorithm by analyzing the grayscale change characteristics of the real PCB board image, which can significantly improve the efficiency and accuracy of the subsequent matching between the real PCB board image and the required PCB board feature points to be located.
[0007] Furthermore, the target feature points are screened out according to the size of the trust, including: screening out K feature points with the highest trust from the feature points of the real PCB board image as the target feature points, wherein the number of K is greater than or equal to the number of feature points of the PCB board image to be located. The effect is that the feature points with higher trust can be screened out to ensure that these feature points are more representative and have better robustness. In the PCB board image, the feature points with higher trust are usually the most significant and stable areas in the image, which reduces the influence of mismatching or erroneous feature points during positioning, matching and tracking.
[0008] Furthermore, the target feature points are screened out according to the degree of confidence, including: from the feature points of the real PCB board image, feature points whose degree of confidence is greater than a preset threshold are screened out as target feature points.
[0009] Furthermore, the calculation method of the credibility of each feature point includes: ; In the formula, Representing feature points credibility, Representing feature points The number of feature points in the cluster. Representing feature points The characteristic vector of Representing feature points Except for the feature points in the cluster Foreign Feature points The characteristic vector of Representing feature points With feature points The effect is that the similarity between the feature points around the feature point can be used to correct the trustworthiness and improve the accuracy of the feature point credibility calculation.
[0010] Furthermore, clustering the feature points of the real PCB board image includes: clustering the feature points of the real PCB board image using a DBSCAN clustering algorithm. The effect is that DBSCAN has good performance in clustering noise and complex shapes, and by clustering the feature points of components in the image, component identification and positioning can be assisted.
[0011] Further, obtain feature points Pixels in local area The fitting error in the surface fitting process includes: using the least squares method to fit the feature points Surface fitting is performed on the pixels within the local range, and the pixels are The difference between the actual gray value and the value on the surface fitting is taken as the pixel point The effect is that the fitting error can be used to characterize the consistency of grayscale changes in the local range of the feature point, so as to calculate the trust of the feature point and identify the feature points contaminated by small scratches or stains.
[0012] Furthermore, obtaining feature points of the image of the PCB board to be positioned includes: obtaining a layout image of the PCB board to be positioned, and using a SIFT algorithm to identify feature points in the layout image as feature points of the image of the PCB board to be positioned.
[0013] Furthermore, obtaining feature points of a real PCB board image includes: using a camera to capture the real PCB board image, and using a SIFT algorithm to identify feature points in the real PCB board image as feature points of the real PCB board image.
[0014] In a second aspect of the present invention, a machine vision-guided vacuum printed PCB board precision feeding system is provided, comprising a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program to implement any of the machine vision-guided vacuum printed PCB board precision feeding methods described above.
[0015] Beneficial effects: By screening the feature points of the real PCB board image, the feature points can be guaranteed to be more accurate and stable, which can reduce the mismatching situation, thereby improving the accuracy of image matching; some redundant or unimportant feature points can also be removed, thereby reducing the workload of subsequent matching and calculation. In summary, the use of this method can improve the accuracy and efficiency of PCB board positioning, and further improve the efficiency of the vacuum printed PCB board precision feeding device. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The following detailed description is read with reference to the accompanying drawings, which illustrate several embodiments of the present invention in an exemplary and non-limiting manner, and in which like or corresponding reference numerals represent like or corresponding parts, wherein:
[0017] Figure 1 is a flowchart schematically illustrating acquisition of image feature points according to an embodiment of the present invention;
[0018] Figure 2 FIG. 4 is a flowchart schematically illustrating a method of filtering feature points according to an embodiment of the present invention. DETAILED DESCRIPTION
[0019] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0020] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0021] like Figure 1 As shown, S101: acquiring feature points of the PCB board image to be positioned and feature points of the real PCB board image.
[0022] In one embodiment, a layout image of the PCB board to be positioned is first obtained, wherein the positions of various key positions (positioning holes, Mark points, etc.) are indicated in the layout image for subsequent positioning. Then, the SIFT algorithm is used to identify the feature points in the layout image as the feature points of the PCB board image to be positioned. A real PCB board image, i.e., the image of the PCB board to be fed, is captured using a shooting device, wherein the shooting device is a high-resolution camera, and the SIFT algorithm is used to identify the feature points in the real PCB board image to obtain the feature points of the real PCB board image for subsequent positioning, and finally the captured image is grayed.
[0023] It needs to be explained that the SIFT algorithm (Scale Invariant Feature Transform) is a description used in the field of image processing. This description is scale invariant and can detect key points in the image. It is a local feature descriptor.
[0024] S102: Screening feature points of the real PCB board image.
[0025] In one embodiment, in the existing PCB board positioning method, after using SIFT to identify the feature points of the real PCB board image, the feature points are directly matched with the layout diagram of the PCB board to be positioned to locate the PCB board. However, in actual situations, there may be some small scratches or stains in the real PCB board image, which causes the SIFT algorithm to identify wrong feature points, that is, the small scratches or stains may be identified as feature points, which will increase the difficulty of subsequent feature point matching, and may affect the feature point matching and identification, thereby affecting the positioning accuracy of the PCB board, and ultimately affecting the accuracy of the vacuum printed PCB board precision feeding device. Therefore, this step will analyze the grayscale change characteristics of the real PCB board image, calculate the credibility of the feature points in the real PCB board image identified by the SIFT algorithm, thereby screening the feature points and improving the efficiency and accuracy of subsequent feature point matching.
[0026] like Figure 2 As shown, S1021: calculate the trustworthiness of each feature point in the real PCB board image.
[0027] In one embodiment, because the grayscale changes of key positions (positioning holes, mark points, etc.) in the PCB board image are relatively consistent, and small scratches or stains will cause the grayscale changes to become chaotic, the consistency of the grayscale changes in the local range of the feature point can be used to calculate the trust of the feature point. The more consistent the grayscale changes, the higher the trust.
[0028] It should be noted that the consistency of grayscale changes within the local range of the feature point can be directly expressed by the fitting error when the pixel points in the local range are used for surface fitting. The more consistent the grayscale changes, the more regular the changes in the grayscale values, which is more conducive to surface fitting. The smaller the fitting error, the higher the consistency of the grayscale changes. For example, for any pixel point in the local range of the feature point, the fitting error of the pixel point in the surface fitting process can be the difference between the actual grayscale value of the pixel point and the value taken on the surface fitting as the fitting error of the pixel point. The larger the difference, the larger the fitting error. Among them, a three-dimensional rectangular coordinate system is established with the position of the pixel point in the local range of the feature point as the x and y axes, and the grayscale value of the pixel point as the z axis, and then the least squares method is used to locate the feature point. Surface fitting is performed on the pixels within the local range, and the pixels are The difference between the actual gray value and the value on the surface fitting is taken as the pixel point The fitting error.
[0029] In one embodiment, the expression of the fitting error is: ; In the formula, represents the fitting error of pixel point P, Represented as the actual gray value of the pixel P, That is, the value of pixel point P in the surface fitting result, then It is the difference between the actual gray value of pixel point P and the value obtained on the surface fitting.
[0030] In addition, although the changes in the key positions of the PCB board image are relatively consistent, the grayscale change span is large due to the sharp edges, which may cause the fitting error to become larger. However, it is precisely because of the sharp edges that the algorithm grayscale change span is large, but the fitting errors of each feature point during surface fitting are similar. Therefore, the similarity of the pixel fitting errors during surface fitting can be used to correct the consistency of the grayscale changes in the local range of the feature points to obtain the accurate trust of each feature point.
[0031] In one embodiment, the accuracy of the feature points is calculated using the following formula: ; In the formula, Represents the feature points in the real PCB board image The degree of trust, Indicates the first feature points, Represented as feature points The number of pixels in the local area, Represented as feature points Pixels in local area The fitting error in the surface fitting process, Represented as feature points The variance of the fitting error of all pixels in the local area, is an exponential function with the natural constant e as base, Representing feature points The fitting error set when all pixels in the local range are fitted for surface fitting. So far, the trustworthiness of each feature point in the real PCB board image can be obtained.
[0032] In one embodiment, because the layout of PCB board components is relatively compact, and there may be multiple identical or similar components in a small range, that is, there are similar feature points around a feature point. Therefore, in order to further improve the accuracy of feature point credibility calculation, the similarity between the feature point and the surrounding feature points can be used to correct the credibility. The higher the similarity, the higher the credibility.
[0033] S1022: Correct the credibility of each feature point in the real PCB board image to obtain the credibility of each feature point.
[0034] In one embodiment, the feature points of the real PCB board image are clustered to obtain multiple clusters. The feature points with similar scales and close distances can be classified into one category by a clustering method, wherein the DBSCAN clustering algorithm can be used for clustering. Then, the trust of each feature point is calculated, and the trust of the feature point is corrected by using the similarity between any feature point in the same cluster and its neighboring feature points to obtain the credibility of each feature point, wherein the similarity is negatively correlated with the Euclidean distance between two feature points, and the higher the similarity, the higher the credibility.
[0035] It should be noted that when using the DBSCAN clustering algorithm to cluster the feature points of a real PCB board image, the clustering radius is defined as: ; In the formula, are any two feature points in the feature points of the real PCB board image, represents the clustering radius of these two feature points, That is, the feature point With feature points The Euclidean distance between , Represents the feature points , Feature Points Then, the DBSCAN clustering algorithm is used to cluster the feature point set T of the real PCB board image. In this embodiment, the clustering radius threshold is , The empirical value of is 10. In other embodiments, The experience value of can be 9 or 8, which can be changed according to the specific implementation situation.
[0036] In one embodiment, the trustworthiness of each feature point in the real PCB board image is corrected, and the correction formula is: , where Representing feature points credibility, Represents the feature points in the real PCB board image The degree of trust, Representing feature points The number of feature points in the cluster. Representing feature points The characteristic vector of Representing feature points Except for the feature points in the cluster Foreign Feature points The characteristic vector of Representing feature points With feature points The Euclidean distance of is an exponential function with the natural constant e as the base. So far, the credibility of all feature points of the real PCB board image can be corrected by the above method, further improving the accuracy of feature point credibility calculation.
[0037] S1023: Screening is performed using the credibility of each feature point in the feature points of the real PCB board image.
[0038] In one embodiment, target feature points are screened out according to the size of the credibility, and the target feature points are matched with the feature points of the PCB board image to be positioned to complete the positioning of the real PCB board image. After the positioning is completed, the feeding device is used to feed the material. It should be noted that the real PCB board image usually contains some noise or irregular areas, which may produce some weaker and less stable feature points. By screening the feature points with lower credibility, the noise can be effectively removed and those stable and representative feature points can be retained. In this way, the interference of erroneous or irrelevant feature points will be reduced in the subsequent matching process.
[0039] In one embodiment, the target feature points are selected according to the size of the trust, including: selecting K feature points with the highest trust from the feature points of the real PCB board image as the target feature points, wherein the number of K is greater than or equal to the number of feature points of the PCB board image to be located. For example, the number of feature points of the PCB board image to be located is 10, then 11 or 14 feature points with the highest trust are selected from the feature points of the real PCB board image. Alternatively, feature points with a trust greater than a preset threshold are selected from the feature points of the real PCB board image as the target feature points, wherein the empirical value of the preset threshold is 0.8. In other embodiments, the empirical value of the preset threshold can be 0.75 or 0.88, etc., which can be adjusted according to the specific implementation situation. It should be noted that if the number of feature points with a trust greater than the preset threshold is less than the number of feature points of the PCB board image to be located, the remaining feature points are sorted according to the size of the trust, and the corresponding feature points are continuously selected from large to small until the number of selected feature points is greater than or equal to the number of feature points of the PCB board image to be located.
[0040] At this point, by analyzing the grayscale change characteristics of the real PCB board image, the feature point set identified by the SIFT algorithm can be screened, which can significantly improve the efficiency and accuracy of the subsequent matching of the real PCB board image with the required PCB board feature points to be positioned. And by screening the feature points of the real PCB board image, it can ensure that the feature points are more accurate and stable, and the situation of mismatching can be reduced, thereby improving the accuracy of image matching; some redundant or unimportant feature points can also be removed, thereby reducing the workload of subsequent matching and calculation. In summary, the use of this method can improve the accuracy and efficiency of PCB board positioning, and further improve the efficiency of the vacuum printed PCB board precision feeding device.
[0041] The present invention also provides a machine vision-guided vacuum printed PCB board precision feeding system, the system comprising a processor and a memory, the memory storing computer program instructions, and when the computer program instructions are executed by the processor, a machine vision-guided vacuum printed PCB board precision feeding method according to the first aspect of the present invention is implemented.
[0042] The system also includes other components familiar to those skilled in the art, such as a communication bus and a communication interface, whose configuration and functions are known in the art and thus will not be described in detail here.
[0043] In the present invention, the aforementioned memory may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, apparatus or device. For example, a computer-readable storage medium may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc., or any other medium that can be used to store the required information and can be accessed by an application, a module, or both. Any such computer storage medium may be part of a device or accessible or connectable to a device. Any application or module described in the present invention may be implemented using computer-readable / executable instructions that may be stored or otherwise maintained by such a computer-readable medium.
[0044] In the description of this specification, "plurality" or "several" means at least two, such as two, three or more, etc., unless otherwise clearly and specifically defined.
[0045] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0046] The above-mentioned embodiments only express several implementation methods of the present invention, and the description is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent application. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.
Claims
1. A machine vision-guided vacuum printed PCB board precision feeding method, characterized in that: include: Obtain the feature points of the PCB board image to be located and the feature points of the real PCB board image; Calculate the credibility of each feature point of the real PCB board image, select the target feature point according to the credibility, match the target feature point with the feature point of the PCB board image to be positioned, so as to complete the positioning of the real PCB board image and feed the material; The calculation of the credibility of the feature points includes: Clustering the feature points of the real PCB board image to obtain multiple clusters; The trust of each feature point is calculated, and the trust of the feature point is corrected by using the similarity between any feature point and its nearby feature points in the same cluster to obtain the credibility of each feature point, where the similarity is negatively correlated with the Euclidean distance between the two feature points. Trust The calculation formula is: ; In the formula, Represented as feature points The number of pixels in the local area, Represented as feature points Pixels in local area The fitting error in the surface fitting process, Represented as feature points The variance of the fitting error of all pixels in the local area, is an exponential function with the natural constant e as the base; the calculation method of the credibility of the feature point includes: ; In the formula, Representing feature points credibility, Representing feature points The degree of trust, Representing feature points The number of feature points in the cluster. Representing feature points The characteristic vector of Representing feature points Except for the feature points in the cluster Foreign Feature points The characteristic vector of Representing feature points With feature points The Euclidean distance of It is an exponential function with the natural constant e as its base.
2. The machine vision-guided vacuum printed PCB board precise feeding method according to claim 1 is characterized in that: The target feature points are screened out according to the degree of trust, including: The K feature points with the highest trustworthiness are selected from the feature points of the real PCB board image as the target feature points, where the number of K is greater than or equal to the number of feature points of the PCB board image to be located.
3. The machine vision-guided vacuum printed PCB board precise feeding method according to claim 1, characterized in that: The target feature points are screened out according to the degree of trust, including: Feature points with a confidence level greater than a preset threshold are selected from the feature points of the real PCB board image as target feature points.
4. The machine vision-guided vacuum printed PCB board accurate feeding method according to claim 1, characterized in that: Clustering the feature points of the real PCB board image includes: The DBSCAN clustering algorithm is used to cluster the feature points of real PCB board images.
5. The machine vision-guided vacuum printed PCB board precise feeding method according to claim 1, characterized in that: Get feature points Pixels in local area The fitting errors in the surface fitting process include: Using the least squares method to find the feature points Surface fitting is performed on the pixels within the local range, and the pixels are The difference between the actual gray value and the value on the surface fitting is taken as the pixel point The fitting error.
6. The machine vision-guided vacuum printed PCB board accurate feeding method according to claim 1, characterized in that: Get the feature points of the PCB image to be located, including: The layout image of the PCB board to be positioned is obtained, and the feature points in the layout image are identified using the SIFT algorithm as the feature points of the PCB board image to be positioned.
7. The machine vision-guided vacuum printed PCB board accurate feeding method according to claim 1, characterized in that: Get the feature points of the real PCB board image, including: A camera is used to capture real PCB board images, and the SIFT algorithm is used to identify feature points in the real PCB board images as feature points of the real PCB board images.
8. A machine vision-guided vacuum printed PCB board precision feeding system, comprising a processor and a memory, characterized in that: The memory stores a computer program, and the processor executes the computer program to implement the machine vision-guided vacuum printed PCB board precision feeding method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
SIFT (scale-invariant feature transform) feature point-based positioning method
CN106373161A
Package authenticity monitoring method, system, medium and equipment
CN117474559A
Power grid false injection defense method based on mirror image adversarial network
CN118041659A