A circuit board defect detection method based on edge computing
The edge computing system identifies PCB board defects and sends alarms, which solves the problem of low efficiency of existing detection methods, realizes intelligent and automatic detection of PCB boards, and improves detection efficiency and product quality.
Patent Information
- Application Number
- CN202211522158.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-30
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2042-11-30
AI Technical Summary
Existing PCB surface defect detection methods are inefficient, especially in precision fields such as aerospace and aerospace, which have high quality and safety requirements. Manual detection has a high error rate and mechanical detection efficiency is low.
A circuit board defect detection method based on edge computing is used to collect image information of design and actual production PCB boards through cameras, and the edge computing system is used to identify defects and send alarms to improve detection efficiency.
It realizes intelligent, automatic identification and alarm of PCB board defects, significantly improves detection efficiency and ensures high-quality and safe product output.
Smart Images

Figure CN116805298B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image recognition, and in particular relates to a circuit board defect detection method based on edge computing. Background Art
[0002] With the rapid development of information technology, the integration of electronic products is getting higher and higher, and the impact on people's lives is also increasing. The development of new technologies such as big data and artificial intelligence further requires electronic products to have high quality and high reliability. PCB (printed circuit board) integrated circuits, especially large-scale and ultra-large-scale integrated circuits, are becoming more and more important in the information industry. In the modern industrial production process, both civilian and military products are inseparable from PCB, especially in the field of precision, and the requirements for PCB products are higher.
[0003] In the modern industrial batch PCB production process, the PCB process is quite complicated, and each process may cause defects on the PCB surface, which may affect the performance and safety of subsequent products. Therefore, in the PCB production process, it is necessary to detect the defects on the PCB surface in real time and accurately, especially in precision fields such as aerospace, which have very high requirements for the quality and safety of PCB products. Therefore, accurate detection of PCB surface defects is particularly important, which requires that the defects on the PCB surface must be detected quickly and accurately during the production process to meet the high quality requirements of PCB products in the precision aerospace field.
[0004] At present, there are two methods for detecting PCB surface defects: manual visual inspection and mechanical testing. Among them, manual inspection is the most traditional method. It directly observes the panel with the naked eye and has a low cost. However, since manual inspection is limited by subjective factors such as workers' experience, emotions, and physiology, the error rate of inspection is usually high. Therefore, the accuracy and efficiency of manual inspection are relatively low. In mechanical inspection, contact inspection is usually used. During the inspection process, the position of the object needs to be adjusted to achieve the best inspection effect, so the efficiency is relatively low. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a circuit board defect detection method based on edge computing, which is used to solve the problem of low detection efficiency of existing PCB surface defect detection methods. The present invention can intelligently and automatically identify the defect information of the actually produced PCB board through the edge computing system based on the image information of the designed PCB board and the actually produced PCB board, and automatically alarm when defects occur, effectively improving the efficiency of PCB board defect detection.
[0006] An embodiment of the present invention provides a circuit board defect detection method based on edge computing, including:
[0007] A first image is obtained by taking a photo of a target PCB board drawn by PCB board design software through a camera;
[0008] When the target PCB board is produced, the target PCB board actually produced is photographed by the same camera to obtain a second image;
[0009] The gaps in the first image and the second image are identified by an edge computing system connected to the camera to obtain a first point matrix corresponding to the first image and a second point matrix corresponding to the second image; wherein different element values are used in the first point matrix and the second point matrix to represent whether the target PCB board position corresponding to the element value is a gap;
[0010] The edge computing system detects whether the target PCB board has defects according to the first point matrix and the second point matrix;
[0011] If the target PCB board has defects, the edge computing system sends an alarm message to the designated terminal.
[0012] In an optional embodiment, the step of taking a picture of a target PCB board drawn by PCB board design software by a camera to obtain a first image includes:
[0013] Locating designated points of a target PCB board drawn by the PCB board design software by means of the positioning points pre-set in the camera viewfinder, and then photographing the target PCB board drawn by the PCB board design software to obtain a first image; wherein the number of the positioning points is at least 2, and the number of the designated points is the same as the number of the positioning points;
[0014] The method of taking a picture of the target PCB board actually produced by the same camera to obtain a second image includes:
[0015] The designated point of the target PCB board actually produced is located by the positioning point pre-set in the camera viewfinder, and then the target PCB board actually produced is photographed to obtain a second image, so that the position and size of the target PCB board photographed in the first image and the second image are the same and the zoom ratio of the shooting is the same.
[0016] In an optional embodiment, the edge computing system connected to the camera identifies the gaps in the first image and the second image to obtain a first point matrix corresponding to the first image and a second point matrix corresponding to the second image, including:
[0017] Identifying gaps in the first image and the second image by an edge computing system connected to the camera;
[0018] The edge computing system generates a first point matrix and a second point matrix according to a first formula;
[0019] Among them, the first formula is:
[0020]
[0021] In the first formula, G(i, j) represents the element value of the i-th row and j-th column in the generated point matrix; T(i, j)∈K represents the pixel point of the i-th row and j-th column in the first / second image that is identified as a gap; It indicates that it is recognized that the pixel point in the i-th row and the j-th column in the first / second image does not belong to a gap.
[0022] In an optional embodiment, the edge computing system detects whether the target PCB board has defects according to the first point matrix and the second point matrix, including:
[0023] The edge computing system compares the first point matrix and the second point matrix to generate a notch point matrix of the target PCB board to locate the notch position;
[0024] The edge computing system detects whether the target PCB board has defects based on the notch point matrix of the target PCB board.
[0025] In an optional embodiment, the edge computing system sends alarm information to a designated terminal, including:
[0026] The edge computing system performs an overlap check on the gap point matrix of the target PCB board and the target PCB board design drawing to determine whether there is a line passing through the gap;
[0027] If there is a gap in the line, the edge computing system sends an alarm message to the designated terminal.
[0028] In an optional embodiment, the edge computing system compares the first point matrix with the second point matrix to generate a notch point matrix of the target PCB board to locate the notch position, including:
[0029] The edge computing system calculates the notch point matrix of the target PCB board based on the second formula according to the first point matrix and the second point matrix;
[0030] Wherein, the second formula is:
[0031] E(i, j) = u[G q (i, j)-G 0 (i,j)+1]×[G q (i, j)-G 0(i, j)]
[0032] In the second formula, E(i, j) represents the element value of the i-th row and j-th column in the gap point matrix of the target PCB board; G q (i, j) represents the first point matrix G q The value of the element in the i-th row and j-th column in G; 0 (i, j) represents the second point matrix G 0 The element value of the i-th row and j-th column in ; u[] represents a positive normalization function. If the value in the brackets is a positive number, the function value is 1. If the value in the brackets is 0 or a negative number, the function value is 0.
[0033] The edge computing system detects whether the target PCB board has defects according to the notch point matrix of the target PCB board, including:
[0034] The edge computing system calculates a damage determination value of the target PCB board based on a third formula according to the notch point matrix of the target PCB board;
[0035] The edge computing system determines whether the damage determination value of the target PCB board is equal to 1;
[0036] If the damage determination value of the target PCB board is equal to 1, it is determined that the target PCB board has a damage defect;
[0037] Wherein, the third formula is:
[0038]
[0039] In the third formula, P represents the damage judgment value of the target PCB board. If P=1, it means that the target PCB board actually produced has a damage defect. If P=0, it means that the target PCB board actually produced does not have a damage defect. m represents the total number of pixels in any row of the image captured by the camera, and n represents the total number of pixels in any column of the image captured by the camera.
[0040] In an optional embodiment, the edge computing system performs an overlap check on the gap point matrix of the target PCB board and the target PCB board design drawing to determine whether there is a line passing through the gap, including:
[0041] The edge computing system calculates the detection processing control value of the target PCB board according to the fourth formula;
[0042] The edge computing system determines whether the currently calculated detection processing control value is equal to 2;
[0043] If the currently calculated detection processing control value is equal to 2, it is determined that there is a circuit passing through a gap on the target PCB board;
[0044] Wherein, the fourth formula is:
[0045]
[0046] In the fourth formula, B represents the detection processing control value of the target PCB board; w represents the total number of stacked boards in the target PCB board drawn by the PCB board design software; C a (i, j) represents the circuit passing inspection value of the position corresponding to the pixel point of the i-th row and j-th column of the first image in the a-th layer of the target PCB board drawn by the PCB board design software. If it is checked that there is a circuit passing through the position corresponding to the pixel point of the i-th row and j-th column of the first image in the a-th layer of the target PCB board drawn by the PCB board design software, then C a (i, j) = 1, otherwise C a (i, j) = 0); It means that the value of a is substituted from 1 to w into the brackets. If there is one or more values of w that make the equation in the brackets valid, the overall function value is 1, otherwise the overall function value is 0; It means that the value of i ranges from 1 to n, and the value of j ranges from 1 to m are substituted into the brackets. If there are one or more pairs of i and j values that make the equation in the brackets valid, the overall function value is 1, otherwise the overall function value is 0;
[0047] In an optional embodiment, after the edge computing system determines whether the currently calculated detection processing control value is equal to 2, it also includes:
[0048] If the currently calculated detection processing control value is not equal to 2, then determining whether the currently calculated detection processing control value is equal to 1;
[0049] If the currently calculated detection processing control value is equal to 1, it is determined that there is a gap on the target PCB board but no line passes through the gap, and a reminder message is sent to the designated terminal.
[0050] The present invention provides a circuit board defect detection method based on edge computing. First, the camera collects the image information of the designed PCB board and the image information of the actually produced PCB board. Then, the edge computing system identifies the gap in the PCB board image information, and obtains the first point matrix and the second point matrix in the image information of the designed PCB board and the actually produced PCB board respectively. Finally, according to the first point matrix and the second point matrix, the defect information of the produced PCB board is detected and the defect alarm can be performed in time. The present invention can intelligently and automatically identify the defect information of the actually produced PCB board through the edge computing system, and automatically alarm when there is a defect, which effectively improves the efficiency of PCB board defect detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0052] Figure 1 A flow chart of a circuit board defect detection method based on edge computing provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0053] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0054] It should be clear that the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0055] Figure 1 A flow chart of a circuit board defect detection method based on edge computing provided by an embodiment of the present invention. Figure 1 The method comprises the following steps S101-S105:
[0056] S101: photographing a target PCB board drawn by PCB board design software through a camera to obtain a first image.
[0057] In this embodiment, the designated points of the target PCB board drawn by the PCB board design software can be located by the positioning points pre-set in the camera viewfinder, and then the target PCB board drawn by the PCB board design software is photographed to obtain the first image; wherein, the positioning points are at least 2, and the number of the designated points is the same as the number of the positioning points. For example, two positioning points, the upper central point and the left central point, can be pre-set in the camera viewfinder, and then the upper edge midpoint and the left edge midpoint of each target PCB board drawn by the PCB board design software are used as designated points, and the positioning points are aligned with the designated points during shooting, and then the positioned target PCB board is aligned to take pictures. By pre-setting the positioning points to position the camera shooting position, the positions of the front and back photos of the same PCB board can be relatively fixed, which is convenient for subsequent image comparison and recognition.
[0058] S102: When the target PCB board is produced, the target PCB board actually produced is photographed by the same camera to obtain a second image.
[0059] In this embodiment, the designated point of the target PCB board actually produced can be located by the positioning point pre-set in the camera viewfinder, and then the target PCB board actually produced can be photographed to obtain the second image, so that the position and size of the target PCB board photographed in the first image and the second image are the same and the zoom ratio of the shooting is the same.
[0060] S103: Identify gaps in the first image and the second image through an edge computing system connected to the camera to obtain a first point matrix corresponding to the first image and a second point matrix corresponding to the second image.
[0061] Wherein, different element values are used in the first point matrix and the second point matrix to represent whether the target PCB board position corresponding to the element value is a gap.
[0062] S104: The edge computing system detects whether the target PCB board has defects based on the first point matrix and the second point matrix, and if so, executes step S105.
[0063] S105: The edge computing system sends an alarm message to a designated terminal.
[0064] As an optional embodiment, before step S101, the following steps S201-S204 may be included:
[0065] S201: Acquire no less than a predetermined number of images of PCB boards with defects; the predetermined number of images of PCB boards with defects at least include images of PCB boards with gaps;
[0066] S202: Marking the defect category corresponding to each defect in the defective PCB board image to obtain a set of marked PCB board images;
[0067] S203: using part of the images in the PCB image set as a sample image set, and using the remaining images in the PCB image set as a test image set;
[0068] S204: training a pre-built convolutional neural network model using the sample image set and the test image set to obtain a PCB board defect recognition model;
[0069] In this embodiment, in the step S103, the step of identifying the gaps in the first image and the second image may include: identifying the gaps in the first image and the second image by using the PCB board defect recognition model.
[0070] In this embodiment, a pre-constructed convolutional neural network model is trained by pre-acquired a large number of defective PCB board images to obtain a PCB board defect recognition model. Then, in step S103, the gaps in the first image and the second image can be identified according to this PCB board defect recognition model, thereby effectively improving the accuracy of gap recognition.
[0071] The beneficial effects of the above technical solution are as follows: a circuit board defect detection method based on edge computing provided by an embodiment of the present invention first collects the image information of the designed PCB board and the image information of the actually produced PCB board through a camera, and then identifies the gaps in the image information of the PCB board through an edge computing system, and obtains the first point matrix and the second point matrix in the image information of the designed PCB board and the image information of the actually produced PCB board, and finally detects the defect information of the produced PCB board according to the first point matrix and the second point matrix, and can timely make a defect alarm. The present invention can intelligently and automatically identify the defect information of the actually produced PCB board through the edge computing system, and automatically alarm when defects exist, effectively improving the efficiency of PCB board defect detection.
[0072] As an optional embodiment, the step S103 may include the following steps S301-S302:
[0073] S301: identifying gaps in the first image and the second image through an edge computing system connected to the camera;
[0074] S302: The edge computing system generates a first point matrix and a second point matrix according to a first formula;
[0075] Among them, the first formula is:
[0076]
[0077] In the first formula, G(i, j) represents the element value of the i-th row and j-th column in the generated point matrix; T(i, j)∈K represents the pixel point of the i-th row and j-th column in the first / second image that is identified as a gap; Indicates that the pixel at the i-th row and j-th column in the first / second image is not a gap. If the first formula inputs the PCB board image in the software (i.e., the first image), the output point matrix is the first point matrix (i.e., the mounting hole point matrix G 0 ), if the above formula input is the PCB board image during production (i.e., the second image), then the output point matrix is the second point matrix (i.e., the gap point matrix G q ).
[0078] The beneficial effects of the above technical solution are: using the first formula (1) to detect the captured image to generate a point matrix, and then matrixing the data, firstly, using the matrix to facilitate positioning, and secondly, the matrix form facilitates point-to-point calculation, thereby improving the efficiency of the implementation of the present invention.
[0079] As an optional embodiment, the step S104 may include the following steps S401-S402:
[0080] S401: The edge computing system compares the first point matrix and the second point matrix to generate a notch point matrix of the target PCB board to locate the notch position;
[0081] S402: The edge computing system detects whether the target PCB board has defects according to the notch point matrix of the target PCB board.
[0082] The beneficial effect of the above technical solution is: according to the mounting hole point matrix G of the first image 0 and the gap point matrix G of the second image g , determine whether the PCB board corresponding to the second image has additional notches in addition to the mounting holes and locate the positions of the notches, so as to facilitate determining whether the PCB board corresponding to the second image has defects based on the notch information, which has the advantages of convenient implementation and accurate judgment.
[0083] As an optional embodiment, the step S105 may include the following steps S501-S502:
[0084] S501: The edge computing system performs an overlap check on the gap point matrix of the target PCB board and the target PCB board design drawing to determine whether there is a line passing through the gap; if yes, execute step S502;
[0085] S502: The edge computing system sends an alarm message to a designated terminal.
[0086] The beneficial effect of the above technical solution is: the gap point matrix of the target PCB board is overlapped with the PCB board drawn by the software to check whether there is a line passing through the gap. If there is a line passing through the gap, it means that the produced PCB board has a line gap defect. Once these PCB boards are powered on, they will cause great damage to the PCB boards and even cause great damage to the equipment using the PCB boards. Therefore, timely alarm processing is required to facilitate timely response and disposal measures.
[0087] As an optional embodiment, the step S401 may include: the edge computing system calculates the notch point matrix of the target PCB board based on the second formula according to the first point matrix and the second point matrix;
[0088] Wherein, the second formula is:
[0089] E(i, j) = u[G q (i, j)-G 0 (i,j)+1]×[G q (i, j)-G 0 (i, j)] (2)
[0090] In the second formula, E(i, j) represents the element value of the i-th row and j-th column in the gap point matrix of the target PCB board; G q (i, j) represents the first point matrix G q The value of the element in the i-th row and j-th column in G; 0 (i, j) represents the second point matrix G 0 The element value of the i-th row and j-th column in ; u[] represents a positive normalization function. If the value in the brackets is a positive number, the function value is 1. If the value in the brackets is 0 or a negative number, the function value is 0.
[0091] Preferably, the step S402 may include the following steps S601-S603:
[0092] S601: The edge computing system calculates a damage determination value of the target PCB board based on a third formula according to the notch point matrix of the target PCB board;
[0093] Wherein, the third formula is:
[0094]
[0095] In the third formula, P represents the damage judgment value of the target PCB board. If P=1, it means that the target PCB board actually produced has a damage defect. If P=0, it means that the target PCB board actually produced does not have a damage defect. i=1, 2, ..., n; j=1, 2, ..., m; m represents the total number of pixels in any row of the image captured by the camera, and n represents the total number of pixels in any column of the image captured by the camera.
[0096] S602: The edge computing system determines whether the damage determination value of the target PCB board is equal to 1; if yes, execute S603;
[0097] S603: Determine whether the target PCB board has a damage defect;
[0098] In this embodiment, if P=1, it means that the target PCB board to be produced is damaged, and if P=0, it means that the target PCB board to be produced is not damaged.
[0099] The beneficial effect of the above technical solution is: using the second formula (2) and the third formula (3) to judge whether the produced PCB board is damaged according to the first point matrix (i.e., the mounting hole point matrix) and the second point matrix (i.e., the notch point matrix), and generate a notch point matrix, so as to digitally locate the notch position, thereby ensuring the positioning accuracy and facilitating the use of the matrix to locate the notch point for troubleshooting.
[0100] As an optional embodiment, the step S501 may include the following steps S701-S703:
[0101] S701: The edge computing system calculates the detection processing control value of the target PCB board according to the fourth formula;
[0102] Wherein, the fourth formula is:
[0103]
[0104] In the fourth formula, B represents the detection processing control value of the target PCB board; w represents the total number of stacked boards in the target PCB board drawn by the PCB board design software; C a (i, j) represents the circuit passing inspection value of the position corresponding to the pixel point of the i-th row and j-th column of the first image in the a-th layer of the target PCB board drawn by the PCB board design software. If it is checked that there is a circuit passing through the position corresponding to the pixel point of the i-th row and j-th column of the first image in the a-th layer of the target PCB board drawn by the PCB board design software, then C a (i, j) = 1, otherwise C a (i, j) = 0); It means that the value of a is substituted from 1 to w into the brackets. If there is one or more values of w that make the equation in the brackets valid, the overall function value is 1, otherwise the overall function value is 0; It means that the value of i ranges from 1 to n, and the value of j ranges from 1 to m are substituted into the brackets. If there exists one or more pairs of i and j values that make the equation in the brackets valid, the overall function value is 1, otherwise the overall function value is 0.
[0105] S702: The edge computing system determines whether the currently calculated detection processing control value is equal to 2; if so, execute S703;
[0106] S703: Determine whether there is a circuit passing through a gap on the target PCB;
[0107] Preferably, if the judgment result of step S702 is no, that is, when it is judged that the currently calculated detection processing control value is not equal to 2, the following steps S704-S705 are continued to be executed:
[0108] S704: Determine whether the currently calculated detection processing control value is equal to 1, if yes, execute S705, otherwise execute S706;
[0109] S705: Determine that there is a gap on the target PCB board but no line passes through the gap, and send a reminder message to the designated terminal;
[0110] S706: Determine that the target PCB board is normal, and do not send reminder information and alarm information to the designated terminal.
[0111] The beneficial effect of the above technical solution is: using the fourth formula (4) to check the overlap between the gap point matrix and the PCB board drawn by the software, control whether to perform an alarm or reminder process, and then perform different degrees of alarms or reminders according to different situations to prevent small problems from delaying progress.
[0112] In summary, the embodiment of the present invention uses the first formula (1) and the second formula (2) to detect the captured image and generate a point matrix, and then matrixes the data. First, the matrix is used to facilitate positioning, and second, the matrix form is convenient for point-to-point calculation, thereby improving system efficiency. Then, the third formula (3) is used to determine whether the produced PCB board is damaged according to the first point matrix and the second point matrix, and a gap point matrix is generated, thereby digitally locating the gap position, ensuring the positioning accuracy while facilitating the use of the matrix to locate the gap point for troubleshooting. Finally, the fourth formula (4) is used to control whether to perform an alarm or reminder process according to the result of the overlap check between the gap point matrix and the PCB board drawn by the software, and then different degrees of alarms or reminders are performed according to different situations to prevent small problems from delaying progress.
[0113] It can be seen from the contents of the above embodiments that the present invention can perform intelligent identification through the edge computing system, take photos and detect the produced PCB boards, and issue an alarm when a short circuit or damage occurs to the wire; wherein, since the circuit board will be reserved with installation holes when it is designed, in order to prevent the produced installation holes from being identified as damaged, when the software draws the PCB board, the PCB board image in the software is first photographed and detected, and a mounting hole point matrix is generated, and then the PCB is photographed and identified during PCB production to generate a gap point matrix, and the gap point matrix is compared with the mounting hole point matrix for consistency, if not, the gap point matrix is obtained and the gap position is located, and at the same time, the gap point matrix is overlapped with the PCB board drawn by the software to check whether there is a line passing through the gap, if there is a line passing through the gap, an alarm is processed, and if there is no line passing through the gap, a reminder is processed, and the reminder processing includes reminding the staff that there is a gap in the current circuit board but it does not affect the use, and maintenance processing is required when necessary. The present invention can more intelligently identify whether unqualified PCB boards appear, monitor each produced board in real time through the powerful computing power of the edge computing system, and intelligently judge the production quality of the PCB boards, thereby effectively improving the efficiency of PCB board defect detection and ensuring the quality of the PCB boards.
[0114] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 An apparatus for the method specified in one or more blocks.
[0115] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 The method specified in one or more boxes.
[0116] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps of a method specified in one or more boxes.
[0117] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these changes and variations. The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A circuit board defect detection method based on edge computing, characterized in that: include: A first image is obtained by taking a photo of a target PCB board drawn by PCB board design software through a camera; When the target PCB board is produced, the target PCB board actually produced is photographed by the same camera to obtain a second image; The gaps in the first image and the second image are identified by an edge computing system connected to the camera to obtain a first point matrix corresponding to the first image and a second point matrix corresponding to the second image; wherein different element values are used in the first point matrix and the second point matrix to represent whether the target PCB board position corresponding to the element value is a gap; The edge computing system detects whether the target PCB board has defects according to the first point matrix and the second point matrix; If the target PCB board has defects, the edge computing system sends an alarm message to the designated terminal; The edge computing system detects whether the target PCB board has defects according to the first point matrix and the second point matrix, including: The edge computing system calculates the notch point matrix of the target PCB board based on the second formula according to the first point matrix and the second point matrix; Wherein, the second formula is: In the second formula, Indicates the target PCB board’s gap point matrix Line The element value of the column; Represents the first point matrix Middle Line The element value of the column; Represents the second point matrix Middle Line The element value of the column; Represents a positive normalization function. If the value in the brackets is a positive number, the function value is 1. If the value in the brackets is 0 or a negative number, the function value is 0. The edge computing system calculates a damage determination value of the target PCB board based on a third formula according to the notch point matrix of the target PCB board; The edge computing system determines whether the damage determination value of the target PCB board is equal to 1; If the damage determination value of the target PCB board is equal to 1, it is determined that the target PCB board has a damage defect; Wherein, the third formula is: In the third formula, Indicates the damage judgment value of the target PCB board. If It means that the target PCB board actually produced has damage defects. This means that the target PCB board actually produced does not have any damage defects; ; ; represents the total number of pixels in any row of the image captured by the camera, Indicates the total number of pixels in any column of the image captured by the camera.
2. The circuit board defect detection method based on edge computing according to claim 1, characterized in that: The method of taking a picture of the target PCB board drawn by the PCB board design software by a camera to obtain a first image includes: Locating designated points of a target PCB board drawn by the PCB board design software by means of the positioning points pre-set in the camera viewfinder, and then photographing the target PCB board drawn by the PCB board design software to obtain a first image; wherein the number of the positioning points is at least 2, and the number of the designated points is the same as the number of the positioning points; The method of taking a picture of the target PCB board actually produced by the same camera to obtain a second image includes: The designated point of the target PCB board actually produced is located by the positioning point pre-set in the camera viewfinder, and then the target PCB board actually produced is photographed to obtain a second image, so that the position and size of the target PCB board photographed in the first image and the second image are the same and the zoom ratio of the shooting is the same.
3. The circuit board defect detection method based on edge computing according to claim 2, characterized in that: The edge computing system connected to the camera identifies the gaps in the first image and the second image to obtain a first point matrix corresponding to the first image and a second point matrix corresponding to the second image, including: Identifying gaps in the first image and the second image by an edge computing system connected to the camera; The edge computing system generates a first point matrix and a second point matrix according to a first formula; Among them, the first formula is: In the first formula, Indicates the generated point matrix Line The element value of the column; Indicates that the first / second image is identified Line The pixels in the column belong to the gap; Indicates that the first / second image is identified Line The pixels in the column do not belong to the gap.
4. The circuit board defect detection method based on edge computing according to claim 1, characterized in that: The edge computing system sends alarm information to the designated terminal, including: The edge computing system performs an overlap check on the gap point matrix of the target PCB board and the target PCB board design drawing to determine whether there is a line passing through the gap; If there is a gap in the line, the edge computing system sends an alarm message to the designated terminal.
5. The circuit board defect detection method based on edge computing according to claim 1, characterized in that: The edge computing system performs an overlap check on the gap point matrix of the target PCB board and the target PCB board design drawing to determine whether there is a line passing through the gap, including: The edge computing system calculates the detection processing control value of the target PCB board according to the fourth formula; The edge computing system determines whether the currently calculated detection processing control value is equal to 2; If the currently calculated detection processing control value is equal to 2, it is determined that there is a circuit passing through a gap on the target PCB board; Wherein, the fourth formula is: In the fourth formula, Indicates the detection processing control value of the target PCB board; Indicates the total number of stacked layers in the target PCB board drawn by the PCB board design software; Indicates the first The first image in the layer Line The circuit corresponding to the position of the column pixel point is checked. If the circuit corresponding to the position of the target PCB board drawn by the PCB board design software is checked, The first image in the layer Line If there is a line passing through the corresponding position of the column pixel ,on the contrary ; Indicates that The value ranges from 1 to Substitute into the brackets, if there is one or more If the value makes the equation in the brackets true, the overall function value is 1, otherwise the overall function value is 0; Indicates that The value ranges from 1 to , The value ranges from 1 to Substitute into the brackets, if there are one or more pairs of If the value makes the equation in the brackets true, the overall function value is 1, otherwise the overall function value is 0.
6. The circuit board defect detection method based on edge computing according to claim 5, characterized in that: After the edge computing system determines whether the currently calculated detection processing control value is equal to 2, it also includes: If the currently calculated detection processing control value is not equal to 2, then determining whether the currently calculated detection processing control value is equal to 1; If the currently calculated detection processing control value is equal to 1, it is determined that there is a gap on the target PCB board but no line passes through the gap, and a reminder message is sent to the designated terminal.
