A method and device for defect detection of ceramic capacitors

Through automated image comparison and grayscale abnormality detection methods, the problem of ceramic capacitor appearance detection relying on manual vision is solved, high-precision and high-speed defect detection is achieved, and the safety and qualification rate of the product are improved.

CN119086596BActive Publication Date: 2025-02-07SHENZHEN EYANG TECH DEV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411579721.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-02-07
Estimated Expiration
2044-11-07

AI Technical Summary

Technical Problem

In the prior art, the appearance detection of ceramic capacitors mainly relies on artificial visual methods, resulting in low recognition accuracy and speed, high misjudgment rate, and inability to effectively detect appearance defects in different positions and properties of ceramic capacitors.

Method used

An automated defect detection method is adopted to determine whether there is an appearance defect by acquiring the appearance image of a ceramic capacitor and comparing it with the image of a normal ceramic capacitor, the grayscale abnormality area and similarity in the image are detected.

Benefits of technology

It realizes high-precision and high-speed appearance defect detection of ceramic capacitors, reduces the misjudgment rate, and improves the product's pass rate and safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119086596B_ABST
    Figure CN119086596B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a defect detection method and system for ceramic capacitors, the method comprising: obtaining an appearance image of a target ceramic capacitor corresponding to the target ceramic capacitor; obtaining an appearance image of a target normal ceramic capacitor corresponding to a target normal ceramic capacitor with normal appearance; dividing the appearance image of the target normal ceramic capacitor and the appearance image of the target ceramic capacitor into the same detection area; judging whether the grayscale abnormal area of ​​the target ceramic capacitor can be detected in the appearance image of the target ceramic capacitor; if so, judging whether the similarity between the grayscale abnormal area of ​​the target ceramic capacitor and the grayscale corresponding area of ​​the target normal ceramic capacitor is less than or equal to the appearance sub-area similarity threshold of the target ceramic capacitor; if so, judging that the appearance of the target ceramic capacitor has defects. The present invention can detect the appearance defects of ceramic capacitors, and the detection method is simple and has high accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of appearance defect detection and processing, and in particular to a defect detection method and device for ceramic capacitors. Background Art

[0002] Ceramic capacitors (ceramic capacitor; ceramic condenser) are also called ceramic capacitors or monolithic capacitors. As the name suggests, ceramic capacitors are capacitors whose dielectric material is ceramic. At present, the appearance inspection of ceramic capacitors is mainly achieved by manual visual methods. However, ceramic capacitors are prone to various defects of different positions and properties during the production process. If they are only detected and identified by the naked eye, the recognition accuracy and speed will be relatively low, and there will be a high misjudgment rate, which will greatly reduce the qualified rate of the product. Once a defective ceramic capacitor is put into use, it will affect the safety factor and service life of the corresponding product, causing huge safety hazards and economic losses. Some existing ceramic capacitor defect detection methods are mainly aimed at the internal defect detection of capacitors. There is no all-round appearance defect detection technology for finished ceramic capacitors of different sizes and specifications. Summary of the invention

[0003] Based on this, it is necessary to propose a defect detection method and device for ceramic capacitors to address the above-mentioned problems and solve the following problems in the prior art: At present, the appearance inspection of ceramic capacitors is mainly achieved by manual visual methods, and ceramic capacitors are prone to multiple defects of different positions and properties during the production process. If they only rely on manual inspection and identification with the naked eye, the recognition accuracy and speed will be relatively low, and there will be a high misjudgment rate.

[0004] The first technical solution of the embodiment of the present invention is:

[0005] A defect detection method for ceramic capacitors, used for appearance defect detection corresponding to ceramic capacitors, comprising: obtaining an appearance image of a target ceramic capacitor corresponding to a target ceramic capacitor to be detected with an appearance defect, wherein the appearance image of the target ceramic capacitor to be detected is a surface area image corresponding to the target ceramic capacitor to be detected; obtaining an appearance image of a target normal ceramic capacitor corresponding to a target normal ceramic capacitor with a normal appearance, wherein the type and size of the target ceramic capacitor to be detected with an appearance defect and the target normal ceramic capacitor are the same; respectively dividing the appearance image of the target normal ceramic capacitor and the appearance image of the target ceramic capacitor to be detected into the same detection area, and each detection area of ​​the appearance image of the target normal ceramic capacitor and the appearance image of the target ceramic capacitor to be detected is matched one by one. Should; determine whether a grayscale abnormal area of ​​the target ceramic capacitor to be tested can be detected in the appearance image of the target ceramic capacitor to be tested, wherein the absolute value of the grayscale difference between the grayscale value corresponding to the grayscale abnormal area of ​​the target ceramic capacitor to be tested and the grayscale value of any adjacent detection area is greater than the target preset grayscale difference threshold; if so, determine whether the similarity between the grayscale abnormal area of ​​the target ceramic capacitor to be tested and the grayscale corresponding area of ​​the target normal ceramic capacitor is less than or equal to the appearance sub-area similarity threshold of the target ceramic capacitor to be tested, wherein the grayscale corresponding area of ​​the target normal ceramic capacitor is the area on the appearance image of the target normal ceramic capacitor corresponding to the position of the grayscale abnormal area of ​​the target ceramic capacitor to be tested; if so, determine that the appearance of the target ceramic capacitor to be tested with an appearance defect to be detected has a defect.

[0006] The second technical solution of the embodiment of the present invention is:

[0007] A defect detection device for ceramic capacitors, used for appearance defect detection corresponding to ceramic capacitors, comprising: a first image acquisition module, used to acquire an appearance image of a target ceramic capacitor corresponding to a target ceramic capacitor to be tested with an appearance defect to be detected, wherein the appearance image of the target ceramic capacitor to be tested is a surface area image corresponding to the target ceramic capacitor to be tested; a second image acquisition module, used to acquire an appearance image of a target normal ceramic capacitor corresponding to a target normal ceramic capacitor with a normal appearance, wherein the type and size of the target ceramic capacitor to be tested with an appearance defect to be detected and the target normal ceramic capacitor are the same; an image area division module, used to divide the appearance image of the target normal ceramic capacitor and the appearance image of the target ceramic capacitor to be tested into the same detection area, wherein the appearance image of the target normal ceramic capacitor and the appearance image of the target ceramic capacitor to be tested have a one-to-one correspondence between the respective detection areas; an image grayscale judgment module, used to judge whether the grayscale of the target ceramic capacitor to be tested can be detected in the appearance image of the target ceramic capacitor to be tested. an abnormal grayscale area, wherein the absolute value of the grayscale difference between the grayscale value corresponding to the abnormal grayscale area of ​​the target ceramic capacitor to be tested and the grayscale value of any adjacent detection area is greater than a preset grayscale difference threshold of the target; an image abnormality judgment module, used to judge whether the similarity between the abnormal grayscale area of ​​the target ceramic capacitor to be tested and the grayscale corresponding area of ​​the target normal ceramic capacitor is less than or equal to the similarity threshold of the appearance sub-area of ​​the target ceramic capacitor to be tested when the abnormal grayscale area of ​​the target ceramic capacitor to be tested can be detected in the appearance image of the target ceramic capacitor to be tested, wherein the grayscale corresponding area of ​​the target normal ceramic capacitor is an area on the appearance image of the target normal ceramic capacitor corresponding to the position of the abnormal grayscale area of ​​the target ceramic capacitor to be tested; a detection result judgment module, used to judge that the appearance of the target ceramic capacitor to be tested with an appearance defect is defective when the similarity between the abnormal grayscale area of ​​the target ceramic capacitor to be tested and the grayscale corresponding area of ​​the target normal ceramic capacitor is less than or equal to the similarity threshold of the appearance sub-area of ​​the target ceramic capacitor to be tested.

[0008] The third technical solution of the embodiment of the present invention is:

[0009] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the following steps:

[0010] Obtain an appearance image of a target ceramic capacitor to be tested corresponding to a target ceramic capacitor to be tested with an appearance defect to be detected, wherein the appearance image of the target ceramic capacitor to be tested is a surface area image corresponding to the target ceramic capacitor to be tested; obtain an appearance image of a target normal ceramic capacitor corresponding to a target normal ceramic capacitor with a normal appearance, wherein the type and size of the target ceramic capacitor to be tested with an appearance defect to be detected and the target normal ceramic capacitor are the same; respectively divide the appearance image of the target normal ceramic capacitor and the appearance image of the target ceramic capacitor to be tested into the same detection area, wherein the appearance image of the target normal ceramic capacitor and the appearance image of the target ceramic capacitor to be tested correspond to each detection area one by one; determine the appearance image of the target ceramic capacitor to be tested. Whether a grayscale abnormal area of ​​the target ceramic capacitor to be tested can be detected in the image, wherein the absolute value of the grayscale difference between the grayscale value corresponding to the grayscale abnormal area of ​​the target ceramic capacitor to be tested and the grayscale value of any adjacent detection area is greater than the target preset grayscale difference threshold; if so, then determine whether the similarity between the grayscale abnormal area of ​​the target ceramic capacitor to be tested and the grayscale corresponding area of ​​the target normal ceramic capacitor is less than or equal to the appearance sub-area similarity threshold of the target ceramic capacitor to be tested, wherein the grayscale corresponding area of ​​the target normal ceramic capacitor is the area on the appearance image of the target normal ceramic capacitor corresponding to the position of the grayscale abnormal area of ​​the target ceramic capacitor to be tested; if so, then determine that the appearance of the target ceramic capacitor to be tested with appearance defects to be detected has defects.

[0011] The fourth technical solution of the embodiment of the present invention is:

[0012] A computer-readable storage medium stores a computer program, which, when executed by a processor, causes the processor to perform the following steps:

[0013] Obtain an appearance image of a target ceramic capacitor to be tested corresponding to a target ceramic capacitor to be tested with an appearance defect to be detected, wherein the appearance image of the target ceramic capacitor to be tested is a surface area image corresponding to the target ceramic capacitor to be tested; obtain an appearance image of a target normal ceramic capacitor corresponding to a target normal ceramic capacitor with a normal appearance, wherein the type and size of the target ceramic capacitor to be tested with an appearance defect to be detected and the target normal ceramic capacitor are the same; respectively divide the appearance image of the target normal ceramic capacitor and the appearance image of the target ceramic capacitor to be tested into the same detection area, wherein the appearance image of the target normal ceramic capacitor and the appearance image of the target ceramic capacitor to be tested correspond to each detection area one by one; determine the appearance image of the target ceramic capacitor to be tested. Whether a grayscale abnormal area of ​​the target ceramic capacitor to be tested can be detected in the image, wherein the absolute value of the grayscale difference between the grayscale value corresponding to the grayscale abnormal area of ​​the target ceramic capacitor to be tested and the grayscale value of any adjacent detection area is greater than the target preset grayscale difference threshold; if so, then determine whether the similarity between the grayscale abnormal area of ​​the target ceramic capacitor to be tested and the grayscale corresponding area of ​​the target normal ceramic capacitor is less than or equal to the appearance sub-area similarity threshold of the target ceramic capacitor to be tested, wherein the grayscale corresponding area of ​​the target normal ceramic capacitor is the area on the appearance image of the target normal ceramic capacitor corresponding to the position of the grayscale abnormal area of ​​the target ceramic capacitor to be tested; if so, then determine that the appearance of the target ceramic capacitor to be tested with appearance defects to be detected has defects.

[0014] The embodiments of the present invention have the following beneficial effects:

[0015] The present invention first obtains the appearance image of the target ceramic capacitor to be tested corresponding to the target ceramic capacitor to be tested with an appearance defect to be detected, then obtains the appearance image of the target normal ceramic capacitor corresponding to the target normal ceramic capacitor with a normal appearance, and then respectively divides the appearance image of the target normal ceramic capacitor and the appearance image of the target ceramic capacitor to be tested into the same detection area, and then determines whether the grayscale abnormal area of ​​the target ceramic capacitor to be tested can be detected in the appearance image of the target ceramic capacitor to be tested. If so, it further determines whether the similarity between the grayscale abnormal area of ​​the target ceramic capacitor to be tested and the grayscale corresponding area of ​​the target normal ceramic capacitor is less than or equal to the appearance sub-area similarity threshold of the target ceramic capacitor to be tested. Finally, when the similarity between the grayscale abnormal area of ​​the target ceramic capacitor to be tested and the grayscale corresponding area of ​​the target normal ceramic capacitor is less than or equal to the appearance sub-area similarity threshold of the target ceramic capacitor to be tested, it is determined that the appearance of the target ceramic capacitor to be tested with an appearance defect to be detected has a defect, and the appearance defect of the ceramic capacitor can be detected, and the detection method is simple and has high accuracy. The present invention does not need to detect the appearance defects of ceramic capacitors by manual visual methods, and can detect a variety of appearance defects of different positions and properties of ceramic capacitors. The recognition accuracy and recognition speed are relatively high, and there will be no problem of misjudgment. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0017] in:

[0018] Figure 1 is a flowchart of a defect detection method for a ceramic capacitor in one embodiment;

[0019] Figure 2 A schematic diagram of a defect detection device for a ceramic capacitor according to an embodiment of the present invention;

[0020] Figure 3 FIG. 4 is a structural block diagram of a computer device in one embodiment. DETAILED DESCRIPTION

[0021] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0022] See also Figure 1 , combined with Figure 1 It can be obtained that a defect detection method for a ceramic capacitor according to an embodiment of the present invention is used for appearance defect detection corresponding to a ceramic capacitor, and includes the following steps:

[0023] Step S101: obtaining an appearance image of a target ceramic capacitor to be tested corresponding to a target ceramic capacitor to be tested having appearance defects to be detected, wherein the appearance image of the target ceramic capacitor to be tested is an image of the (entire) surface area corresponding to the target ceramic capacitor to be tested.

[0024] Among them, the appearance image of the target ceramic capacitor to be tested is an image obtained by photographing the appearance surface of the target ceramic capacitor to be tested, and the appearance image of the target ceramic capacitor to be tested is obtained by full appearance scanning. The shooting directions of the target ceramic capacitor to be tested include shooting the bottom convexity, shooting the rubber cover convexity and the rubber cover tilt, shooting the extreme deviation and shooting the extreme reverse, and the exposure time for each shooting is at least 100ms.

[0025] Step S102: obtaining a target normal ceramic capacitor appearance image corresponding to a target normal ceramic capacitor with normal appearance, wherein the target ceramic capacitor to be tested with appearance defects to be detected and the target normal ceramic capacitor are of the same type and size.

[0026] Among them, optionally, the appearance image of the target normal ceramic capacitor can be acquired in advance, and the appearance image of the target normal ceramic capacitor is an image obtained by photographing the appearance surface of the target normal ceramic capacitor with normal appearance. The appearance image of the target normal ceramic capacitor is acquired by a full appearance scanning method, and the shooting directions of the target normal ceramic capacitor include shooting the bottom convexity, shooting the rubber cover convexity and the rubber cover tilt, shooting the extreme deviation and shooting the extreme reverse, and the exposure time for each shooting is at least 100ms.

[0027] Among them, because the type and size of the target ceramic capacitor to be tested with appearance defects to be detected and the target normal ceramic capacitor are the same, the size of the target normal ceramic capacitor appearance image and the target ceramic capacitor appearance image to be tested are also the same, the size of each detection area is also the same and corresponds to each other, and the corresponding area between the target normal ceramic capacitor appearance image and the target ceramic capacitor appearance image to be tested has a very suitable comparability.

[0028] Step S103: respectively dividing the target normal ceramic capacitor appearance image and the target to-be-tested ceramic capacitor appearance image into the same detection area, wherein the target normal ceramic capacitor appearance image and the target to-be-tested ceramic capacitor appearance image have a one-to-one correspondence with each other in each detection area.

[0029] Wherein, each detection area of ​​the target normal ceramic capacitor appearance image and the target to-be-tested ceramic capacitor appearance image includes a pin area image, a rubber cover area image and a rubber tube area image.

[0030] Among them, the target normal ceramic capacitor appearance image and the target ceramic capacitor appearance image to be tested are respectively divided into the same detection area, that is, the detection area of ​​the target normal ceramic capacitor appearance image is divided in the same way as the detection area of ​​the target ceramic capacitor appearance image to be tested.

[0031] Step S104: Determine whether a grayscale abnormal area of ​​the target ceramic capacitor to be tested can be detected in the appearance image of the target ceramic capacitor to be tested, wherein the absolute value of the grayscale difference between the grayscale value corresponding to the grayscale abnormal area of ​​the target ceramic capacitor to be tested and the grayscale value of any adjacent detection area is greater than the target preset grayscale difference threshold.

[0032] Among them, the grayscale abnormal area of ​​the target ceramic capacitor to be tested is a detection area within the appearance image of the target ceramic capacitor to be tested, and the grayscale abnormality means that its grayscale value is too different from the grayscale value of the surrounding adjacent areas. The target preset grayscale difference threshold is an empirical threshold and is not limited here. When the absolute value of the grayscale difference between the grayscale value corresponding to the grayscale abnormal area of ​​the target ceramic capacitor to be tested and the grayscale value of any adjacent detection area is greater than the target preset grayscale difference threshold, it means that the grayscale abnormal area of ​​the target ceramic capacitor to be tested may have defects.

[0033] Step S105: If an abnormal grayscale area of ​​the target ceramic capacitor to be tested can be detected in the appearance image of the target ceramic capacitor to be tested, determine whether the similarity between the abnormal grayscale area of ​​the target ceramic capacitor to be tested and the corresponding grayscale area of ​​the target normal ceramic capacitor is less than or equal to the similarity threshold of the appearance sub-area of ​​the target ceramic capacitor to be tested, wherein the corresponding grayscale area of ​​the target normal ceramic capacitor is an area on the appearance image of the target normal ceramic capacitor corresponding to the position of the abnormal grayscale area of ​​the target ceramic capacitor to be tested.

[0034] Among them, if the grayscale abnormal area of ​​the target ceramic capacitor to be tested can be detected in the appearance image of the target ceramic capacitor to be tested, it cannot be determined that the grayscale abnormal area of ​​the target ceramic capacitor to be tested is the defective area, and further judgment is required because there may be shooting problems or other problems. Among them, the similarity threshold of the appearance sub-area of ​​the target ceramic capacitor to be tested is an empirical threshold and is not limited here.

[0035] Step S106: If the similarity between the grayscale abnormal area of ​​the target ceramic capacitor to be tested and the grayscale corresponding area of ​​the target normal ceramic capacitor is less than or equal to the appearance sub-area similarity threshold of the target ceramic capacitor to be tested, it is determined that the appearance of the target ceramic capacitor to be tested has a defect.

[0036] The similarity threshold of the appearance sub-region of the target ceramic capacitor to be tested is an empirical threshold and is not limited here.

[0037] Among them, the grayscale abnormal area of ​​the target ceramic capacitor to be tested and the grayscale corresponding area of ​​the target normal ceramic capacitor are corresponding areas to each other. When the grayscale corresponding area of ​​the target normal ceramic capacitor is used as a standard, if the similarity between the grayscale abnormal area of ​​the target ceramic capacitor to be tested and the grayscale corresponding area of ​​the target normal ceramic capacitor is less than or equal to the similarity threshold of the appearance sub-area of ​​the target ceramic capacitor to be tested, it means that the appearance of the target ceramic capacitor to be tested with appearance defects to be detected has defects.

[0038] In this embodiment, optionally, the target normal ceramic capacitor appearance image and the target to-be-tested ceramic capacitor appearance image are respectively divided into the same detection areas, and the target normal ceramic capacitor appearance image and the target to-be-tested ceramic capacitor appearance image correspond one-to-one to each detection area, including:

[0039] First, the appearance image of the target normal ceramic capacitor is divided into multiple target normal ceramic capacitor mother areas, and each of the target normal ceramic capacitor mother areas is divided into multiple target normal ceramic capacitor sub-areas; wherein the absolute value of the grayscale difference between any two of the target normal ceramic capacitor sub-areas within each of the target normal ceramic capacitor mother areas is less than or equal to the target preset grayscale difference threshold.

[0040] The target preset grayscale difference threshold is an empirical threshold and is not limited here. When the absolute value of the grayscale difference between any two target normal ceramic capacitor sub-regions in each target normal ceramic capacitor mother region is less than or equal to the target preset grayscale difference threshold, it means that the grayscale values ​​corresponding to all the target normal ceramic capacitor sub-regions in each target normal ceramic capacitor mother region are almost the same, and the difference in grayscale values ​​between them can be ignored.

[0041] Second, according to the area division method corresponding to the target normal ceramic capacitor appearance image, the target ceramic capacitor to be tested appearance image is divided into multiple target ceramic capacitor to be tested appearance mother areas, and each of the target ceramic capacitor to be tested appearance mother areas is divided into multiple target ceramic capacitor to be tested appearance sub-areas, wherein the multiple target ceramic capacitor to be tested appearance mother areas correspond one-to-one to the multiple target normal ceramic capacitor mother areas, and the multiple target ceramic capacitor to be tested appearance sub-areas within each target ceramic capacitor to be tested appearance mother area correspond one-to-one to the multiple target normal ceramic capacitor sub-areas within each corresponding target normal ceramic capacitor mother area.

[0042] For example, the target normal ceramic capacitor appearance image includes different A detection areas, B detection areas and C detection areas, and the target to-be-tested ceramic capacitor appearance image includes different D detection areas, E detection areas and F detection areas, wherein the A detection area and the D detection area are of the same size and represent the same appearance part of the ceramic capacitor; wherein the B detection area and the E detection area are of the same size and represent the same appearance part of the ceramic capacitor; wherein the C detection area and the F detection area are of the same size and represent the same appearance part of the ceramic capacitor. In addition, each detection area can be divided into a plurality of small detection areas, and the target normal ceramic capacitor appearance image and the small detection areas of the target to-be-tested ceramic capacitor appearance image are also one-to-one corresponding. For example, the A detection area corresponds to the D detection area, the A detection area includes 10 detection areas a1 to a10, and the D detection area includes 10 detection areas d1 to d10, then the 10 detection areas a1 to a10 and the 10 detection areas d1 to d10 are one-to-one corresponding, and their positions, sizes and shapes are one-to-one corresponding.

[0043] For example, in step S105, if the grayscale abnormal area of ​​the target ceramic capacitor to be tested is in the A detection area of ​​the target ceramic capacitor appearance image to be tested, then the grayscale corresponding area of ​​the target normal ceramic capacitor is in the D detection area of ​​the target normal ceramic capacitor appearance image.

[0044] In this embodiment, optionally, the determining whether a grayscale abnormal region of the target ceramic capacitor to be tested can be detected in the appearance image of the target ceramic capacitor to be tested includes:

[0045] First, determine whether the target abnormal ceramic capacitor to be tested appearance mother area can be detected in each of the target ceramic capacitor to be tested appearance mother areas, wherein the target abnormal ceramic capacitor to be tested appearance sub-area can be detected in the target abnormal ceramic capacitor to be tested appearance mother area, and the grayscale value corresponding to the target abnormal ceramic capacitor to be tested appearance sub-area is the target abnormal sub-area grayscale value; wherein, in the target abnormal ceramic capacitor to be tested appearance mother area, the absolute value of the grayscale difference between the grayscale value of any one of the target ceramic capacitor to be tested appearance sub-area and the grayscale value of the target abnormal sub-area to be tested is greater than the target preset grayscale difference threshold, that is, the grayscale value of the target abnormal ceramic capacitor to be tested appearance sub-area (the target abnormal sub-area grayscale value) and the grayscale value of any one of the target ceramic capacitor to be tested appearance sub-area within the target abnormal ceramic capacitor to be tested appearance mother area are greatly different.

[0046] Among them, if the target abnormal ceramic capacitor to be tested appearance mother area can be detected in the target abnormal ceramic capacitor to be tested appearance mother area, it means that the target abnormal ceramic capacitor to be tested appearance sub-area can be detected in the target abnormal ceramic capacitor to be tested appearance mother area.

[0047] Second, if the target abnormal ceramic capacitor to be tested appearance mother area can be detected in each of the target ceramic capacitor to be tested appearance mother areas, then it is determined that the target ceramic capacitor to be tested grayscale abnormal area can be detected in the appearance image of the target ceramic capacitor to be tested; otherwise, it is determined that the target ceramic capacitor to be tested grayscale abnormal area cannot be detected in the appearance image of the target ceramic capacitor to be tested.

[0048] In this embodiment, optionally, the determining whether the similarity between the grayscale abnormal region of the target ceramic capacitor to be tested and the grayscale corresponding region of the target normal ceramic capacitor is less than or equal to the similarity threshold of the appearance sub-region of the target ceramic capacitor to be tested, wherein the grayscale corresponding region of the target normal ceramic capacitor is a region on the appearance image of the target normal ceramic capacitor corresponding to the position of the grayscale abnormal region of the target ceramic capacitor to be tested, includes:

[0049] First, according to the position of the target abnormal ceramic capacitor appearance sub-region to be tested within the target ceramic capacitor appearance image to be tested, the target normal comparison ceramic capacitor appearance sub-region corresponding to the target normal ceramic capacitor appearance image is obtained, wherein the positions of the target abnormal ceramic capacitor appearance sub-region to be tested and the target normal comparison ceramic capacitor appearance sub-region correspond to each other.

[0050] If the target abnormal ceramic capacitor appearance sub-region to be tested is the d1 detection region, then the target normal comparison ceramic capacitor appearance sub-region is the a1 detection region, and the rest are analogous.

[0051] Second, determine whether the similarity between the appearance sub-region of the target abnormal ceramic capacitor to be tested and the appearance sub-region of the target normal comparison ceramic capacitor is less than or equal to a similarity threshold of the appearance sub-region of the target ceramic capacitor to be tested.

[0052] The similarity threshold of the appearance sub-region of the target ceramic capacitor to be tested is an empirical threshold and is not limited here.

[0053] Third, if the similarity between the appearance sub-region of the target abnormal ceramic capacitor to be tested and the appearance sub-region of the target normal comparison ceramic capacitor is less than or equal to the similarity threshold of the appearance sub-region of the target ceramic capacitor to be tested, then it is determined that the similarity between the grayscale abnormal region of the target ceramic capacitor to be tested and the grayscale corresponding region of the target normal ceramic capacitor is less than or equal to the similarity threshold of the appearance sub-region of the target ceramic capacitor to be tested.

[0054] In this embodiment, optionally, the step of acquiring the target normal ceramic capacitor appearance image corresponding to the target normal ceramic capacitor having a normal appearance includes:

[0055] First, determine whether the target ceramic capacitor to be tested has an appearance image resolution greater than a target preset ceramic capacitor appearance image resolution threshold, wherein the target ceramic capacitor to be tested has an appearance image resolution corresponding to the target ceramic capacitor to be tested.

[0056] The target preset ceramic capacitor appearance image resolution threshold is an empirical threshold and is not limited here.

[0057] Among them, only when the resolution of the appearance image of the target ceramic capacitor to be tested is greater than the target preset ceramic capacitor appearance image resolution threshold can the image detection be guaranteed to be error-free. However, some appearance defect detection methods in the prior art ignore the resolution of the detection image. This step first detects the resolution corresponding to the appearance image of the target ceramic capacitor to be tested, and then performs the corresponding grayscale detection, which can more accurately detect the appearance defects of the target ceramic capacitor to be tested.

[0058] Image resolution refers to the number of pixels per unit length of an image, usually measured in pixels per inch (ppi). The resolution directly affects the quality of the image. High-resolution images can present more details, while low-resolution images may appear rough.

[0059] Second, if the appearance image resolution of the target ceramic capacitor to be tested is greater than the appearance image resolution threshold of the target preset ceramic capacitor, then the step of obtaining the appearance image of the target normal ceramic capacitor corresponding to the target normal ceramic capacitor with normal appearance is entered.

[0060] Third, if the target ceramic capacitor to be tested appearance image resolution is less than or equal to the target preset ceramic capacitor appearance image resolution threshold, then re-enter the step of acquiring the target ceramic capacitor to be tested appearance image corresponding to the target ceramic capacitor to be tested with appearance defects to be detected.

[0061] In this embodiment, optionally, before judging whether the target abnormal ceramic capacitor to be tested appearance sub-region can be detected in each target ceramic capacitor to be tested appearance mother region, the method includes:

[0062] The appearance image of the target ceramic capacitor to be tested is gray-scaled to obtain grayscale values ​​corresponding to all appearance sub-regions of the target ceramic capacitor to be tested.

[0063] Grayscale refers to the color depth in black and white images. Each pixel is generally stored in one byte, ranging from 0 to 255, with a total of 256 grayscale levels. Grayscale values ​​are due to the different colors and brightness of each point in the scene. On black and white photos or black and white images reproduced by TV receivers, each point presents different degrees of gray. After the grayscale value is quantized, 0 represents black, 255 represents white, and the intermediate values ​​represent different degrees of gray.

[0064] Among them, grayscale processing is a technology that converts a color image into a grayscale image, in which each pixel of the grayscale image has only one grayscale value (also called intensity value or brightness value), usually ranging from 0 to 255. When the grayscale value is 255, the pixel is the brightest (pure white); when the grayscale value is 0, the pixel is the darkest (pure black). The main benefits of grayscale processing include reducing memory usage and increasing processing speed. At the same time, by reducing color information, the contrast can be visually enhanced to highlight the target area.

[0065] In this embodiment, optionally, the determining whether the similarity between the appearance sub-region of the target abnormal ceramic capacitor to be tested and the appearance sub-region of the target normal comparison ceramic capacitor is less than or equal to a similarity threshold of the appearance sub-region of the target ceramic capacitor to be tested comprises:

[0066] If the similarity between the appearance sub-region of the target abnormal ceramic capacitor to be tested and the appearance sub-region of the target normal comparison ceramic capacitor is greater than the appearance sub-region similarity threshold of the target ceramic capacitor to be tested, it is determined that the appearance of the target ceramic capacitor to be tested with an appearance defect to be detected does not have a defect.

[0067] See also Figure 2 , combined with Figure 2 It can be seen that a defect detection device 100 for a ceramic capacitor according to an embodiment of the present invention is used for appearance defect detection corresponding to a ceramic capacitor, and includes:

[0068] A first image acquisition module 10 is used to acquire an appearance image of a target ceramic capacitor to be tested corresponding to a target ceramic capacitor to be tested for appearance defects to be detected, wherein the appearance image of the target ceramic capacitor to be tested is a surface area image corresponding to the target ceramic capacitor to be tested;

[0069] A second image acquisition module 20 is used to acquire an appearance image of a target normal ceramic capacitor corresponding to a target normal ceramic capacitor with a normal appearance, wherein the target ceramic capacitor to be tested with an appearance defect to be detected and the target normal ceramic capacitor are of the same type and size;

[0070] An image region division module 30 is used to divide the target normal ceramic capacitor appearance image and the target to-be-tested ceramic capacitor appearance image into the same detection region, and each detection region of the target normal ceramic capacitor appearance image and the target to-be-tested ceramic capacitor appearance image corresponds one to one;

[0071] An image grayscale judgment module 40 is used to judge whether a grayscale abnormal region of the target ceramic capacitor to be tested can be detected in the appearance image of the target ceramic capacitor to be tested, wherein the absolute value of the grayscale difference between the grayscale value corresponding to the grayscale abnormal region of the target ceramic capacitor to be tested and the grayscale value of any adjacent detection region is greater than a target preset grayscale difference threshold;

[0072] The image abnormality judgment module 50 is used to judge whether the similarity between the target to-be-tested ceramic capacitor grayscale abnormal region and the target normal ceramic capacitor grayscale corresponding region is less than or equal to the target to-be-tested ceramic capacitor appearance sub-region similarity threshold when the target to-be-tested ceramic capacitor grayscale abnormal region can be detected in the target to-be-tested ceramic capacitor appearance image, wherein the target normal ceramic capacitor grayscale corresponding region is the region on the target normal ceramic capacitor appearance image corresponding to the position of the target to-be-tested ceramic capacitor grayscale abnormal region;

[0073] The detection result judgment module 60 is used to determine that the appearance of the target ceramic capacitor to be tested has defects when the similarity between the grayscale abnormal area of ​​the target ceramic capacitor to be tested and the grayscale corresponding area of ​​the target normal ceramic capacitor is less than or equal to the appearance sub-area similarity threshold of the target ceramic capacitor to be tested.

[0074] Figure 3 FIG. 1 shows an internal structure diagram of a computer device in an embodiment. The computer device may be a terminal or a server. Figure 3 As shown, the computer device includes a processor, a memory and a network interface connected via a system bus. Among them, the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor can implement the above-mentioned defect detection method for ceramic capacitors. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor can execute the above-mentioned defect detection method for ceramic capacitors. Those skilled in the art can understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0075] In another embodiment, a computer device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the following steps:

[0076] Obtain an appearance image of a target ceramic capacitor to be tested corresponding to a target ceramic capacitor to be tested with an appearance defect to be detected, wherein the appearance image of the target ceramic capacitor to be tested is a surface area image corresponding to the target ceramic capacitor to be tested; obtain an appearance image of a target normal ceramic capacitor corresponding to a target normal ceramic capacitor with a normal appearance, wherein the type and size of the target ceramic capacitor to be tested with an appearance defect to be detected and the target normal ceramic capacitor are the same; respectively divide the appearance image of the target normal ceramic capacitor and the appearance image of the target ceramic capacitor to be tested into the same detection area, wherein the appearance image of the target normal ceramic capacitor and the appearance image of the target ceramic capacitor to be tested correspond to each detection area one by one; determine the appearance image of the target ceramic capacitor to be tested. Whether a grayscale abnormal area of ​​the target ceramic capacitor to be tested can be detected in the image, wherein the absolute value of the grayscale difference between the grayscale value corresponding to the grayscale abnormal area of ​​the target ceramic capacitor to be tested and the grayscale value of any adjacent detection area is greater than the target preset grayscale difference threshold; if so, then determine whether the similarity between the grayscale abnormal area of ​​the target ceramic capacitor to be tested and the grayscale corresponding area of ​​the target normal ceramic capacitor is less than or equal to the appearance sub-area similarity threshold of the target ceramic capacitor to be tested, wherein the grayscale corresponding area of ​​the target normal ceramic capacitor is the area on the appearance image of the target normal ceramic capacitor corresponding to the position of the grayscale abnormal area of ​​the target ceramic capacitor to be tested; if so, then determine that the appearance of the target ceramic capacitor to be tested with appearance defects to be detected has defects.

[0077] In another embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the processor performs the following steps:

[0078] Obtain an appearance image of a target ceramic capacitor to be tested corresponding to a target ceramic capacitor to be tested with an appearance defect to be detected, wherein the appearance image of the target ceramic capacitor to be tested is a surface area image corresponding to the target ceramic capacitor to be tested; obtain an appearance image of a target normal ceramic capacitor corresponding to a target normal ceramic capacitor with a normal appearance, wherein the type and size of the target ceramic capacitor to be tested with an appearance defect to be detected and the target normal ceramic capacitor are the same; respectively divide the appearance image of the target normal ceramic capacitor and the appearance image of the target ceramic capacitor to be tested into the same detection area, wherein the appearance image of the target normal ceramic capacitor and the appearance image of the target ceramic capacitor to be tested correspond to each detection area one by one; determine the appearance image of the target ceramic capacitor to be tested. Whether a grayscale abnormal area of ​​the target ceramic capacitor to be tested can be detected in the image, wherein the absolute value of the grayscale difference between the grayscale value corresponding to the grayscale abnormal area of ​​the target ceramic capacitor to be tested and the grayscale value of any adjacent detection area is greater than the target preset grayscale difference threshold; if so, then determine whether the similarity between the grayscale abnormal area of ​​the target ceramic capacitor to be tested and the grayscale corresponding area of ​​the target normal ceramic capacitor is less than or equal to the appearance sub-area similarity threshold of the target ceramic capacitor to be tested, wherein the grayscale corresponding area of ​​the target normal ceramic capacitor is the area on the appearance image of the target normal ceramic capacitor corresponding to the position of the grayscale abnormal area of ​​the target ceramic capacitor to be tested; if so, then determine that the appearance of the target ceramic capacitor to be tested with appearance defects to be detected has defects.

[0079] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0080] The embodiment of the present invention first obtains the appearance image of the target ceramic capacitor to be tested corresponding to the target ceramic capacitor to be tested with an appearance defect to be detected, then obtains the appearance image of the target normal ceramic capacitor corresponding to the target normal ceramic capacitor with a normal appearance, and then respectively divides the appearance image of the target normal ceramic capacitor and the appearance image of the target ceramic capacitor to be tested into the same detection area, and then determines whether the grayscale abnormal area of ​​the target ceramic capacitor to be tested can be detected in the appearance image of the target ceramic capacitor to be tested, and if so, further determines whether the similarity between the grayscale abnormal area of ​​the target ceramic capacitor to be tested and the grayscale corresponding area of ​​the target normal ceramic capacitor is less than or equal to the appearance sub-area similarity threshold of the target ceramic capacitor to be tested, and finally, when the similarity between the grayscale abnormal area of ​​the target ceramic capacitor to be tested and the grayscale corresponding area of ​​the target normal ceramic capacitor is less than or equal to the appearance sub-area similarity threshold of the target ceramic capacitor to be tested, it is determined that the appearance of the target ceramic capacitor to be tested with an appearance defect to be detected has a defect, and the appearance defect of the ceramic capacitor can be detected, and the detection method is simple and has high accuracy. The present invention does not need to detect the appearance defects of ceramic capacitors by manual visual methods, and can detect a variety of appearance defects of different positions and properties of ceramic capacitors. The recognition accuracy and recognition speed are relatively high, and there will be no problem of misjudgment.

[0081] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0082] The above-mentioned embodiments are described in more detail, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present application, which all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the attached claims.

Claims

1. A defect detection method for ceramic capacitors, used for appearance defect detection corresponding to ceramic capacitors, characterized in that: include: Acquire an appearance image of a target ceramic capacitor to be tested corresponding to a target ceramic capacitor to be tested for appearance defects to be detected, wherein the appearance image of the target ceramic capacitor to be tested is a surface area image corresponding to the target ceramic capacitor to be tested; Acquire a target normal ceramic capacitor appearance image corresponding to a target normal ceramic capacitor with a normal appearance, wherein the target ceramic capacitor to be tested for appearance defects and the target normal ceramic capacitor are of the same type and size; The target normal ceramic capacitor appearance image and the target to-be-tested ceramic capacitor appearance image are respectively divided into the same detection areas, and the target normal ceramic capacitor appearance image and the target to-be-tested ceramic capacitor appearance image correspond to each other in a one-to-one manner; Determine whether a grayscale abnormal region of the target ceramic capacitor to be tested can be detected in the appearance image of the target ceramic capacitor to be tested, wherein the absolute value of the grayscale difference between the grayscale value corresponding to the grayscale abnormal region of the target ceramic capacitor to be tested and the grayscale value of any adjacent detection region is greater than a target preset grayscale difference threshold; If so, determine whether the similarity between the grayscale abnormal region of the target ceramic capacitor to be tested and the grayscale corresponding region of the target normal ceramic capacitor is less than or equal to the similarity threshold of the appearance sub-region of the target ceramic capacitor to be tested, wherein the grayscale corresponding region of the target normal ceramic capacitor is the region on the appearance image of the target normal ceramic capacitor corresponding to the position of the grayscale abnormal region of the target ceramic capacitor to be tested; If yes, it is determined that the appearance of the target ceramic capacitor to be tested for appearance defects is defective; The target normal ceramic capacitor appearance image and the target to-be-tested ceramic capacitor appearance image are respectively divided into the same detection areas, and the target normal ceramic capacitor appearance image and the target to-be-tested ceramic capacitor appearance image correspond to each other in a one-to-one manner, including: Divide the target normal ceramic capacitor appearance image into a plurality of target normal ceramic capacitor mother regions, and each of the target normal ceramic capacitor mother regions is divided into a plurality of target normal ceramic capacitor sub-regions; wherein the absolute value of the grayscale difference between any two of the target normal ceramic capacitor sub-regions within each of the target normal ceramic capacitor mother regions is less than or equal to a target preset grayscale difference threshold; According to the area division method corresponding to the target normal ceramic capacitor appearance image, the target ceramic capacitor appearance image to be tested is divided into a plurality of target ceramic capacitor appearance mother areas to be tested, and each of the target ceramic capacitor appearance mother areas to be tested is divided into a plurality of target ceramic capacitor appearance sub-areas to be tested, wherein the plurality of target ceramic capacitor appearance mother areas to be tested and the plurality of target normal ceramic capacitor mother areas correspond one-to-one, and the plurality of target ceramic capacitor appearance sub-areas in each target ceramic capacitor appearance mother area and the plurality of target normal ceramic capacitor sub-areas in each corresponding target normal ceramic capacitor mother area correspond one-to-one; The step of judging whether a grayscale abnormal region of the target ceramic capacitor to be tested can be detected in the appearance image of the target ceramic capacitor to be tested includes: Determine whether the target abnormal ceramic capacitor to be tested appearance mother region can be detected in each of the target ceramic capacitor to be tested appearance mother regions, wherein the target abnormal ceramic capacitor to be tested appearance sub-region can be detected in the target abnormal ceramic capacitor to be tested appearance mother region, and the grayscale value corresponding to the target abnormal ceramic capacitor to be tested appearance sub-region is the target abnormal sub-region grayscale value; wherein, within the target abnormal ceramic capacitor to be tested appearance mother region, the absolute value of the grayscale difference between the grayscale value of any one of the target ceramic capacitor appearance sub-regions to be tested and the grayscale value of the target abnormal sub-region to be tested is greater than the target preset grayscale difference threshold; If so, it is determined that the grayscale abnormal region of the target ceramic capacitor to be tested can be detected in the appearance image of the target ceramic capacitor to be tested; otherwise, it is determined that the grayscale abnormal region of the target ceramic capacitor to be tested cannot be detected in the appearance image of the target ceramic capacitor to be tested.

2. The defect detection method for ceramic capacitors according to claim 1, characterized in that: The determining whether the similarity between the grayscale abnormal region of the target ceramic capacitor to be tested and the grayscale corresponding region of the target normal ceramic capacitor is less than or equal to the similarity threshold of the appearance sub-region of the target ceramic capacitor to be tested, wherein the grayscale corresponding region of the target normal ceramic capacitor is a region on the appearance image of the target normal ceramic capacitor corresponding to the position of the grayscale abnormal region of the target ceramic capacitor to be tested, comprises: According to the position of the appearance sub-region of the target abnormal ceramic capacitor to be tested in the appearance image of the target ceramic capacitor to be tested, obtaining the appearance sub-region of the target normal comparison ceramic capacitor corresponding to the appearance image of the target normal ceramic capacitor, wherein the positions of the appearance sub-region of the target abnormal ceramic capacitor to be tested and the appearance sub-region of the target normal comparison ceramic capacitor correspond; Determine whether the similarity between the appearance sub-region of the target abnormal ceramic capacitor to be tested and the appearance sub-region of the target normal comparison ceramic capacitor is less than or equal to a similarity threshold of the appearance sub-region of the target ceramic capacitor to be tested; If so, it is determined that the similarity between the grayscale abnormal region of the target ceramic capacitor to be tested and the grayscale corresponding region of the target normal ceramic capacitor is less than or equal to the appearance sub-region similarity threshold of the target ceramic capacitor to be tested.

3. The defect detection method for ceramic capacitors according to claim 1, characterized in that: The step of obtaining the target normal ceramic capacitor appearance image corresponding to the target normal ceramic capacitor having a normal appearance comprises: Determine whether the target ceramic capacitor to be tested appearance image resolution is greater than a target preset ceramic capacitor appearance image resolution threshold, wherein the target ceramic capacitor to be tested appearance image resolution is a resolution corresponding to the target ceramic capacitor to be tested appearance image; If the resolution of the appearance image of the target ceramic capacitor to be tested is greater than the target preset ceramic capacitor appearance image resolution threshold, then entering the step of acquiring the target normal ceramic capacitor appearance image corresponding to the target normal ceramic capacitor with normal appearance; If the target ceramic capacitor to be tested appearance image resolution is less than or equal to the target preset ceramic capacitor appearance image resolution threshold, the step of obtaining the target ceramic capacitor to be tested appearance image corresponding to the target ceramic capacitor to be tested having appearance defects to be detected is re-entered.

4. The defect detection method for ceramic capacitors according to claim 1, characterized in that: Before determining whether the target abnormal ceramic capacitor to be tested appearance sub-region can be detected in each target ceramic capacitor to be tested appearance mother region, the method includes: The appearance image of the target ceramic capacitor to be tested is gray-scaled to obtain grayscale values ​​corresponding to all appearance sub-regions of the target ceramic capacitor to be tested.

5. The defect detection method for ceramic capacitors according to claim 2, characterized in that: The step of determining whether the similarity between the appearance sub-region of the target abnormal ceramic capacitor to be tested and the appearance sub-region of the target normal comparison ceramic capacitor is less than or equal to a similarity threshold of the appearance sub-region of the target ceramic capacitor to be tested comprises: If the similarity between the appearance sub-region of the target abnormal ceramic capacitor to be tested and the appearance sub-region of the target normal comparison ceramic capacitor is greater than the appearance sub-region similarity threshold of the target ceramic capacitor to be tested, it is determined that the appearance of the target ceramic capacitor to be tested with an appearance defect to be detected does not have a defect.

6. A defect detection device for ceramic capacitors, used for appearance defect detection corresponding to ceramic capacitors, characterized in that: include: A first image acquisition module is used to acquire an appearance image of a target ceramic capacitor to be tested corresponding to a target ceramic capacitor to be tested for appearance defects to be detected, wherein the appearance image of the target ceramic capacitor to be tested is a surface area image corresponding to the target ceramic capacitor to be tested; A second image acquisition module is used to acquire an appearance image of a target normal ceramic capacitor corresponding to a target normal ceramic capacitor with a normal appearance, wherein the target ceramic capacitor to be tested with an appearance defect to be detected and the target normal ceramic capacitor are of the same type and size; An image area division module, used to divide the target normal ceramic capacitor appearance image and the target to-be-tested ceramic capacitor appearance image into the same detection area, respectively, and each detection area of ​​the target normal ceramic capacitor appearance image and the target to-be-tested ceramic capacitor appearance image corresponds one to one; An image grayscale judgment module is used to judge whether a grayscale abnormal area of ​​the target ceramic capacitor to be tested can be detected in the appearance image of the target ceramic capacitor to be tested, wherein the absolute value of the grayscale difference between the grayscale value corresponding to the grayscale abnormal area of ​​the target ceramic capacitor to be tested and the grayscale value of any adjacent detection area is greater than a target preset grayscale difference threshold; An image abnormality judgment module is used to judge whether the similarity between the target to-be-tested ceramic capacitor grayscale abnormal region and the target normal ceramic capacitor grayscale corresponding region is less than or equal to the target to-be-tested ceramic capacitor appearance sub-region similarity threshold when a target to-be-tested ceramic capacitor grayscale abnormal region can be detected in the target to-be-tested ceramic capacitor appearance image, wherein the target normal ceramic capacitor grayscale corresponding region is a region on the target normal ceramic capacitor appearance image corresponding to the position of the target to-be-tested ceramic capacitor grayscale abnormal region; A detection result determination module, configured to determine that the appearance of the target ceramic capacitor to be tested, which has an appearance defect, is defective when the similarity between the grayscale abnormal region of the target ceramic capacitor to be tested and the grayscale corresponding region of the target normal ceramic capacitor is less than or equal to a similarity threshold of the appearance sub-region of the target ceramic capacitor to be tested; The target normal ceramic capacitor appearance image and the target to-be-tested ceramic capacitor appearance image are respectively divided into the same detection areas, and the target normal ceramic capacitor appearance image and the target to-be-tested ceramic capacitor appearance image correspond to each other in a one-to-one manner, including: Divide the target normal ceramic capacitor appearance image into a plurality of target normal ceramic capacitor mother regions, and each of the target normal ceramic capacitor mother regions is divided into a plurality of target normal ceramic capacitor sub-regions; wherein the absolute value of the grayscale difference between any two of the target normal ceramic capacitor sub-regions within each of the target normal ceramic capacitor mother regions is less than or equal to a target preset grayscale difference threshold; According to the area division method corresponding to the target normal ceramic capacitor appearance image, the target ceramic capacitor appearance image to be tested is divided into a plurality of target ceramic capacitor appearance mother areas to be tested, and each of the target ceramic capacitor appearance mother areas to be tested is divided into a plurality of target ceramic capacitor appearance sub-areas to be tested, wherein the plurality of target ceramic capacitor appearance mother areas to be tested and the plurality of target normal ceramic capacitor mother areas correspond one-to-one, and the plurality of target ceramic capacitor appearance sub-areas in each target ceramic capacitor appearance mother area and the plurality of target normal ceramic capacitor sub-areas in each corresponding target normal ceramic capacitor mother area correspond one-to-one; The step of judging whether a grayscale abnormal region of the target ceramic capacitor to be tested can be detected in the appearance image of the target ceramic capacitor to be tested includes: Determine whether the target abnormal ceramic capacitor to be tested appearance mother region can be detected in each of the target ceramic capacitor to be tested appearance mother regions, wherein the target abnormal ceramic capacitor to be tested appearance sub-region can be detected in the target abnormal ceramic capacitor to be tested appearance mother region, and the grayscale value corresponding to the target abnormal ceramic capacitor to be tested appearance sub-region is the target abnormal sub-region grayscale value; wherein, within the target abnormal ceramic capacitor to be tested appearance mother region, the absolute value of the grayscale difference between the grayscale value of any one of the target ceramic capacitor appearance sub-regions to be tested and the grayscale value of the target abnormal sub-region to be tested is greater than the target preset grayscale difference threshold; If so, it is determined that the grayscale abnormal region of the target ceramic capacitor to be tested can be detected in the appearance image of the target ceramic capacitor to be tested; otherwise, it is determined that the grayscale abnormal region of the target ceramic capacitor to be tested cannot be detected in the appearance image of the target ceramic capacitor to be tested.

7. A computer-readable storage medium, characterized in that: A computer program is stored, and when the computer program is executed by a processor, the processor executes the defect detection method for ceramic capacitors according to any one of claims 1 to 5.

8. A computer device, characterized in that: It comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the defect detection method for ceramic capacitors according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Capacitor defect detection method, capacitor defect detection system and capacitor assemblage seal conjoined machine

    CN108711154A

  • Capacitor appearance defect identification method and device

    CN109978875A