Capacitor defect detection method and system
By using image processing and machine learning to identify capacitor types and combining it with a regional partitioning model to detect capacitor defects, the problems of low efficiency and accuracy in capacitor detection are solved, and efficient and accurate capacitor defect detection is achieved, reducing costs and improving product quality.
Patent Information
- Application Number
- CN202511000096.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-21
- Publication Date
- 2025-09-05
AI Technical Summary
The existing technology for capacitor defect detection has low efficiency and high error rate, is difficult to be compatible with multiple types of capacitors, and has low detection accuracy, which increases costs and safety risks.
Image processing technology is used to identify the type of capacitor, and the image data is divided into regions based on a preset region division model. The data is compared with the comparison region division map to determine whether the capacitor has defects. Machine learning and template matching methods are combined to achieve autonomous learning and data storage.
It improves capacitor production efficiency, reduces labor costs, and enhances detection accuracy. It is compatible with the detection of various types of capacitors, reduces false detection rates, and improves product qualification rates.
Smart Images

Figure CN120599306A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of capacitor detection, and in particular to a capacitor defect detection method and system. Background Art
[0002] With the growth and development of my country's industry, the demand for electronic components is increasing across all industries. Capacitors are one of the most commonly used electronic components. Major manufacturers have already implemented large-scale, mass-produced capacitor production to meet this growing market demand. However, manufacturers often rely on manual inspection to detect defects in capacitors, which is inefficient, error-prone, and costly. Once defective ceramic capacitors are put into use, they will affect the safety factor and service life of the corresponding products, causing significant safety hazards and economic losses. Current inspection methods are also primarily specialized and cannot comprehensively test and classify a variety of capacitor types, which undoubtedly increases user costs and introduces inconvenience.
[0003] Traditional surface defect detection methods also have many shortcomings. Different detection tasks require varying background textures, and defects are numerous and irregular. Methods based on structure and template matching struggle to cope with complex backgrounds. Due to the small size of capacitors, they often exhibit subtle defects, even so subtle that they are difficult for the human eye to discern. Furthermore, some subtle defects transition slowly from normal areas, lacking a clear boundary. This results in low accuracy in defect segmentation tasks, which in turn affects the accuracy of capacitor defect detection. Summary of the Invention
[0004] The purpose of the present invention is to provide a capacitor defect detection method and system in order to solve at least one of the above technical problems.
[0005] In a first aspect, an embodiment of the present invention provides a capacitor defect detection method, comprising: obtaining target image data of a capacitor to be detected; identifying a target capacitance type of the capacitor to be detected based on the target image data; performing region division on the target image data based on a preset region division model corresponding to the target capacitance type to obtain a plurality of region division maps; comparing the plurality of region division maps with each comparison region division map in a target comparison region division map set; Figure 1 One corresponds to another, and comparisons are performed respectively; the target comparison area division atlas is a preset comparison area division atlas corresponding to the target capacitor type in multiple preset comparison area division atlases; the target comparison area division atlas includes multiple comparison area division maps, and the area division models of the multiple comparison area division maps are consistent with the preset area division models corresponding to the target capacitor type; based on the comparison results of each area division map compared with the corresponding comparison area division map, it is judged whether the capacitor to be tested has defects.
[0006] Optionally, the target image data includes appearance images corresponding to the capacitor to be inspected at different positions.
[0007] Optionally, identifying the target capacitance type of the capacitor to be detected includes any one of the following: identifying the target capacitance type of the capacitor to be detected based on a template matching method, or identifying the target capacitance type of the capacitor to be detected based on a machine learning classifier.
[0008] Optionally, the target capacitor types include ceramic capacitors, aluminum electrolytic capacitors, and tantalum capacitors; the preset comparison area division atlas corresponding to the ceramic capacitors includes a metal electrode division diagram on both sides of the capacitor and a capacitor middle body division diagram; the preset comparison area division atlas corresponding to the aluminum electrolytic capacitors includes an aluminum shell division diagram, a rubber plug division diagram, and a pin division diagram; the preset comparison area division atlas corresponding to the tantalum capacitors includes a resin shell division diagram, an electrode division diagram, and a logo text division diagram.
[0009] Optionally, dividing the target image data into regions includes dividing the target image data into regions based on any one of threshold segmentation, region segmentation, and edge segmentation.
[0010] Optionally, based on the comparison results of each area division map compared with the corresponding comparison area division map, it is judged whether the capacitor to be tested has defects, including: judging whether the proportion of abnormal areas in the target area division map compared with the corresponding comparison area division map exceeds a preset threshold; the target area division map is one of the multiple area division maps; if not, it is judged that the capacitor to be tested has no defects; if yes, it is judged that the capacitor to be tested has defects in the position corresponding to the target area division map.
[0011] In a second aspect, an embodiment of the present invention further provides a capacitor defect detection system, comprising: an image acquisition module and a main control module; wherein the main control module further comprises: an identification unit, a division unit, a comparison unit and a detection unit; the image acquisition module is used to acquire target image data of the capacitor to be detected; the identification unit is used to identify the target capacitance type of the capacitor to be detected based on the target image data; the division unit is used to divide the target image data into regions based on a preset region division model corresponding to the target capacitance type to obtain multiple region division maps; the comparison unit is used to compare the multiple region division maps with each comparison region division map in the target comparison region division map set Figure 1One corresponds to another, and comparisons are performed respectively; the target comparison area division atlas is a preset comparison area division atlas corresponding to the target capacitor type in multiple preset comparison area division atlases; the target comparison area division atlas includes multiple comparison area division maps, and the area division models of the multiple comparison area division maps are consistent with the preset area division models corresponding to the target capacitor type; the detection unit is used to determine whether the capacitor to be detected has defects based on the comparison results of each area division map compared with the corresponding comparison area division map.
[0012] Optionally, it also includes: an illumination module, an image processing module, a classification module and a data storage module; wherein the illumination module is used to provide an illumination light source for the surface of the capacitor to be inspected; the image processing module is used to preprocess the target image data; the classification module is used to sort defective capacitors from non-defective capacitors; and the data storage module is used to store the preset area division model, the preset comparison area division atlas and the inspection data of the capacitor to be inspected.
[0013] In a third aspect, the present invention further provides an electronic device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method provided in an embodiment of the present invention when executing the computer program.
[0014] In a fourth aspect, the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the method provided in the embodiment of the present invention is implemented.
[0015] The present invention provides a capacitor defect detection method and system, which can meet the detection needs of various types of capacitors, complete the detection task of capacitor defects based on different characteristics, effectively separate defective capacitors, improve the efficiency of capacitor production, and increase the qualified rate of products; at the same time, the ability of autonomous learning is enhanced, and each matching and detection is stored and analyzed as a kind of data, which is beneficial to future detection work, reduces labor costs and work intensity, improves the accuracy of defect detection, and alleviates the technical problems existing in the prior art of incompatibility with different types of capacitor detection and low accuracy of capacitor defect detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the implementation methods of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the specific implementation methods or the description of the prior art. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0017] Figure 1 A flowchart of a capacitor defect detection method provided by an embodiment of the present invention; Figure 2 A flowchart of defect detection for ceramic capacitors provided by an embodiment of the present invention; Figure 3 A flowchart of defect detection for aluminum electrolytic capacitors provided by an embodiment of the present invention; Figure 4 A flow chart of defect detection for tantalum capacitors provided by an embodiment of the present invention; Figure 5 A schematic diagram of a capacitor defect detection system provided by an embodiment of the present invention; Figure 6 A schematic diagram of a main control module provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0018] The following will provide a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0019] Example 1 Figure 1 FIG. 1 is a flow chart of a capacitor defect detection method according to an embodiment of the present invention. Figure 1 As shown, the method specifically includes the following steps: Step S102: acquiring target image data of the capacitor to be inspected.
[0020] Specifically, the target image data includes appearance images corresponding to different positions of the capacitor to be inspected. Optionally, the target image data is pre-processed.
[0021] Step S104 : identifying the target capacitance type of the capacitor to be inspected based on the target image data.
[0022] In an optional implementation provided by an embodiment of the present invention, identifying the target capacitance type of the capacitor to be detected includes any of the following: identifying the target capacitance type of the capacitor to be detected based on a template matching method, or identifying the target capacitance type of the capacitor to be detected based on a machine learning classifier.
[0023] Step S106 , performing region division on the target image data based on a preset region division model corresponding to the target capacitance type to obtain a plurality of region division maps.
[0024] Optionally, the region division method for the target image data includes: performing region division on the target image data based on any one of threshold segmentation, region segmentation, and edge segmentation.
[0025] Step S108: compare the multiple area division maps with each comparison area division map in the target comparison area division map. Figure 1 One by one, and compare them respectively.
[0026] Among them, the target comparison area division atlas is a preset comparison area division atlas corresponding to the target capacitance type among multiple preset comparison area division atlases; the target comparison area division atlas includes multiple comparison area division maps, and the area division models of the multiple comparison area division maps are consistent with the preset area division model corresponding to the target capacitance type.
[0027] Step S110, based on the comparison result of each area division map with the corresponding comparison area division map, determines whether the capacitor to be inspected has defects. Specifically, it includes the following steps: Determine whether the abnormal area ratio of the target area division map exceeds a preset threshold compared with the corresponding comparison area division map; the target area division map is one of the multiple area division maps; If not, it is determined that the capacitor to be tested does not have defects; If so, it is determined that the capacitor to be tested has a defect at a location corresponding to the target area division map.
[0028] In some optional implementations provided in the embodiments of the present invention, the target capacitor type includes a ceramic capacitor, an aluminum electrolytic capacitor, and a tantalum capacitor.
[0029] The preset comparison area division atlas corresponding to the ceramic capacitor includes the metal electrode division diagram on both sides of the capacitor and the capacitor body division diagram; The preset comparison area division atlas for aluminum electrolytic capacitors includes aluminum shell division diagram, rubber plug division diagram, and pin division diagram; The preset comparison area division atlas corresponding to tantalum capacitors includes a resin shell division map, an electrode division map, and a logo text division map.
[0030] Figure 2 FIG. 1 is a flow chart of defect detection for a ceramic capacitor according to an embodiment of the present invention. Figure 2 As shown in the figure, when the target capacitor type is a ceramic capacitor, the following steps are included: (1) Perform regional differentiation on the capacitor to be tested, dividing the ceramic capacitor into the metal electrodes on both sides of the capacitor and the body in the middle of the capacitor; (2) Calling the comparison area division diagram of ceramic capacitors with the same size package from the storage unit; (3) Make a one-to-one correspondence with the regional differentiation map to determine whether there is an abnormal area. If not, it is determined to be a finished product and enter the next process. If yes, it goes to step (4); (4) Determine whether the abnormality ratio of the corresponding abnormal area is within the preset threshold range. If it is within the preset threshold range, it is considered to be a semi-finished product and is picked out for repair; otherwise, it is considered to be a defective product and is discarded.
[0031] Figure 3 FIG. 1 is a flow chart of defect detection for aluminum electrolytic capacitors according to an embodiment of the present invention. Figure 3 As shown in the figure, when the target capacitor type is an aluminum electrolytic capacitor, the following steps are included: (1) Obtain target image data of aluminum electrolytic capacitors, including aluminum shells, rubber plugs, pins, etc. that represent the characteristics of aluminum electrolytic capacitors; (2) Divide the target image data of the aluminum electrolytic capacitor into regions to obtain a region division map; (3) Comparative area division diagram of aluminum electrolytic capacitors with the same size package called from the storage unit; (4) Make a one-to-one correspondence with the regional differentiation map to determine whether there is an abnormal area. If not, it is determined to be a finished product and enter the next process; if yes, it goes to step (5); (5) Determine what kind of defect the corresponding abnormality is, such as defects in the aluminum shell, pins, text, rubber plug, etc. Determine whether it can be repaired. If it can be repaired, it is considered a semi-finished product and is sorted out for repair; otherwise, it is considered a defective product and is discarded.
[0032] For example, repairable problems include large bending of pins and unclear text; unrepairable problems include leakage and bulging of the aluminum shell.
[0033] Figure 4 FIG. 1 is a flow chart of defect detection for tantalum capacitors according to an embodiment of the present invention. Figure 4 As shown in the figure, when the target capacitor type is a tantalum capacitor, the steps include: (1) Obtain an image of a tantalum capacitor, including the resin shell, electrodes, logo text, etc. that represent the characteristics of the tantalum capacitor; (2) Divide the target image data of the tantalum capacitor into regions to obtain a region division map; (3) Comparative area division diagram of tantalum capacitors with the same size package called from the memory cell; (4) Make a one-to-one correspondence with the regional differentiation map to determine whether there is an abnormal area. If not, it is determined to be a finished product and enter the next process; if yes, it goes to step (5); (5) Determine what kind of defect the corresponding abnormality is, such as defects in the resin shell, electrodes, etc. Determine whether it can be repaired. If it can be repaired, it is considered a semi-finished product and is sorted out for repair. Otherwise, it is considered a defective product and is discarded.
[0034] From the above description, it can be seen that the present invention provides a capacitor defect detection method that can meet the detection of various types of capacitors, complete the detection task of capacitor defects from different characteristics, effectively separate defective capacitors, improve the efficiency of capacitor production, and improve the qualified rate of products; at the same time, it increases the ability of autonomous learning, and stores and analyzes each matching and detection as a kind of data, which is beneficial to future detection work, reduces labor costs and work intensity, improves the accuracy of defect inspection, and alleviates the technical problems of the existing technology that is incompatible with different types of capacitor detection and the low accuracy of capacitor defect detection.
[0035] Example 2 Figure 5 FIG. 1 is a schematic diagram of a capacitor defect detection system according to an embodiment of the present invention. Figure 5 As shown, the system includes: an image acquisition module 10 and a main control module 20. Figure 6 FIG. 1 is a schematic diagram of a main control module provided according to an embodiment of the present invention. Figure 6 As shown, the main control module 20 further includes: an identification unit 21 , a division unit 22 , a comparison unit 23 and a detection unit 24 .
[0036] Specifically, the image acquisition module 10 is used to acquire target image data of the capacitor to be inspected; an identification unit 21 for identifying a target capacitance type of the capacitor to be detected based on the target image data; A division unit 22 is configured to divide the target image data into regions based on a preset region division model corresponding to the target capacitance type to obtain a plurality of region division maps; The comparison unit 23 is used to compare the plurality of region division maps with each comparison region division map in the target comparison region division map. Figure 1 One corresponds to another and is compared respectively; the target comparison area division atlas is a preset comparison area division atlas corresponding to the target capacitance type in multiple preset comparison area division atlases; the target comparison area division atlas includes multiple comparison area division maps, and the area division models of the multiple comparison area division maps are consistent with the preset area division model corresponding to the target capacitance type; The detection unit 24 is configured to determine whether the capacitor to be detected has defects based on a comparison result of each region division diagram with the corresponding comparison region division diagram.
[0037] Specifically, the main control module 20 includes a computer.
[0038] Specifically, if Figure 5 As shown, it also includes: an illumination module 30, an image processing module 40, a classification module 50 and a data storage module 60.
[0039] Specifically, the lighting module 30 is used to provide a light source for illuminating the surface of the capacitor to be inspected. Optionally, the lighting module 30 includes six lighting devices that can provide supplemental light in six directions (front, back, left, right, top, and bottom) of the capacitor to be inspected, ensuring that the data captured by the image acquisition module 10 is clear and accurate, thereby improving the image quality.
[0040] The image processing module 40 is used to pre-process the target image data to obtain a pre-processed image, such as a grayscale image, a size image, or various image details.
[0041] The classification module 50 is used to sort defective capacitors from non-defective capacitors. Optionally, the classification module 50 includes multiple sorting devices, each corresponding to a different capacitor category. For example, the sorting devices are used to classify capacitors into finished, defective, and semi-qualified products. When defective products are found in the current inspection process, they can be smoothly diverted out of the processing station, thereby preventing them from flowing into the next process for further processing. This greatly improves the assembly yield rate of capacitors, allows semi-qualified products to continue to be processed, reduces the number of finished products, and reduces the scrap rate.
[0042] The data storage module 60 is used to store the preset region division model, the preset comparison region division atlas, and the test data of the capacitor to be tested. For example, the data storage module 60 stores data models of different types of capacitors and a database of historically monitored defective capacitors. This provides data support for subsequent data comparison and autonomous learning, thereby improving the efficiency of capacitor defect detection.
[0043] Alternatively, as Figure 5 As shown, a display module 70 is also included for video monitoring of the assembly line operation.
[0044] The present invention also provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method provided in the embodiment of the present invention when executing the computer program.
[0045] The present invention also provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed by a processor, the method provided in the embodiment of the present invention is implemented.
[0046] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above and that the invention can be embodied in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be considered in all respects as illustrative and non-restrictive, and the scope of the invention is defined by the appended claims, not the foregoing description, and all variations within the meaning and range of equivalents of the claims are intended to be included therein. Any reference sign in a claim should not be construed as limiting the claim to which it relates.
[0047] In addition, it should be understood that although this specification is described in terms of implementation methods, not every implementation method contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.
Claims
1. A capacitor defect detection method, characterized in that: include: Acquiring target image data of the capacitor to be inspected; identifying a target capacitance type of the capacitor to be inspected based on the target image data; Performing region division on the target image data based on a preset region division model corresponding to the target capacitance type to obtain a plurality of region division maps; The multiple region division maps are matched one by one with each comparison region division map in a target comparison region division map set, and are compared respectively; the target comparison region division map set is a preset comparison region division map set corresponding to the target capacitance type in a plurality of preset comparison region division maps; the target comparison region division map set includes multiple comparison region division maps, and the region division models of the multiple comparison region division maps are consistent with the preset region division model corresponding to the target capacitance type; Based on the comparison result of each region division diagram with the corresponding comparison region division diagram, it is determined whether the capacitor to be inspected has a defect.
2. The method according to claim 1, wherein: The target image data includes appearance images corresponding to different positions of the capacitor to be inspected.
3. The method according to claim 1, wherein: Identifying the target capacitance type of the capacitor to be detected includes any one of the following: identifying the target capacitance type of the capacitor to be detected based on a template matching method, or identifying the target capacitance type of the capacitor to be detected based on a machine learning classifier.
4. The method according to claim 1, wherein: The target capacitor types include ceramic capacitors, aluminum electrolytic capacitors, and tantalum capacitors; The preset comparison area division atlas corresponding to the ceramic capacitor includes a division diagram of the metal electrodes on both sides of the capacitor and a division diagram of the middle body of the capacitor; The preset comparison area division atlas corresponding to the aluminum electrolytic capacitor includes an aluminum shell division map, a rubber plug division map, and a pin division map; The preset comparison area division atlas corresponding to the tantalum capacitor includes a resin shell division map, an electrode division map and a logo text division map.
5. The method according to claim 1, wherein: The target image data is divided into regions, including: dividing the target image data into regions based on any one of threshold segmentation, region segmentation, and edge segmentation.
6. The method according to claim 1, wherein: Determining whether the capacitor to be inspected has a defect based on a comparison result of each region division diagram with a corresponding comparison region division diagram includes: Determine whether the abnormal area ratio of the target area division map exceeds a preset threshold compared with the corresponding comparison area division map; the target area division map is one of the multiple area division maps; If not, it is determined that the capacitor to be tested does not have defects; If so, it is determined that the capacitor to be inspected has a defect at a location corresponding to the target area division map.
7. A capacitor defect detection system, characterized in that: include: An image acquisition module and a main control module; wherein the main control module further comprises: a recognition unit, a division unit, a comparison unit and a detection unit; The image acquisition module is used to acquire target image data of the capacitor to be detected; The identification unit is configured to identify a target capacitance type of the capacitor to be detected based on the target image data; The division unit is configured to divide the target image data into regions based on a preset region division model corresponding to the target capacitance type to obtain a plurality of region division maps; The comparison unit is configured to correspond the multiple region division maps to each comparison region division map in a target comparison region division map set, and compare them respectively; the target comparison region division map set is a preset comparison region division map set corresponding to the target capacitance type in a plurality of preset comparison region division maps; the target comparison region division map set includes multiple comparison region division maps, and the region division models of the multiple comparison region division maps are consistent with the preset region division model corresponding to the target capacitance type; The detection unit is used to determine whether the capacitor to be detected has a defect based on a comparison result of each area division map with a corresponding comparison area division map.
8. The system according to claim 7, characterized in that: Also includes: Lighting module, image processing module, classification module and data storage module; wherein, The lighting module is used to provide an illumination light source for the surface of the capacitor to be tested; The image processing module is used to pre-process the target image data; The classification module is used to sort defective capacitors from non-defective capacitors; The data storage module is used to store the preset area division model, the preset comparison area division atlas and the detection data of the capacitor to be detected.
9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.