A PCB classification method, system and storage medium based on visual recognition
Through high-resolution industrial cameras, the PCB images are collected and the through hole characteristics is calculated, the recognition coefficient is established, and the reference value and standard deviation are combined, the problem of insufficient recognition accuracy of complex layout or high-density PCB in the prior art is solved, and more efficient and accurate through hole quality detection and classification is achieved.
Patent Information
- Application Number
- CN202411120718.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2044-08-15
AI Technical Summary
The existing PCB through-hole classification method based on visual recognition is insufficient in the identification accuracy and slow processing speed when dealing with complex layouts or high-density PCB, resulting in inaccurate classification or missed inspection, affecting product quality and production efficiency.
A high-resolution industrial camera is used to collect PCB images, and by calculating the number of through holes, the average perimeter and position deviation, the first and second recognition coefficients are established, and the reference value and standard deviation are combined to determine whether the through hole quality is qualified and classified.
It improves the accuracy and efficiency of PCB through-hole quality inspection, reduces the misjudgment rate, ensures the consistency and reliability of the product, and improves the reliability and overall quality of the production process.
Smart Images

Figure CN119068505B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of visual recognition, and specifically to a PCB classification method, system and storage medium based on visual recognition. Background Art
[0002] With the rapid development of computer vision technology and automated inspection systems, the PCB via classification method and system based on visual recognition have become an indispensable part of quality control in the electronics manufacturing industry. Effective PCB via detection and classification methods can not only improve the detection accuracy and efficiency, but also reduce human errors and enhance the automation level of the production line, and ensure the consistency and reliability of products. However, the existing methods and systems still have some limitations in practical applications, such as insufficient recognition accuracy, slow processing speed, etc. In addition, when dealing with PCBs with high density or complex layouts, it may lead to inaccurate classification or missed detection, affecting the overall quality and production efficiency of products, resulting in additional quality control costs and production delays.
[0003] In the Chinese invention application with the application publication number CN112579810A, a printed circuit board classification method, device, computer device and storage medium are disclosed. An image of a printed circuit board to be tested is obtained, and then a mathematical model of the printed circuit board to be tested is established through mathematical modeling. When a stock printed circuit board geometric mathematical model whose similarity to the geometric mathematical model of the printed circuit board to be tested meets a preset threshold is found through a similarity algorithm, it indicates that the physical circuit board corresponding to the stock printed circuit board geometric mathematical model is the printed circuit board to be tested. By obtaining the characteristic file information carrying classification information corresponding to the stock printed circuit board geometric mathematical model, the classification result can be obtained. Throughout the process, there is no need to add number markings and manual classification processing in the production materials of the printed circuit board manually, significantly improving the classification efficiency, and ensuring the accuracy of printed circuit board classification through image recognition technology, and can achieve printed circuit board classification efficiently and accurately.
[0004] In the above invention, the accuracy of printed circuit board classification is ensured through image recognition technology, so as to achieve efficient and accurate classification. At the same time, the mathematical modeling and similarity calculation of this method are relatively complex, requiring more computing resources and time when dealing with complex PCB designs, and lacking a detailed analysis of the specific characteristics of PCBs, making it difficult to identify subtle quality problems.
[0005] Therefore, the present invention provides a PCB classification method, system and storage medium based on visual recognition. Summary of the Invention
[0006] (1) Technical Problems to be Solved
[0007] In view of the deficiencies of the prior art, the present invention provides a PCB classification method, system and storage medium based on visual recognition. A high-resolution industrial camera is used to collect the PCB image to be inspected, and the number of vias, perimeter and position coordinates of the vias on the PCB are obtained; a first recognition coefficient F is established based on the number of vias and the average perimeter of the PCB to be detected, and m qualified PCB sample data are retrieved. A reference value F is established based on the number of vias and the average perimeter of the vias ref , by calculating the deviation ΔF between the first recognition coefficient F of the PCB to be inspected and the reference value F ref , a deviation range is defined according to the reference value and the standard deviation, and it is judged whether the first recognition coefficient is within the qualified range. When the first recognition coefficient is abnormal, a second recognition coefficient command is started; after receiving the second recognition method command, n via position data of the PCB to be inspected are retrieved, and the deviation D between the actual position and the designed standard position of each via is calculated
[0008] (2) Technical solution
[0009] To achieve the above objectives, the present invention is realized through the following technical solutions: A PCB classification method based on visual recognition includes the following steps:
[0010] Use a high-resolution industrial camera to collect the PCB image to be inspected, and obtain the number of vias n and perimeter P on the PCB to be inspected i and the position coordinates of the vias;
[0011] A first recognition coefficient F is established based on the number of vias and the average perimeter of the PCB to be detected, and m qualified PCB sample data are retrieved. A reference value F is established based on the number of vias and the average perimeter of the vias ref , by calculating the deviation ΔF between the first recognition coefficient F of the PCB to be inspected and the reference value F ref , a deviation qualified range is defined according to the reference value and the standard deviation, and it is judged whether the first recognition coefficient F is within the deviation range. When the first recognition coefficient is abnormal, a second recognition coefficient command is started;
[0012] After receiving the second recognition method command, n via position data of the PCB to be inspected are retrieved, and the deviation D between the actual position and the designed standard position of each via is calculated i , and the average value of these deviations is obtained to determine the average via position deviation D of the PCB to be inspected a, then correct the first recognition coefficient F to obtain the corrected second recognition coefficient F'.
[0013] Compare the second recognition coefficient F' with the qualified range of the deviation ΔF to determine whether the quality of the pcb through-hole to be inspected is qualified and classify it.
[0014] Furthermore, retrieve the perimeter P of each through-hole on the pcb to be detected i data, and calculate the average value to obtain the average perimeter Pt of the pcb through-hole to be inspected. The formula is as follows:
[0015]
[0016] where i represents the i-th through-hole on the pcb to be detected, i = 1, 2, 3,..., n, and n represents the total number of through-holes on the pcb to be detected.
[0017] Furthermore, establish the first recognition coefficient F according to the number n of through-holes on the pcb to be inspected and the data of the average perimeter Pt of the through-holes. The formula is as follows:
[0018] F = a1 * n + a2 * Pt
[0019] where a1 and a2 are the weight coefficients of the number of through-holes and the average perimeter of the through-holes respectively, a1 is 0.5, and a2 is 0.5.
[0020] Furthermore, retrieve the data of m qualified pcb through-holes from the historical database, calculate the number n of through-holes and the average perimeter Pt of the through-holes in the m qualified pcbs, and calculate the reference value F ref , the formula is as follows:
[0021] F j = a1 * n j + a2 * Pt j
[0022]
[0023] where j is the j-th qualified pcb, j = 1, 2, 3,..., m, n j is the number of through-holes of the j-th qualified pcb, Pt j is the average perimeter of the through-holes of the j-th qualified pcb. Calculate the deviation ΔF of the first recognition coefficient F. The formula is as follows:
[0024] △F = F - F ref
[0025] Calculate the standard deviation σF according to the reference value. The formula is as follows:
[0026]
[0027] Calculate the qualified range of the deviation ΔF of the first recognition coefficient F through the reference value and the standard deviation [(F ref -k*σF), (F ref +k*σF)], where k is an empirical coefficient, k = 2 or 3.
[0028] Furthermore, by comparing the calculated first recognition coefficient F with the deviation ΔF, the via quality of the pcb to be inspected can be judged. Specifically:
[0029] When F is within the qualified range of the deviation ΔF, it indicates that the via quality of the pcb to be inspected is qualified;
[0030] When F is greater than the qualified range of the deviation ΔF, it indicates that the via quality of the pcb to be inspected is unqualified;
[0031] When F is less than the qualified range of the deviation ΔF, it indicates that there is an abnormality in the via quality of the pcb to be inspected, there is a problem of incomplete detection, and a command to start the second recognition method is issued.
[0032] Furthermore, upon receiving the command of the second recognition method, retrieve the via data of the pcb to be inspected, and calculate the actual position (x i , y i ) of each via on the pcb to be inspected, and the deviation from the designed standard position (X i , Y i ). The calculation formula is as follows:
[0033]
[0034] where D i is the position deviation distance of the i-th via, and the designed standard position (X i , Y i ) is obtained according to the pcb via design specification. According to the position deviations D i of all vias on the pcb to be inspected, and calculate the average value of these deviations to determine the average via position deviation D a of the pcb to be inspected:
[0035]
[0036] The corresponding calculation formula for the average via position deviation D a of the pcb to be inspected is as above.
[0037] Furthermore, according to the average via position deviation D a of the pcb to be inspected, correct the first recognition coefficient F to obtain the second recognition coefficient F', and the calculation formula is as follows:
[0038] F' = b1*F + b2*Da
[0039] Among them, b1 and b2 are the first recognition coefficient F and the average via position deviation D of the pcb to be inspected respectively a as the weight coefficients, b1 is 0.5 and b2 is 0.5.
[0040] Furthermore, through the second recognition coefficient F', it is compared with the deviation ΔF to judge the quality of the vias of the pcb to be inspected and classify it. Specifically:
[0041] When F' is within the qualified range of the deviation ΔF, it indicates that the quality of the vias of the pcb to be inspected is qualified;
[0042] When F' is not within the qualified range of the deviation ΔF, it indicates that the quality of the vias of the pcb to be inspected is unqualified.
[0043] A pcb classification system based on visual recognition includes:
[0044] A data acquisition module that uses a high-resolution industrial camera to collect images of the pcb to be inspected, and obtains the number of vias, the perimeter, and the position coordinates of the vias on the pcb;
[0045] A first recognition module that establishes a first recognition coefficient F based on the number of vias and the average perimeter of the pcb to be detected, retrieves m qualified pcb sample data, and establishes a reference value F through the number of vias and the average via perimeter ref and, by calculating the deviation ΔF between the first recognition coefficient F of the pcb to be inspected and the reference value F ref defines the qualified range of the deviation according to the reference value and the standard deviation, and judges whether the first recognition coefficient F is within the deviation range. When the first recognition coefficient is abnormal, the second recognition coefficient command is activated;
[0046] A second recognition module that, after receiving the second recognition method command, retrieves the n via position data of the pcb to be inspected and calculates the deviation D between the actual position and the designed standard position of each via i and obtains the average value of these deviations to determine the average via position deviation D of the pcb to be inspected a and then corrects the first recognition coefficient F to obtain the corrected second recognition coefficient F';
[0047] A classification module that compares the second recognition coefficient F' with the qualified range of the deviation ΔF to judge whether the quality of the vias of the pcb to be inspected is qualified and classify it.
[0048] A storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0049] In the PCB classification system, the storage medium includes a non-volatile storage medium and an internal memory. The non-volatile storage medium is used to store key data for a long time, such as the operating system, detection program, reference values, sample data, deviation range, and historical images and model data, to ensure that the system has the necessary resources when starting up and executing critical tasks. The internal memory provides high-speed storage space for processing temporary data of the PCB to be inspected during operation, such as the number of vias, perimeter, position coordinates, as well as the recognition coefficients and corrected results generated during the calculation process, to ensure the efficiency of real-time calculation and judgment.
[0050] (III) Beneficial Effects
[0051] The present invention provides a PCB classification method based on visual recognition, having the following beneficial effects:
[0052] 1. Use a high-resolution industrial camera to collect images of the PCB to be inspected, obtain the number of vias, perimeter, and position coordinates of the vias on the PCB, so as to accurately identify and analyze the via features on the PCB, and improve the accuracy and efficiency of quality inspection.
[0053] 2. Establish a first recognition coefficient F based on the number of vias and the average perimeter of the PCB to be detected, retrieve m qualified PCB sample data, and establish a reference value F based on the number of vias and the average via perimeter ref , by calculating the deviation ΔF between the first recognition coefficient F of the PCB to be inspected and the reference value F ref , define the deviation qualified range according to the reference value and standard deviation, and judge whether the first recognition coefficient F is within the deviation range. When the first recognition coefficient is abnormal, start the second recognition coefficient command, improve the detection accuracy of the via quality of the PCB, ensure the efficient and reliable screening of unqualified products during the production process, and reduce potential quality problems and production costs.
[0054] 3. After receiving the second recognition method command, retrieve the position data of n vias of the PCB to be inspected, calculate the deviation D between the actual position and the designed standard position of each via i , and calculate the average value of these deviations to determine the average via position deviation D of the PCB to be inspected a , and then correct the first recognition coefficient F to obtain the corrected second recognition coefficient F', which can provide a more accurate evaluation when detecting abnormal situations, thereby effectively improving the comprehensive judgment ability of the via quality of the PCB, reducing the misjudgment rate, and ensuring the consistency and reliability of the product.
[0055] 4. By using the second recognition coefficient F', compare it with the qualified range of the deviation ΔF to determine whether the quality of the pcb through-hole to be inspected is qualified, classify it, effectively identify the pcb through-holes that do not meet the quality standards, thereby improving the reliability of the production process and the overall quality of the final product. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 is a schematic flow chart of a pcb classification method based on visual recognition according to the present invention;
[0057] Figure 2 is a schematic structural diagram of a pcb classification system based on visual recognition according to the present invention;
[0058] Figure 3 is a schematic diagram of the structure of a storage medium according to the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0059] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0060] Please refer to Figure 1 , the present invention provides a pcb classification method based on visual recognition, including the following steps:
[0061] Step 1. Use a high-resolution industrial camera to collect the pcb image to be inspected, and obtain the number of through-holes, the perimeter, and the position coordinates of the through-holes on the pcb.
[0062] The first step includes the following content:
[0063] Step 101. Use a high-resolution industrial camera to collect the pcb image to be inspected, use a mean filter to remove the noise in the image, convert the color image into a grayscale image, and use the Sobel edge detection technology to identify the edges of the through-holes on the pcb to be inspected.
[0064] The mean filter is a simple and effective image smoothing technology used to reduce the noise in the image. By calculating the average value of each pixel and its surrounding neighboring pixels, the original pixel value is replaced, thereby smoothing the image and reducing the detailed noise. During the processing, the new value of each pixel is the arithmetic average of the surrounding pixel values.
[0065] The Sobel edge detection technique is a commonly used image processing method for detecting edges in images. It identifies edges by calculating the gradient of the image grayscale values, especially changes in the horizontal and vertical directions. The Sobel algorithm uses two convolution kernels (Sobel operators), one for detecting horizontal edges and the other for detecting vertical edges. By applying these convolution kernels, the Sobel technique can highlight the edge features in the image and generate a gradient map, showing the areas with the most significant grayscale changes in the image.
[0066] Step 102: Use the OpenCV contour detection technique to obtain the boundary contours of each through-hole, get the number n of through-holes on the pcb to be inspected, and calculate the perimeter P of each through-hole contour i , and obtain the average perimeter Pt of the through-holes on the pcb to be inspected. The formula is as follows:
[0067]
[0068] where i represents the i-th through-hole on the pcb to be detected, i = 1, 2, 3,..., n, and n represents the total number of through-holes on the pcb to be detected.
[0069] The OpenCV contour detection technique is an algorithm for extracting the shape boundaries from binary images. Using the findContours function, OpenCV can identify the continuous boundary lines in the image and represent them as a list of contours. Each contour consists of a series of points, describing the edges of the objects in the image. Contour detection not only helps to identify and analyze the shapes and structures in the image but also can be used to calculate geometric features such as area and perimeter.
[0070] When using, combine the content in Steps 101 and 102:
[0071] Use a high-resolution industrial camera to collect the image of the pcb to be inspected, use a mean filter to remove the noise in the image, and convert the color image to a grayscale image. Use the Sobel edge detection technique to identify the edges of the through-holes on the pcb to be inspected, use the OpenCV contour detection technique to obtain the boundary contours of each through-hole, get the number n of through-holes on the pcb to be inspected, and calculate the perimeter P of each through-hole contour i , and obtain the average perimeter Pt of the through-holes on the pcb to be inspected to accurately identify and analyze the through-hole features on the pcb and improve the accuracy and efficiency of quality inspection.
[0072] Step Two: Establish the first recognition coefficient F based on the number of through-holes and the average perimeter of the pcb to be detected. Retrieve the data of m qualified pcb samples, and establish the reference value F based on the number of through-holes and the average perimeter of the through-holes ref , and by calculating the first recognition coefficient F of the pcb to be inspected and the reference value F refThe deviation ΔF is defined according to the reference value and the standard deviation to determine the deviation qualified range, and it is judged whether the first recognition coefficient F is within the deviation range. When the first recognition coefficient is abnormal, the second recognition coefficient command is activated.
[0073] The second step includes the following contents:
[0074] Step 201: Retrieve the number n of through-holes and the data of the average perimeter Pt of the through-holes of the pcb to be inspected. Based on the number n of through-holes and the average perimeter Pt of the through-holes of the pcb to be inspected, establish the first recognition coefficient F, and the formula is as follows:
[0075] F = a1 * n + a2 * Pt
[0076] Among them, a1 and a2 are the weight coefficients of the number of through-holes and the average perimeter of the through-holes respectively, a1 is 0.5, and a2 is 0.5.
[0077] Step 202: By retrieving the through-hole data of m qualified pcbs, calculate the number n of through-holes and the average perimeter Pt of the through-holes in the m qualified pcbs, and calculate the reference value F ref , and the formula is as follows:
[0078] F j = a1 * n j + a2 * Pt j
[0079]
[0080] Among them, j is the jth qualified pcb, j = 1, 2, 3,..., m, n j is the number of through-holes of the jth qualified pcb, Pt j is the average perimeter of the through-holes of the jth qualified pcb. Calculate the deviation ΔF of the first recognition coefficient F, and the formula is as follows:
[0081] △F = F - F ref
[0082] Calculate the standard deviation σF according to the reference value, and the formula is as follows:
[0083]
[0084] Calculate the qualified range [(F ref - k * σF), (F ref + k * σF)] of the deviation ΔF of the first recognition coefficient F through the reference value and the standard deviation. Among them, k is an empirical coefficient, and k = 2 or 3.
[0085] Step 203: By comparing the calculated first recognition coefficient F with the deviation ΔF, the through-hole quality situation of the pcb to be inspected can be judged. Specifically:
[0086] When F is within the qualified range of the deviation ΔF, it indicates that the quality of the through-holes of the pcb to be inspected is qualified;
[0087] When F is greater than the qualified range of the deviation ΔF, it indicates that the quality of the through-holes of the pcb to be inspected is unqualified;
[0088] When F is less than the qualified range of the deviation ΔF, it indicates that there are abnormalities in the quality of the through-holes of the pcb to be inspected, there is a problem of incomplete detection, and a command to start the second identification method is issued.
[0089] Reference value: It is a standard or reference value used to judge whether a product is qualified in quality inspection. It is usually the average value obtained by statistically analyzing the data of a large number of qualified products, and is used to reflect the standard performance or characteristics that the product should achieve under ideal conditions.
[0090] When in use, combine the content in steps 201 to 203:
[0091] Establish the first identification coefficient F through the number of through-holes to be detected on the pcb and the average perimeter, retrieve the data of m qualified pcb samples, and establish the reference value F through the number of through-holes and the average perimeter of the through-holes ref , by calculating the deviation ΔF between the first identification coefficient F of the pcb to be inspected and the reference value F ref , define the qualified range of the deviation according to the reference value and the standard deviation, and judge whether the first identification coefficient F is within the deviation range. When there is an abnormality in the first identification coefficient, start the second identification coefficient command to improve the detection accuracy of the quality of the pcb through-holes, ensure the efficient and reliable screening of unqualified products during the production process, and reduce potential quality problems and production costs.
[0092] Step 3: After receiving the command of the second identification method, retrieve the position data of n through-holes of the pcb to be inspected, and calculate the deviation D between the actual position of each through-hole and the designed standard position i , and find the average value of these deviations to determine the average through-hole position deviation D of the pcb to be inspected a , and then correct the first identification coefficient F to obtain the corrected second identification coefficient F'.
[0093] The said step 3 includes the following content:
[0094] Step 301: After receiving the command of the second identification method, retrieve the through-hole data of the pcb to be inspected, and calculate the actual position (x i , y i ) of each through-hole on the pcb to be inspected, and the deviation from the designed standard position (X i , Y i ), and the calculation formula is as follows:
[0095]
[0096] Among them, D i is the position deviation distance of the i-th through hole, and the designed standard position (X i , Y i ) is obtained according to the pcb through hole design specification. According to the position deviation D i of all through holes on the pcb to be inspected, and the average value of these deviations is calculated to determine the average through hole position deviation D a of the pcb to be inspected:
[0097]
[0098] The corresponding average through hole position deviation D a of the pcb to be inspected has the above calculation formula.
[0099] Step 302: According to the average through hole position deviation D a of the pcb to be inspected, the first recognition coefficient F is corrected to obtain the second recognition coefficient F', and the calculation formula is as follows:
[0100] F' = b1 * F + b2 * D a
[0101] Among them, b1 and b2 are the weight coefficients of the first recognition coefficient F and the average through hole position deviation D a of the pcb to be inspected, b1 is 0.5, and b2 is 0.5.
[0102] In use, combine the contents in steps 301 and 302:
[0103] After receiving the second recognition method command, retrieve the position data of n through holes of the pcb to be inspected, and calculate the deviation D i between the actual position and the designed standard position of each through hole, and calculate the average value of these deviations to determine the average through hole position deviation D a of the pcb to be inspected, and then correct the first recognition coefficient F to obtain the corrected second recognition coefficient F', which can provide a more accurate evaluation when detecting abnormal situations, thereby effectively improving the comprehensive judgment ability of the pcb through hole quality, reducing the misjudgment rate, and ensuring the consistency and reliability of the product.
[0104] Step Four: Compare the second recognition coefficient F' with the qualified range of the deviation ΔF to determine whether the quality of the through holes of the pcb to be inspected is qualified and classify it.
[0105] The said Step Four includes the following content:
[0106] Step 401: Compare the corrected second recognition coefficient F' with the deviation ΔF. The range of the deviation ΔF is [(Fref -k*σF),(F ref +k*σF)].
[0107] Step 402: Classify the quality of the through-holes of the pcb to be inspected into two categories: qualified and unqualified, specifically as follows:
[0108] When F' is within the qualified range of the deviation ΔF, it indicates that the quality of the through-holes of the pcb to be inspected is qualified;
[0109] When F' is not within the qualified range of the deviation ΔF, it indicates that the quality of the through-holes of the pcb to be inspected is unqualified.
[0110] In use, combine the content in Steps 401 and 402:
[0111] Through the second recognition coefficient F', compare it with the qualified range of the deviation ΔF to determine whether the quality of the through-holes of the pcb to be inspected is qualified, and classify it, so as to improve the reliability of the production process and the overall quality of the final product.
[0112] Please refer to Figure 2 , the present invention provides a pcb classification system based on visual recognition, including:
[0113] A data acquisition module that uses a high-resolution industrial camera to collect the image of the pcb to be inspected, and obtains the number of through-holes, the perimeter, and the position coordinates of the through-holes on the pcb;
[0114] A first recognition module that establishes a first recognition coefficient F based on the number of through-holes to be detected and the average perimeter of the pcb, retrieves the data of m qualified pcb samples, and establishes a reference value F through the number of through-holes and the average perimeter of the through-holes ref , by calculating the deviation ΔF between the first recognition coefficient F of the pcb to be inspected and the reference value F ref , define the qualified range of the deviation according to the reference value and the standard deviation, and determine whether the first recognition coefficient F is within the deviation range. When the first recognition coefficient is abnormal, start the second recognition coefficient command;
[0115] A second recognition module that, after receiving the second recognition method command, retrieves the position data of n through-holes of the pcb to be inspected, and calculates the deviation D between the actual position and the designed standard position of each through-hole i , and obtains the average value of these deviations to determine the average through-hole position deviation D of the pcb to be inspected a , and then correct the first recognition coefficient F to obtain the corrected second recognition coefficient F';
[0116] A classification module that, through the second recognition coefficient F', compares it with the qualified range of the deviation ΔF to determine whether the quality of the through-holes of the pcb to be inspected is qualified, and classifies it.
[0117] Please refer to Figure 3 , the present invention provides a storage medium, including:
[0118] In a PCB classification system, the storage medium includes two parts: a non-volatile storage medium and an internal memory. The non-volatile storage medium is used to store critical data for a long time, such as an operating system, a detection program, reference values, sample data, deviation ranges, and historical images and model data, to ensure that the system has the necessary resources when starting up and executing critical tasks. The internal memory provides a high-speed storage space for processing temporary data of the PCB to be inspected during operation, such as the number of vias, perimeter, position coordinates, as well as the recognition coefficients and corrected results generated during the calculation process, to ensure the efficiency of real-time calculation and judgment.
[0119] The above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution.
[0120] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0121] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or substitutions, which should all be covered within the protection scope of the present application.
Claims
1. A method based on visual recognition PCB A classification method, characterized in that: The steps include: Use high-resolution industrial cameras to inspect PCB Image acquisition to obtain PCB The number of through holes n and the perimeter and the position coordinates of the through holes; Through the test PCB The number of through holes and the average perimeter establish the first identification coefficient F , retrieve m A qualified PCB Sample data, establishing a benchmark by number of vias and average via perimeter , to be tested by calculating PCB The first recognition coefficient F With reference value Deviation Δ F , define the qualified range of the first recognition coefficient according to the reference value and standard deviation, and judge the first recognition coefficient F Whether the first identification coefficient is within the qualified range, when the first identification coefficient is abnormal, the second identification mode command is started; After receiving the second identification method command, call the PCB of n The through hole position data is calculated and the deviation between the actual position of each through hole and the designed standard position is calculated. , and find the average of these deviations to determine the PCB Average through-hole position deviation , and then correct the first identification coefficient F , and obtain the modified second recognition coefficient ; Through the second identification coefficient , compare it with the qualified range of the first identification coefficient to determine the PCB Whether the quality of the through-holes is qualified and classified.
2. A method based on visual recognition according to claim 1 PCB A classification method, characterized in that: Retrieve pending test PCB The perimeter of each through hole The data to be tested are calculated and the average value is obtained. PCB Average circumference of through hole Pt , the formula is as follows: ,in, i Indicates pending detection PCB On i Through holes, i =1, 2, 3, ..., n,n Indicates pending detection PCB The total number of through holes on the 3. A method based on visual recognition according to claim 2 PCB A classification method, characterized in that: According to the test PCB Number of through holes n , Average circumference of through hole Pt Data, establish the first recognition coefficient F , the formula is as follows: ,in, and are the weight coefficients of the number of through holes and the average perimeter of through holes, is 0.5, is 0.
5.
4. A method based on visual recognition according to claim 3 PCB A classification method, characterized in that: By calling m A qualified PCB Through hole data, calculation m Qualified PCB Number of through holes in n and the average perimeter of the through-hole Pt , and calculate the benchmark value , the formula is as follows: , ,in, j For the j A qualified PCB , j =1, 2, 3, ..., m , For the j Qualified PCB The number of through holes, For the j Qualified PCB Average perimeter of through-holes, calculation of first recognition coefficient F Deviation Δ F , the formula is as follows: , calculate the standard deviation based on the benchmark value , the formula is as follows: , calculate the first recognition coefficient by the reference value and standard deviation F Eligible range ,in, k is the empirical coefficient, k =2 or 3.
5. A method based on visual recognition according to claim 4 PCB A classification method, characterized in that: The first identification coefficient F Compare with the qualified range of the first identification coefficient to determine the PCB The through-hole quality is as follows: when F When the first identification coefficient is within the qualified range, it means that it is to be tested. PCB The through hole quality is qualified; when F When it is greater than the qualified range of the first identification coefficient, it means that it is to be inspected. PCB The through hole quality is unqualified; when F When it is less than the qualified range of the first identification coefficient, it means that it is to be inspected. PCB There are abnormalities in the through-hole quality and incomplete detection, so a command to start the second identification mode is issued.
6. A method based on visual recognition according to claim 5 PCB A classification method, characterized in that: Receive the second identification method command and call the PCB Through hole position coordinate data, calculated to be tested PCB The actual position of each through hole on the The calculation formula of the deviation is as follows: ,in, For the i The position deviation distance of the through hole is the standard position of the design is based on PCB Obtained from through hole design specifications, based on the test PCB Position deviation of all through holes , and find the average of these deviations to determine the PCB Average through-hole position deviation : , the corresponding to be tested PCB Average through-hole position deviation The calculation formula is as above.
7. A method based on visual recognition according to claim 6 PCB A classification method, characterized in that: According to the test PCB Average through-hole position deviation , correct the first identification coefficient F , and obtain the second recognition coefficient , the calculation formula is as follows: ,in and The first recognition coefficient F and to be tested PCB Average through-hole position deviation The weight coefficient of is 0.5, is 0.
5.
8. A method based on visual recognition according to claim 7 PCB A classification method, characterized in that: By comparing the second identification coefficient with the qualified range of the first identification coefficient, the PCB The quality of the through-holes is classified into: when If it is within the qualified range, it means it is to be inspected. PCB The through hole quality is qualified; when If it is not within the qualified range, it means it is pending inspection. PCB The through hole quality is unacceptable.
9. A method based on visual recognition PCB A classification system for implementing the method according to any one of claims 1 to 8, characterized in that: include: Data acquisition module, using high-resolution industrial cameras for inspection PCB Image acquisition, acquisition PCB The number, perimeter and position coordinates of the through holes on the surface; The first recognition module, through the detection PCB The number of through holes and the average perimeter establish the first identification coefficient F , retrieve m A qualified PCB Sample data, establishing a benchmark by number of vias and average via perimeter , to be tested by calculating PCB The first recognition coefficient F With reference value Deviation Δ F , define the qualified range according to the reference value and standard deviation, and judge the first recognition coefficient F Whether the first identification coefficient is within the qualified range, when the first identification coefficient is abnormal, the second identification mode command is started; The second identification module, after receiving the second identification method command, calls the PCB of n The through-hole position data are collected and the deviation between the actual position of each through-hole and the design standard position is calculated. The average value of these deviations is then calculated to determine the position of the through-hole to be inspected. PCB Average through-hole position deviation , and then correct the first identification coefficient F , and obtain the modified second recognition coefficient ; Classification module, through the second recognition coefficient , compare it with the qualified range of the first identification coefficient to determine the PCB Whether the quality of the through-holes is qualified and classified.
10. A storage medium, characterized in that: The storage medium stores computer-executable instructions. When the instructions are executed by a computer, the computer executes the steps of the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Printed circuit board classification method and device, computer equipment and storage medium
CN112579810A
Detection method for blind holes on printed circuit board
CN106501706A
PCB apparent defect automatic detection system and method based on image
CN107389701A