Component defect detection method, device and equipment and storage medium
By acquiring multi-angle images and relative position relationships, selecting target images that meet preset conditions for component defect detection, solving the problem of low detection accuracy in the prior art and achieving higher detection accuracy.
Patent Information
- Application Number
- CN202410300490.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-15
- Publication Date
- 2025-04-18
AI Technical Summary
When detecting components in non-center location areas, existing component defect detection methods are affected by viewing angle deviation and image deformation, resulting in low detection accuracy.
By acquiring multiple images taken from multiple angles and their relative positional relationships on the circuit board, the target image of the components to be tested is determined, so that their display information meets the preset conditions, and defect detection is performed.
The accuracy of component defect detection is improved, and the low detection accuracy is avoided due to problems such as regional image deformation, device occlusion, and insufficient brightness.
Smart Images

Figure CN119845970A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of component detection technology, and in particular, to a component defect detection method, device, equipment and storage medium. Background Art
[0002] The circuit board is one of the key components of electronic equipment. The correct installation and welding of components on the circuit board is the key to maintaining the normal operation of electronic equipment. With the development of science and technology, the integration of circuit boards is getting higher and higher. Traditional manual inspection can no longer meet the accuracy and timeliness of circuit board inspection.
[0003] In the related art, component defect detection can be performed by automatic optical detection methods. Usually, a circuit board image is obtained through a fixed camera device for analysis and processing. For a specific area of the circuit board image, for example, when the camera shoots vertically downward, the components located in the center area can be accurately identified and defect detected based on the good viewing angle. However, for non-center positions of the circuit board image, such as components in the corner area, the viewing angle of the shot will cause certain deformations in the corner area of the circuit board image, so that when the automatic optical detection method is used to perform device identification and defect detection on the area image of the non-center area, the detection result is not ideal, resulting in low accuracy of the final component defect detection result. Summary of the invention
[0004] The embodiments of the present application provide a component defect detection method, device, equipment and storage medium, which can solve the problem of low component defect detection accuracy and improve the accuracy of component defect detection.
[0005] In a first aspect, an embodiment of the present application provides a component defect detection method, comprising:
[0006] Acquire multiple images of the circuit board taken from multiple angles and the relative position relationship of each circuit board in each image, the relative position relationship including the position relationship and / or the shooting angle relationship, and there are components to be tested on the circuit board;
[0007] Obtaining first position information of the component to be tested on the circuit board;
[0008] Determine, from the plurality of images, a target image corresponding to the component to be tested according to the first position information and the relative position relationship, wherein display information of the component to be tested in the target image meets a preset condition;
[0009] Perform defect detection processing on the target image to obtain the defect detection results of the components to be tested.
[0010] As mentioned above, by selecting an image with a corresponding relative position relationship as the target image for each component to be tested, the problem of low detection accuracy caused by regional image deformation during component defect detection can be avoided. For each component to be tested, an image whose display information meets preset conditions is selected as the target image for corresponding defect detection. The accuracy of defect detection of each component to be tested can be improved, thereby improving the accuracy of component defect detection of the circuit board as a whole.
[0011] In one embodiment, after obtaining the first position information of the component to be tested on the circuit board, the method includes:
[0012] Obtaining test parameters corresponding to the component to be tested;
[0013] According to the first position information, the relative position relationship and the test parameters, a target image corresponding to the component to be tested is determined from multiple images, and the display information of the component to be tested in the target image meets the preset conditions, and the display information includes: at least one of display content, display ratio and display clarity.
[0014] In one embodiment, after determining the target image corresponding to each component to be tested from the multiple images, the method further includes:
[0015] Determine the test area image corresponding to the component to be tested from the target image according to the positioning algorithm;
[0016] Perform defect detection on the target image, including:
[0017] Perform defect detection processing on the test area image.
[0018] As described above, defect detection processing is performed on the test area image corresponding to each component to be tested respectively, which can improve the pertinence of component defect detection, thereby improving the defect detection accuracy of each component to be tested, and further improving the accuracy of component defect detection of the entire circuit board.
[0019] In one embodiment, defect detection processing is performed on the target image to obtain defect detection results of the components to be tested, including:
[0020] Determine the preset detection model corresponding to the component to be tested according to the comparison relationship between the component to be tested and the preset detection model;
[0021] The defect detection process is performed on the test area image corresponding to the component to be tested according to the preset detection model to obtain the defect detection result of the component to be tested.
[0022] As described above, by performing defect detection processing on each component to be tested through the corresponding preset detection model, the pertinence of component defect detection can be improved, thereby improving the defect detection accuracy of each component to be tested, and further improving the accuracy of component defect detection of the entire circuit board.
[0023] In one embodiment, after acquiring multiple images of the circuit board taken from multiple angles and the relative position relationship of the circuit board in each image, the method further includes:
[0024] When the circuit board is a standard board, a template image corresponding to the component to be tested is selected from multiple images according to a relative position relationship, and display information of the component to be tested in the template image meets a preset condition;
[0025] Setting template parameters according to the template image and the components to be tested to obtain corresponding test parameters, wherein the test parameters include at least one of detection target information, detection algorithm, detection threshold parameter and control relationship;
[0026] Save the test parameters corresponding to each component under test.
[0027] In one embodiment, acquiring images of a circuit board from multiple angles includes:
[0028] The circuit board is transferred to the preset inspection area by the conveying device at a preset speed;
[0029] By setting the imaging component at the preset position to shoot in the preset detection area, multiple images of the circuit board at multiple angles are obtained.
[0030] As described above, the circuit board is transported by the transport device, and multiple images of the circuit board at multiple angles are obtained by the camera device during the transport process. Multiple images at multiple angles can be obtained continuously and quickly, which improves the image acquisition efficiency, thereby improving the overall inspection work efficiency.
[0031] In one embodiment, obtaining multiple images of a circuit board taken from multiple angles includes:
[0032] The imaging component is controlled to shoot a circuit board placed at a preset position at different preset angles to obtain multiple images of the circuit board at multiple angles.
[0033] As described above, by photographing the circuit board at different shooting angles of the camera device to obtain multiple images at multiple angles, images of corresponding angles that satisfy the display information that meets the preset conditions can be obtained, which can improve the accuracy of subsequent image detection.
[0034] In one embodiment, defect detection processing is performed on the target image to obtain defect detection results of each component to be tested, including:
[0035] Displaying multiple images captured in real time on a display device;
[0036] After determining the target image, marking the displayed target image on the display device;
[0037] Displaying defect detection results of the component to be tested in a first preset area of a display screen of a display device;
[0038] When the defect detection result of the component to be tested is that there is a defect, the test area image of the component to be tested is displayed in the second preset area of the display screen, and the corresponding defect position and defect information are marked in the displayed test area image.
[0039] In a second aspect, an embodiment of the present application provides a component defect detection device, comprising:
[0040] A relative position relationship acquisition module is used to acquire multiple images of the circuit board taken from multiple angles and the relative position relationship of each circuit board in each image, wherein the relative position relationship includes the position relationship and / or the shooting angle relationship, and there are components to be tested on the circuit board;
[0041] A first position information acquisition module, used to acquire first position information of the component to be tested on the circuit board;
[0042] A target image determination module, used to determine a target image corresponding to each component to be tested from a plurality of images according to the first position information and the relative position relationship, wherein display information of the component to be tested in the target image meets a preset condition;
[0043] The defect detection module is used to perform defect detection processing on the target image to obtain the defect detection results of the components to be tested.
[0044] In a third aspect, an embodiment of the present application provides a component defect detection device, including:
[0045] memory and one or more processors;
[0046] The memory is used to store one or more programs;
[0047] When the one or more programs are executed by the one or more processors, the one or more processors implement the component defect detection method as described in the first aspect.
[0048] In a fourth aspect, an embodiment of the present application provides a storage medium storing computer executable instructions, which, when executed by a computer processor, are used to execute the component defect detection method as described in the first aspect.
[0049] The embodiment of the present application obtains the first position information of the component to be tested on the circuit board by obtaining multiple images of the circuit board taken from multiple angles and the relative position relationship of each circuit board in each image, and determines the target image corresponding to the component to be tested from the multiple images according to the first position information and the relative position relationship and the test parameters corresponding to the component to be tested, and performs defect detection processing on the target image to obtain the defect detection result of the component to be tested. By adopting the above technical means, the best detection effect can be achieved by selecting an image whose display information meets the preset conditions as the target image for each component to be tested, such as selecting an image with the best display effect of the component to be tested as the target image of the component to be tested, thereby avoiding the problem of low detection accuracy caused by regional image deformation, device occlusion, insufficient brightness, etc. during component defect detection. For each component to be tested, the image whose display information meets the preset conditions is selected as the target image for corresponding defect detection, which can improve the accuracy of defect detection of each component to be tested, thereby improving the accuracy of component defect detection of the circuit board as a whole. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 is a flow chart of a component defect detection method provided in an embodiment of the present application;
[0051] Figure 2 is a schematic diagram of the setting of a camera device provided in an embodiment of the present application;
[0052] Figure 3 is a schematic diagram of an imaging field of view provided in an embodiment of the present application;
[0053] Figure 4 is a schematic diagram of the setting of a camera device provided in an embodiment of the present application;
[0054] Figure 5 is a schematic diagram of an imaging field of view provided in an embodiment of the present application;
[0055] Figure 6 It is a structural schematic diagram of a component defect detection device provided in an embodiment of the present application;
[0056] Figure 7 It is a structural schematic diagram of a component defect detection device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all the contents are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
[0058] In the related art, it is usually to install a camera device at a preset position of the production line. When the circuit board product reaches the preset position, the camera device is used to shoot and process, and the captured circuit board image is optically inspected to confirm whether there are defects in the components on the circuit board. In this way, only a corresponding circuit board image is obtained through a fixed camera device for analysis and processing. For the components in the central position area of the circuit board image, based on the good viewing angle, the device identification and defect detection can be accurately performed; however, for the components in the corner position area of the circuit board image, the regional image of the corner position area of the circuit board image will be deformed to a certain extent based on the shooting viewing angle, so that when the regional image of the corner position area is used for device identification and defect detection by an optical detection method, the detection result is not ideal, and the accuracy of the final component defect detection result is low. Based on this, a component defect detection method of an embodiment of the present application is provided to solve the problem of low accuracy of existing component defect detection. The embodiment of the present application obtains multiple images of the circuit board taken from multiple angles, and selects an image whose display information meets preset conditions from the multiple images as the target image. For example, an image with the best display effect of the component to be tested is selected as the target image of the component to be tested, so as to achieve the best detection effect. When performing defect detection, the problem of low detection accuracy due to regional image deformation, component occlusion, insufficient brightness, etc. in the related technology is avoided. The target images corresponding to the components to be tested in the embodiment of the present application are all images with good viewing angles, and each component to be tested does not have corresponding deformation in the corresponding target image, thereby improving the accuracy of defect detection of each component to be tested, and then improving the accuracy of component defect detection of the circuit board as a whole.
[0059] Figure 1A flow chart of a component defect detection method provided in an embodiment of the present application is given. The component defect detection method provided in this embodiment can be executed by a component defect detection device, which can be implemented by software and / or hardware. The component defect detection device can be composed of two or more physical entities, or can be composed of one physical entity. Generally speaking, the component defect detection device can be a terminal device, such as a computer device.
[0060] The following description is made by taking a computer device as an example of the subject of the component defect detection method. Figure 1 , the component defect detection method specifically includes:
[0061] S101, acquiring multiple images of a circuit board taken from multiple angles and the relative position relationship of each circuit board in each image, wherein the relative position relationship includes the position relationship and / or the shooting angle relationship, and there are components to be tested on the circuit board.
[0062] The circuit board is one of the key components of electronic products such as televisions, refrigerators and car controllers. Corresponding components are set on the circuit board. The setting method is not limited to plug-in (welding or snap-on) or patch. The correct plug-in, correct patch and correct welding of components on the circuit board are the key to maintaining the normal operation of electronic products. Automatic optical inspection (AOI) is one of the ways to detect defects in circuit board components. This application uses computer equipment based on AOI to detect component defects on circuit boards. Before formal testing, it is necessary to obtain and confirm the standard circuit image, that is, to obtain and confirm the corresponding image of the standard board.
[0063] A standard circuit board can be understood as a circuit board that confirms that components are free of defects, and its image is used as a standard image to determine the corresponding test parameters. A standard circuit board (i.e., a standard board) can be the first circuit board during inspection. Multi-angle images of the standard circuit board are acquired, and the relative position relationship of the standard circuit board in each image is acquired. The phase position relationship includes the position relationship and / or the shooting angle relationship. The position relationship can be understood as the absolute position of the circuit board in the image, for example, the circuit board is on the left side of the image, the circuit board is in the center of the image, or the circuit board is on the right side of the image, etc. The shooting angle relationship can be understood as the angle relationship between the shooting device and the circuit board when shooting the circuit board, which can be obtained through the corresponding shooting parameters of the corresponding image.
[0064] The template image corresponding to the component to be tested is screened from the multi-angle image of the standard circuit board according to the relative position relationship, and the display information of the component to be tested in the template image meets the preset conditions. The display information includes display content, display ratio and display clarity, etc. In one embodiment, the display information meets the preset conditions, which can be that the display content includes the corresponding component to be tested, the display ratio is the complete display of the component to be tested, and the display clarity reaches the preset clarity threshold. Exemplarily, the display information meets the preset conditions, which can also be an image with the best visual effect of the component to be tested, and the template image with the best visual effect corresponding to the component to be tested in multiple images can be determined by a preset visual detection algorithm. The template image is used for subsequent positioning and matching. The template parameters are set according to the template image to obtain the test parameters corresponding to each component to be tested, and the test parameters include detection target information, detection algorithm, detection threshold parameters, etc. The detection target information includes the object to be tested (including components and / or specific identifications on components) and its position information, and the position information includes the position of the component to be tested (i.e., the first position information) and the position information of the feature to be tested / specific identification. Exemplarily, the detection target information may be a specific mark on the component to be tested, such as a notch (on the left or right side), a solder joint, and an identification code (letters, numbers, shapes, etc.) on the component to be tested.
[0065] In one embodiment, the test parameters also include: a comparison relationship, and the comparison relationship includes a first preset comparison relationship, a second preset comparison relationship, a third preset comparison relationship, and a fourth preset comparison relationship. Among them, the first preset comparison relationship is the comparison relationship between the component to be tested and the shooting angle, the second preset comparison relationship is the comparison relationship between the component to be tested and the test area, the third preset comparison relationship is the comparison relationship between the component to be tested and the preset detection model, and the fourth preset comparison relationship is the comparison relationship between the component to be tested and the detection target information, the detection algorithm, the detection threshold parameter, and the template image. The test parameters corresponding to each component to be tested are saved for subsequent use in component defect detection. In the above, according to the multiple images of the standard circuit board at multiple angles obtained, the template image used for positioning matching and the corresponding component to be tested are determined, and the template parameters of each component to be tested are set to obtain the test parameters, so that the template image selection, the target image selection, the regional image selection, and the preset detection model selection can be performed according to the test parameters in the subsequent formal test.
[0066] This embodiment provides an implementation method for obtaining multiple images of a circuit board. When performing formal testing, the circuit board is transmitted to a preset detection area at a preset speed by a conveying device (such as a conveyor belt), and the preset detection area of the conveying device is photographed by an imaging component set at a preset position to obtain multiple images of the circuit board at multiple angles. Among them, the imaging component includes a camera, a lens, and a light source. The imaging component can be a camera or other imaging device. The relative position relationship of the circuit board in each image can be determined based on the absolute position information of the circuit board in the image, and the corresponding target image of the corresponding component to be tested can be determined based on the relative position relationship, that is, the target image that meets the preset conditions is displayed. Figure 2 is a schematic diagram of a camera device provided in an embodiment of the present application, referring to Figure 2 , the circuit board 1 is transported on the conveying device, and this time it passes through position A, position B and position C. The camera device continues to shoot according to the preset shooting interval, so the images corresponding to the circuit board 1 at position A, position B and position C are all captured. The area corresponding to position A, position B and position C can be understood as the preset detection area. Figure 3 is a schematic diagram of an imaging field of view provided in an embodiment of the present application, referring to Figure 3 , based on the fact that the camera device is fixed, the corresponding shooting field of view (i.e., the aforementioned preset detection area) is also fixed, and the camera device performs shooting processing at a preset time interval, and performs shooting processing on the preset detection area (i.e., the shooting field of view) to obtain a first image, and the obtained first images are first image 10, first image 11, first image 12, first image 13, and first image 14 in sequence. It should be noted that the first image 10, the first image 11, the first image 12, the first image 13, and the first image 14 are multiple images of the circuit board 1 at multiple angles. According to the first image 11, it can be obtained that the position relationship of the circuit board 1 in the image is on the left side of the image. For example, the circuit board 1 is located 2-12 cm on the left side of the image. Therefore, according to the multiple images of the circuit board 1 taken at multiple angles, the relative position relationship (e.g., absolute position information) of the circuit board 1 in each image can be obtained.
[0067] It should be noted that the position of the camera device and the conveying speed of the conveyor belt can be adjusted so that at most one circuit board appears within the shooting field of view (ie, the preset detection area).
[0068] It should be noted that, when there are multiple circuit boards appearing in the preset shooting field of view, different circuit boards can be distinguished according to the identification of the complete circuit board image matched in the corresponding first image.
[0069] As described above, the circuit board is transported by the transport device, and multiple images of the circuit board at multiple angles are obtained by the camera device during the transport process. Multiple images at multiple angles can be obtained continuously and quickly, which improves the efficiency of image acquisition, thereby improving the overall inspection work efficiency.
[0070] This embodiment provides an implementation method for obtaining multiple images of a circuit board. When performing formal inspection, a circuit board placed in a preset position is photographed at different angles through a camera device (i.e., an imaging component) that can change the camera angle, thereby obtaining multiple images of the circuit board at multiple angles. Figure 4 is a schematic diagram of a camera device provided in an embodiment of the present application, referring to Figure 4 The circuit board 1 is set at a fixed preset position, and the camera device shoots the circuit board 1 through shooting angles D, E and F to obtain multiple images of the circuit board 1 at multiple angles. Figure 5 is a schematic diagram of an imaging field of view provided in an embodiment of the present application, referring to Figure 3 , based on the fact that the camera device can rotate, the corresponding images obtained by shooting are all in the center of the image, but based on different shooting angles, the focus of the corresponding images obtained by shooting will be different. The camera device shoots the circuit board 1 at different shooting angles to obtain first images corresponding to multiple angles, and the obtained first images are first image 15, first image 16 and first image 17 in sequence. It should be noted that the first image 15, first image 16 and first image 17 are multiple images of the circuit board 1 at multiple angles. The circuit board 1 in the first image 15, first image 16 and first image 17 is all in the center of the image, but based on different shooting angles, the corresponding focus is different. For example, the first image 15 is obtained based on the shooting angle D located on the left side, so the component c located on the left side will be larger and clearer. According to the multiple images of the circuit board 1 at multiple angles obtained by shooting, the shooting angle relationship of the circuit board 1 in each image can be obtained, and the shooting angle relationship can be obtained through the shooting parameters when the camera device is shooting.
[0071] As described above, by photographing the circuit board at different shooting angles of the camera device to obtain multiple images at multiple angles, images of corresponding angles that satisfy the display information that meets the preset conditions can be obtained, which can improve the accuracy of subsequent image detection.
[0072] As described above, by acquiring multiple images of the circuit board taken from multiple angles and the relative position relationship of each circuit board in each image, it is convenient to subsequently select corresponding images as target images for detection and processing based on the relative position relationship of different components on the circuit board, thereby avoiding the problem of inaccurate detection caused by viewing angle deviation and improving the accuracy of component defect detection.
[0073] S102: Obtain first position information of the component to be tested on the circuit board.
[0074] After obtaining multiple images of the corresponding circuit board at multiple angles, the circuit board in the multiple images can be identified and processed to obtain the first position information of the component to be tested on the circuit board. The first position information includes the absolute position information of the component to be tested on the circuit board. The component to be tested can be identified and the first position information of the component to be tested can be obtained by a positioning algorithm. There can be one or more components to be tested.
[0075] Subsequently, the position of the component to be tested on the circuit board can be determined according to the first position information of the component to be tested on the circuit board, so as to facilitate the subsequent positioning of the component to be tested.
[0076] S103: Determine a target image corresponding to the component to be tested from the multiple images according to the first position information and the relative position relationship, and display information of the component to be tested in the target image meets a preset condition.
[0077] The above has determined the first position of the component to be tested on the circuit board and the relative position relationship of the circuit board in each image. According to the first position information and relative position relationship of the component to be tested, the image whose corresponding display information meets the preset conditions is selected from the multiple images acquired at multiple angles as the target image of the corresponding component to be tested, which is used for subsequent defect detection processing of the corresponding component for each target image of the component to be tested. The display information includes display content, display ratio, display clarity, etc. In one embodiment, the display information that meets the preset conditions may be an image that matches the template image of the image to be tested. Matching refers to matching in specifications and does not specifically refer to identical matching. For example, the matching is matching in length, width, and relative position relationship.
[0078] Reference Figure 3 , taking the multiple images matched and located as circuit board image 110, circuit board image 120 and circuit board image 130 as an example for explanation. Assume that the position information corresponding to circuit board image 110 obtained through relative position relationship is X1, the position information corresponding to circuit board image 120 is X2, and the position information corresponding to circuit board image 130 is X3. Assume that there are components a, component b and component c in the circuit board to be tested. Assume that the template image in the test parameters corresponding to component a is an image with position information X1, the template image in the test parameters corresponding to component b is an image with position information X2, and the template image in the test parameters corresponding to component c is an image with position information X3. Therefore, according to the first position information and the relative position relationship, it can be obtained that the target image corresponding to component a is circuit board image 110, the target image corresponding to component b is circuit board image 120, and the target image corresponding to component c is circuit image 130.
[0079] As described above, through the first position information and the relative position relationship, the target image corresponding to each component to be tested is screened out from the multiple images obtained, which is convenient for the subsequent selection of target images with corresponding position relationships for different components for detection and processing, avoiding the problem of inaccurate detection caused by viewing angle deviation, reducing the impact of viewing angle deviation on detection retrieval, and thus improving the accuracy of component defect detection.
[0080] The test parameters corresponding to the components to be tested have been determined above. After obtaining multiple images of the circuit board taken from multiple angles and the relative position relationship of the circuit board in each image, and obtaining the first position information of the components to be tested, the image whose corresponding display information meets the preset conditions can be selected from the multiple images obtained according to the first position information, relative position relationship and test parameters of the components to be tested as the target image of the corresponding component to be tested, which is used for subsequent defect detection processing of the corresponding component for each target image of the component to be tested. The display information that meets the preset conditions can be an image that matches the template image of the image to be tested. Matching refers to matching in specifications and does not specifically refer to identical matching. For example, matching is matching in length, width, and relative position relationship.
[0081] Reference Figure 5 , taking the multiple images matched and located as circuit board image 150, circuit board image 160 and circuit board image 170 as an example for explanation. Assume that the shooting angle relationship corresponding to circuit board image 150 is D, the shooting angle relationship corresponding to circuit board image 160 is E, and the shooting angle relationship corresponding to circuit board image 170 is F through the relative position relationship. Assume that there are components a, component b and component c in the circuit board to be tested. Assume that the template image in the test parameters corresponding to component a is an image with a shooting angle relationship of F, the template image in the test parameters corresponding to component b is an image with a shooting angle relationship of E, and the template image in the test parameters corresponding to component c is an image with a shooting angle relationship of D. Therefore, according to the first position information, the relative position relationship and the test parameters, it can be obtained that the target image corresponding to component a is circuit board image 170, the target image corresponding to component b is circuit board image 160, and the target image corresponding to component c is circuit image 150.
[0082] As described above, through the first position information, the shooting angle relationship (i.e., the relative position relationship) and the test parameters of the components to be tested, the target image corresponding to each component to be tested is screened out from the multiple images obtained, so as to facilitate the subsequent selection of target images with corresponding shooting angles for different components for detection and processing, avoid the problem of inaccurate detection caused by viewing angle deviation, reduce the influence of viewing angle deviation on detection retrieval, and thus improve the accuracy of component defect detection.
[0083] S104: Perform defect detection processing on the target image to obtain defect detection results of the components to be tested.
[0084] Since the positions of each component to be tested are different, the corresponding test area range can be divided according to the positions of the components to be tested on the circuit board. When the corresponding components to be tested need to be tested, the defect detection process can be directly performed on the test area image of the corresponding test area range. Since the first position information of the component to be tested has been obtained in the above steps, the test area image corresponding to the component to be tested can be determined from the target image through the positioning algorithm according to the first position information.
[0085] Based on the test parameters including detection target information, detection algorithm, detection threshold parameter and comparison relationship, etc. The detection target information includes the object to be tested (including components and / or specific identification on the components) and its position information, and the position information includes the location of the component to be tested (i.e., the first position information) and the location information of the feature to be tested / specific identification. Exemplarily, the detection target information can be a specific identification on the component to be tested, such as a notch (on the left or right) on the component to be tested, a solder joint and an identification code (letter or number or shape, etc.). The comparison relationship includes a first preset comparison relationship, a second preset comparison relationship, a third preset comparison relationship and a fourth preset comparison relationship. Among them, the first preset comparison relationship is the comparison relationship between the component to be tested and the shooting angle, the second preset comparison relationship is the comparison relationship between the component to be tested and the test area, the third preset comparison relationship is the comparison relationship between the component to be tested and the preset detection model, and the fourth preset comparison relationship is the comparison relationship between the component to be tested and the detection target information, the detection algorithm, the detection threshold parameter and the template image. Therefore, after obtaining the target image of the component to be tested, the test area image of the component to be tested in the corresponding target image is determined by a positioning algorithm according to the second preset comparison relationship in the test parameters and the first position information of the component to be tested. Figure 3 , it can be obtained from the above that the target image corresponding to component a is circuit board image 110, the target image corresponding to component b is circuit board image 120, and the target image corresponding to component c is circuit board image 130. In circuit board image 110, according to the second preset comparison relationship, the test area image corresponding to component a can be obtained as area image 110a. In circuit board image 120, according to the second preset comparison relationship, the test area image corresponding to component b can be obtained as area image 120b. In circuit board image 130, according to the second preset comparison relationship, the test area image corresponding to component c can be obtained as area image 130c.
[0086] As described above, by obtaining the test area image of the corresponding component to be tested in the corresponding target image through the first position information of the component to be tested and the second preset comparison relationship in the test parameters, the detection area range of each component to be tested can be narrowed, and the accuracy of defect detection of the corresponding component to be tested can be further improved.
[0087] Based on the test parameters, the detection target information, detection algorithm, detection threshold parameter and comparison relationship are included. The detection target information includes the object to be tested (including components and / or specific identification on the components) and its position information, and the position information includes the location of the component to be tested (i.e., the first position information) and the location information of the feature to be tested / specific identification. Exemplarily, the detection target information can be a specific identification on the component to be tested, such as a notch (on the left or right) on the component to be tested, a solder joint and an identification code (letter or number or shape, etc.). The comparison relationship includes a first preset comparison relationship, a second preset comparison relationship, a third preset comparison relationship and a fourth preset comparison relationship. Among them, the first preset comparison relationship is the comparison relationship between the component to be tested and the shooting angle, the second preset comparison relationship is the comparison relationship between the component to be tested and the test area, the third preset comparison relationship is the comparison relationship between the component to be tested and the preset detection model, and the fourth preset comparison relationship is the comparison relationship between the component to be tested and the detection target information, the detection algorithm, the detection threshold parameter and the template image. Therefore, according to the third preset comparison relationship, the preset detection model corresponding to the component to be tested can be determined. After obtaining the area image of each component to be tested in the corresponding target image, defect detection processing is performed on the corresponding test area image through the corresponding preset detection model to obtain the defect detection result of the component to be tested.
[0088] In one embodiment, based on the different types and locations of each component to be tested, a corresponding preset detection model is set for each component to be tested. The preset detection model includes corresponding detection items and detection algorithms. After obtaining the test area image of the component to be tested in the corresponding target image, the test area image is subjected to defect detection processing according to the preset detection model to obtain the defect detection result of the corresponding component to be tested. The defect detection result includes no defect, shape defect, position error, welding error or patch error, etc. The preset detection model includes detection items and detection algorithms, and the corresponding detection items and detection algorithms are determined according to the corresponding preset detection model. According to the preset detection order of the detection items, the detection processing of each detection item is performed in turn by the corresponding detection algorithm to obtain the detection result of each detection item. The defect detection result corresponding to the component to be tested is generated and output based on the detection result of each detection item. As described above, using the corresponding preset detection model to perform defect detection processing for each component to be tested can improve the pertinence of component defect detection, thereby improving the defect detection accuracy of each component to be tested, and then improving the accuracy of component defect detection of the entire circuit board. In addition, by presetting the order of detection items in the detection model, defect detection processing is carried out in sequence through the corresponding detection algorithm, so as to achieve orderly defect detection and improve the fluency of the overall detection work; and each test item is tested separately, and the test details are subdivided to further improve the fluency of the detection work, thereby improving the efficiency of the test work.
[0089] Reference Figure 3, assuming that according to the third preset comparison relationship, it can be obtained that component a is compared with the preset detection model Y1, component b is compared with the preset detection model Y2, and component c is compared with the preset detection model Y3. From the above, it can be obtained that the test area image corresponding to component a is the area image 110a in the circuit board image 110, the test area image corresponding to component b is the area image 120b in the circuit board image 120, and the test area image corresponding to component c is the area image 130c in the circuit board image 130. Defect detection processing is performed on the area image 110a, the area image 120b and the area image 130c respectively according to the corresponding preset detection model to obtain the corresponding defect detection results of the components to be tested. For example, for the area image 110a, the corresponding detection item and detection algorithm are determined according to the corresponding preset detection model Y1. According to the preset detection order of the detection item, the detection processing of each detection item is performed in turn by the corresponding detection algorithm to obtain the detection result of each detection item corresponding to component a. The defect detection result corresponding to component a is generated and output based on the detection result of each detection item. As described above, using the corresponding preset detection model to perform defect detection processing for each component to be tested can improve the pertinence of component defect detection, thereby improving the defect detection accuracy of each component to be tested, and further improving the accuracy of component defect detection of the entire circuit board.
[0090] During the detection process, multiple images obtained by real-time shooting are displayed on the display device. After the target image is determined, the displayed target image is marked on the display device, for example, the target image is marked with a colored box. The defect detection result of each component to be tested is displayed in the first preset area of the display screen of the display device. When the curve detection result of the component to be tested is defective, the test area image of the component to be tested is displayed in the second preset area of the display screen, that is, the defective test area image (that is, the enlarged area image) is displayed for the user to view. The corresponding defect position and defect information are identified in the displayed test area image of the defective component to be tested. As described above, by displaying the relevant information of the detection result on the display device, it is convenient for the user to view it in time, thereby improving the user experience.
[0091] In the above, by acquiring multiple images of the circuit board taken from multiple angles and the relative position relationship of each circuit board in each image, the first position information of the component to be tested on the circuit board is obtained, and according to the first position information and the relative position relationship and the test parameters corresponding to the component to be tested, the target image corresponding to the component to be tested is determined from the multiple images, and the target image is subjected to defect detection processing to obtain the defect detection result of the component to be tested. By adopting the above technical means, the best detection effect can be achieved by selecting an image whose display information meets the preset conditions as the target image for each component to be tested, such as selecting an image with the best display effect of the component to be tested as the target image of the component to be tested, thereby avoiding the problem of low detection accuracy caused by regional image deformation, device occlusion, insufficient brightness, etc. during component defect detection. For each component to be tested, the image whose display information meets the preset conditions is selected as the target image for corresponding defect detection, which can improve the accuracy of defect detection of each component to be tested, thereby improving the accuracy of component defect detection of the circuit board as a whole.
[0092] Based on the above embodiments, Figure 6 A schematic diagram of the structure of a component defect detection device provided in an embodiment of the present application. Figure 6 The component defect detection device provided in this embodiment specifically includes: a relative position relationship acquisition module 21, a first position information acquisition module 22, a target image determination module 23 and a defect detection module 24.
[0093] The relative position relationship acquisition module 21 is used to acquire multiple images of the circuit board taken from multiple angles and the relative position relationship of the circuit board in each image, wherein the relative position relationship includes the position relationship and / or the shooting angle relationship, and there are components to be tested on the circuit board;
[0094] A first position information acquisition module 22, used to acquire first position information of the component to be tested on the circuit board;
[0095] A target image determination module 23 is used to determine a target image corresponding to each component to be tested from a plurality of images according to the first position information and the relative position relationship, and the display information of the component to be tested in the target image meets a preset condition;
[0096] The defect detection module 24 is used to perform defect detection processing on the target image to obtain defect detection results of the components to be tested.
[0097] As mentioned above, by selecting an image with a corresponding relative position relationship as the target image for each component to be tested, the problem of low detection accuracy caused by regional image deformation during component defect detection can be avoided. For each component to be tested, an image whose display information meets preset conditions is selected as the target image for corresponding defect detection. The accuracy of defect detection of each component to be tested can be improved, thereby improving the accuracy of component defect detection of the circuit board as a whole.
[0098] In one embodiment, the device further includes a test parameter acquisition module;
[0099] A test parameter acquisition module is used to obtain the test parameters corresponding to the components to be tested;
[0100] The target image determination module 23 is also used to determine the target image corresponding to each component to be tested from multiple images according to the first position information and the relative position relationship and the test parameters, and the display information of the component to be tested in the target image meets the preset conditions, and the display information includes: at least one of display content, display ratio and display clarity.
[0101] In one embodiment, the apparatus further comprises a test area determination module;
[0102] A test area determination module is used to determine the test area image corresponding to the component to be tested from the target image according to the positioning algorithm;
[0103] The defect detection module 24 is also used to perform defect detection processing on the test area image.
[0104] As described above, defect detection processing is performed on the test area image corresponding to each component to be tested respectively, which can improve the pertinence of component defect detection, thereby improving the defect detection accuracy of each component to be tested, and further improving the accuracy of component defect detection of the entire circuit board.
[0105] In one embodiment, the defect detection module 24 includes a detection model determination unit and a detection unit;
[0106] A detection model determination unit, used to determine the preset detection model corresponding to the component to be tested according to the comparison relationship between the component to be tested and the preset detection model;
[0107] The detection unit is used to perform defect detection processing on the test area image corresponding to the component to be tested according to a preset detection model to obtain a defect detection result of the component to be tested.
[0108] As described above, by performing defect detection processing on each component to be tested through the corresponding preset detection model, the pertinence of component defect detection can be improved, thereby improving the defect detection accuracy of each component to be tested, and further improving the accuracy of component defect detection of the entire circuit board.
[0109] In one embodiment, the device further includes a template image screening module, a test parameter acquisition module and a parameter storage module;
[0110] The template image screening module is used to screen the template image corresponding to the component to be tested from multiple images according to the relative position relationship when the circuit board is a standard board, and the display information of the component to be tested in the template image meets the preset conditions;
[0111] The test parameter acquisition module is used to set the template parameters according to the template image and the components to be tested to obtain the corresponding test parameters, which include the detection target information, the detection algorithm, the detection threshold parameters and the comparison relationship;
[0112] The parameter saving module is used to save the test parameters corresponding to each component to be tested.
[0113] In one embodiment, the relative position relationship acquisition module 21 includes a transmission control unit and an image acquisition unit;
[0114] A transmission control unit, used to transmit the circuit board to a preset detection area at a preset speed through a transmission device;
[0115] The image acquisition unit is used to photograph a preset detection area of the conveying device through an imaging component arranged at a preset position to obtain multiple images of the circuit board at multiple angles.
[0116] As described above, the circuit board is transported by the transport device, and multiple images of the circuit board at multiple angles are obtained by the camera device during the transport process. Images at multiple angles can be obtained continuously and quickly, which improves the efficiency of image acquisition and thus improves the overall inspection work efficiency.
[0117] In one embodiment, the relative position relationship acquisition module 21 includes a camera control unit;
[0118] The camera control unit is used to control the imaging component to shoot the circuit board placed at a preset position at different preset angles to obtain multiple images of the circuit board at multiple angles.
[0119] As described above, by photographing the circuit board at different shooting angles of the camera device to obtain multiple images at multiple angles, images of corresponding angles that satisfy the display information that meets the preset conditions can be obtained, which can improve the accuracy of subsequent image detection.
[0120] In one embodiment, the apparatus includes an image display module, an identification module, a first result display module, and a second result display module;
[0121] An image display module, used to display multiple images captured in real time on a display device;
[0122] An identification module, used for identifying the target image displayed on the display device after determining the target image;
[0123] A first result display module, used for displaying the defect detection result of each component to be tested in a first preset area of a display screen of a display device;
[0124] The second result display module is used to display the test area image of the component to be tested in the second preset area of the display screen when the defect detection result of the component to be tested is defective, and to identify the corresponding defect position and defect information in the displayed test area image.
[0125] In the above, by acquiring images of the circuit board from multiple angles and the relative position relationship of each circuit board in each image, the first position information of the component to be tested on the circuit board is acquired, and according to the first position information and the relative position relationship and the test parameters corresponding to the component to be tested, the target image corresponding to the component to be tested is determined from the multiple images, and the target image is subjected to defect detection processing to obtain the defect detection result of the component to be tested. By adopting the above technical means, the best detection effect can be achieved by selecting an image whose display information meets the preset conditions as the target image for each component to be tested, such as selecting an image with the best display effect of the component to be tested as the target image of the component to be tested, thereby avoiding the problem of low detection accuracy caused by regional image deformation, device occlusion, insufficient brightness, etc. during component defect detection. For each component to be tested, an image whose display information meets the preset conditions is selected as the target image for corresponding defect detection, which can improve the accuracy of defect detection of each component to be tested, thereby improving the accuracy of component defect detection of the circuit board as a whole.
[0126] The component defect detection device provided in the embodiment of the present application can be used to execute the component defect detection method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0127] The present application provides a device for detecting component defects. Figure 7The component defect detection device includes: a processor 31, a memory 32, a communication module 33, an input device 34 and an output device 35. The number of processors in the component defect detection device can be one or more, and the number of memories in the component defect detection device can be one or more. The processor, memory, communication module, input device and output device of the component defect detection device can be connected through a bus or other methods.
[0128] The memory 32, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the component defect detection method described in any embodiment of the present application (for example, a relative position relationship acquisition module, a first position information acquisition module, a target image determination module and a defect detection module in a component defect detection device). The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the device, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device or other non-volatile solid-state storage device. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.
[0129] The communication module 33 is used for data transmission.
[0130] The processor 31 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory, that is, implements the above-mentioned component defect detection method.
[0131] The input device 34 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device 35 may include a display device such as a display screen.
[0132] The component defect detection device provided above can be used to execute the component defect detection method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0133] An embodiment of the present application also provides a storage medium storing computer executable instructions, which are used to execute a component defect detection method when executed by a computer processor. The component defect detection method includes: obtaining multiple images of a circuit board taken from multiple angles and the relative position relationship of the circuit board in each image, the relative position relationship including the position relationship and / or the shooting angle relationship, and there are components to be tested on the circuit board; obtaining first position information of the component to be tested on the circuit board; determining a target image corresponding to the component to be tested from the multiple images based on the first position information and the relative position relationship, and the display information of the component to be tested in the target image meets preset conditions; performing defect detection processing on the target image to obtain a defect detection result of the component to be tested.
[0134] Storage medium - any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media, such as CD-ROM, floppy disk or tape device; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory elements, etc. Storage media may also include other types of memory or combinations thereof. In addition, the storage medium may be located in the first computer system in which the program is executed, or may be located in a different second computer system, which is connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media residing in different locations (for example, in different computer systems connected by a network). The storage medium may store program instructions (for example, embodied as a computer program) that can be executed by one or more processors.
[0135] Of course, the computer executable instructions of a storage medium storing computer executable instructions provided in an embodiment of the present application are not limited to the component defect detection method described above, and can also execute related operations in the component defect detection method provided in any embodiment of the present application.
[0136] The component defect detection device, storage medium and component defect detection equipment provided in the above embodiments can execute the component defect detection method provided in any embodiment of the present application. For technical details not described in detail in the above embodiments, please refer to the component defect detection method provided in any embodiment of the present application.
[0137] The above are only preferred embodiments of the present application and the technical principles used. The present application is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions that can be made by those skilled in the art will not deviate from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the claims.
Claims
1. A component defect detection method, characterized in that: include: Acquire multiple images of a circuit board taken from multiple angles and the relative position relationship of the circuit board in each image, wherein the relative position relationship includes the position relationship and / or the shooting angle relationship, and there are components to be tested on the circuit board; Acquiring first position information of the component to be tested on the circuit board; Determine, from the plurality of images, a target image corresponding to the component to be tested according to the first position information and the relative position relationship, wherein display information of the component to be tested in the target image meets a preset condition; Perform defect detection processing on the target image to obtain a defect detection result of the component to be tested.
2. The method according to claim 1, characterized in that After obtaining the first position information of the component to be tested on the circuit board, the method includes: Obtaining test parameters corresponding to the component to be tested; According to the first position information, the relative position relationship and the test parameters, a target image corresponding to the component to be tested is determined from the multiple images, and display information of the component to be tested in the target image meets preset conditions, and the display information includes: at least one of display content, display ratio and display clarity.
3. The method according to claim 1 or 2, characterized in that: After determining the target image corresponding to each component to be tested from the multiple images, the method further includes: Determine a test area image corresponding to the component to be tested from the target image according to a positioning algorithm; The performing defect detection processing on the target image includes: Perform defect detection processing on the test area image.
4. The method according to claim 3, characterized in that The performing defect detection processing on the target image to obtain the defect detection result of the component to be tested includes: Determine the preset detection model corresponding to the component under test according to the comparison relationship between the component under test and the preset detection model; Defect detection processing is performed on the test area image corresponding to the component to be tested according to the preset detection model to obtain a defect detection result of the component to be tested.
5. The method according to claim 1, characterized in that: After acquiring a plurality of images of the circuit board taken from a plurality of angles and the relative position relationship of the circuit board in each image, the method further includes: When the circuit board is a standard board, a template image corresponding to the component to be tested is selected from the multiple images according to the relative position relationship, and display information of the component to be tested in the template image meets a preset condition; Setting template parameters according to the template image and the component to be tested to obtain corresponding test parameters, wherein the test parameters include at least one of detection target information, detection algorithm, detection threshold parameter and control relationship; The test parameters corresponding to each component to be tested are saved.
6. The method according to claim 1, characterized in that The method of obtaining multiple images of the circuit board taken from multiple angles includes: The circuit board is transferred to the preset inspection area by the conveying device at a preset speed; The preset detection area is photographed by an imaging component arranged at a preset position to obtain multiple images of the circuit board at multiple angles.
7. The method according to claim 1, characterized in that The method of obtaining multiple images of the circuit board taken from multiple angles includes: The imaging component is controlled to shoot a circuit board placed at a preset position at different preset angles to obtain multiple images of the circuit board at multiple angles.
8. The method according to claim 1, characterized in that The performing defect detection processing on the target image to obtain a defect detection result of each component to be tested includes: Displaying the multiple images captured in real time on a display device; After determining the target image, marking the target image displayed on the display device; Displaying the defect detection result of the component to be tested in a first preset area of a display screen of a display device; When the defect detection result of the component to be tested is that there is a defect, a test area image of the component to be tested is displayed in a second preset area of the display screen, and the corresponding defect position and defect information are marked in the displayed test area image.
9. A component defect detection device, characterized in that: include: A relative position relationship acquisition module is used to acquire multiple images of a circuit board taken from multiple angles and the relative position relationship of each circuit board in each image, wherein the relative position relationship includes a position relationship and / or a shooting angle relationship, and there are components to be tested on the circuit board; A first position information acquisition module, used to acquire first position information of the component to be tested on the circuit board; a target image determination module, configured to determine a target image corresponding to each component to be tested from the plurality of images according to the first position information and the relative position relationship, wherein display information of the component to be tested in the target image meets a preset condition; The defect detection module is used to perform defect detection processing on the target image to obtain defect detection results of the component to be tested.
10. A component defect detection device, characterized in that: include: memory and one or more processors; The memory is used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.
11. A storage medium storing computer executable instructions, characterized in that: The computer executable instructions are used to perform the method according to any one of claims 1 to 8 when executed by a processor.
Citation Information
Cited By
Circuit board key area positioning method and system based on AOI detection
CN121788799A