WO2021109011A1 - 一种基于超声图像的电容内部缺陷智能检测方法 - Google Patents
一种基于超声图像的电容内部缺陷智能检测方法 Download PDFInfo
- Publication number
- WO2021109011A1 WO2021109011A1 PCT/CN2019/122861 CN2019122861W WO2021109011A1 WO 2021109011 A1 WO2021109011 A1 WO 2021109011A1 CN 2019122861 W CN2019122861 W CN 2019122861W WO 2021109011 A1 WO2021109011 A1 WO 2021109011A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- capacitor
- image
- defect
- capacitors
- support vector
- Prior art date
Links
- 239000003990 capacitor Substances 0.000 title claims abstract description 128
- 230000007547 defect Effects 0.000 title claims abstract description 78
- 238000001514 detection method Methods 0.000 title claims abstract description 46
- 238000002604 ultrasonography Methods 0.000 title claims description 6
- 238000000034 method Methods 0.000 claims abstract description 50
- 230000002950 deficient Effects 0.000 claims abstract description 20
- 238000012706 support-vector machine Methods 0.000 claims abstract description 18
- 238000010586 diagram Methods 0.000 claims abstract description 14
- 238000012549 training Methods 0.000 claims abstract description 10
- 238000003672 processing method Methods 0.000 claims abstract description 9
- 238000007781 pre-processing Methods 0.000 claims abstract description 8
- 238000004364 calculation method Methods 0.000 claims abstract description 6
- 230000011218 segmentation Effects 0.000 claims abstract description 4
- 238000012545 processing Methods 0.000 claims description 24
- 238000004458 analytical method Methods 0.000 claims description 6
- 238000013145 classification model Methods 0.000 claims description 5
- 238000013507 mapping Methods 0.000 claims description 4
- 238000001914 filtration Methods 0.000 claims description 3
- 239000011159 matrix material Substances 0.000 claims description 3
- 238000010606 normalization Methods 0.000 claims description 3
- 238000005192 partition Methods 0.000 claims description 3
- 238000012216 screening Methods 0.000 claims description 3
- 230000006870 function Effects 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 6
- 238000005457 optimization Methods 0.000 description 5
- 238000012360 testing method Methods 0.000 description 3
- -1 bubbles Substances 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000018109 developmental process Effects 0.000 description 2
- 230000009977 dual effect Effects 0.000 description 2
- 238000013100 final test Methods 0.000 description 2
- 238000003384 imaging method Methods 0.000 description 2
- 238000007689 inspection Methods 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 238000011496 digital image analysis Methods 0.000 description 1
- 239000012535 impurity Substances 0.000 description 1
- 238000011031 large-scale manufacturing process Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012827 research and development Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N20/00—Machine learning
- G06N20/10—Machine learning using kernel methods, e.g. support vector machines [SVM]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10132—Ultrasound image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20024—Filtering details
- G06T2207/20032—Median filtering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
- G06T2207/30148—Semiconductor; IC; Wafer
Definitions
- the invention belongs to the field of computer intelligent detection, and in particular relates to an intelligent detection method of capacitor internal defects based on ultrasonic images.
- the electronic components industry which is the foundation of the electronic information industry, has also achieved rapid development.
- the traditional manual detection method requires the human eye to distinguish the ultrasonic image of the capacitance.
- the traditional manual detection method not only requires a huge labor cost, but also cannot guarantee the efficiency and accuracy of the detection. Therefore, it is very necessary to provide a method that can intelligently detect the quality of electronic components.
- the present invention does not involve the detection of the electrical performance of the capacitor, and only judges and detects the physical defects inside the capacitor, such as bubbles, holes, cracks, impurities, etc.
- the existing technologies and products similar to the present invention include: The paper "Research and Development of Capacitor Surface Defect Detection System Based on Machine Vision” has developed a machine vision detection system for capacitor surface defects, and uses image processing technology to detect capacitor surface defects.
- the paper "Detection of internal defects in capacitors, X-ray provides safe and intelligent solutions” uses X-ray to image the internal defects of capacitors in real time. According to the images, the defects of the detected capacitors are judged by manual viewing to achieve the purpose of detection.
- the paper “Application of Machine Vision in Capacitor Appearance Defect Detection” uses image processing technology to extract defect features to realize capacitor appearance defect detection.
- the invention patent “A device for detecting appearance defects of electrolytic capacitors” uses image processing technology to improve detection efficiency.
- the invention patent “Fast on-line detection method for capacitor defects” judges the quality of the capacitor under test based on the size of the resonance peak shown in the spectrogram, which belongs to the detection of the electrical performance of the capacitor.
- the common point of the above-mentioned similar technologies or products is that different imaging methods are used to image the surface or inside of the capacitor to generate an image, and then process and analyze the image to detect the defective capacitor.
- the analysis and processing of the image there are two methods, one is to judge the capacitance defect based on experience by artificial naked eyes, and the other is to detect the capacitance defect through computer image analysis.
- the former method has the problem of low accuracy of capacitance defect detection due to factors such as personnel fatigue and experience differences, and it cannot quantitatively judge the size of the defect.
- the latter method uses image processing technology, it does not use intelligent analysis methods, and it is difficult to improve the accuracy of capacitance defect detection.
- the image has complex background, large noise, and small defects. It is difficult to improve the detection accuracy.
- the present invention is mainly aimed at the image of the internal imaging of the capacitor by ultrasound, and adopts the method of image processing and intelligent analysis to perform the intelligent defect detection method, which can improve the accuracy of the detection of the internal defect of the capacitor, and can reach a high level for the small defects inside the small-sized capacitor.
- the detection accuracy can also be quantitatively analyzed for the internal defects of the capacitor, and the level of the capacitor defect can be confirmed.
- the present invention provides an intelligent detection method for internal defects of a capacitor that combines an image processing method and a support vector machine supervised learning method, including the following main steps:
- Step 1 Divide the multi-capacitance arrangement map containing 2000 capacitors imaged by the ultrasound scan into a single capacitance image.
- This step mainly includes:
- Step 1.1 first preprocess the multi-capacitor arrangement map, including grayscale processing, binarization and median filtering, and then perform the outer contour detection on the multi-capacitor arrangement pre-processing image, so that it can be ignored in the multi-capacitor arrangement map
- the internal defect contour of each capacitor can be found in the multi-capacitor arrangement diagram.
- Step 1.2 calculate the minimum positive circumscribed rectangle of all outer contours in the multi-capacitor arrangement diagram.
- Step 1.3 Filter the smallest bounding rectangle according to the size of different types of capacitors, and eliminate the interference partitions that are obviously not capacitors.
- Step 1.4 taking all the smallest circumscribed rectangles in the filtered multi-capacitor arrangement map as the dividing boundary, and performing segmentation processing on the original multi-capacitor arrangement image, so as to obtain all single capacitance images.
- Step 1.5 Determine the placement position of the capacitor in a single capacitor image. For capacitors that are not placed horizontally, obtain the rotation matrix operator based on the center point and rotation angle information of the minimum oblique circumscribed rectangle, and use this operator to level the capacitor Straighten up to facilitate intelligent analysis.
- Step 2 Perform size normalization processing, gray-scale processing and binarization processing on the segmented single capacitance image.
- This step mainly includes:
- Step 2.1 Scale the length and width of all single capacitance images to normalized sizes W and H to obtain a normalized image of a single capacitance image.
- Step 2.2 Use the spatial mapping method to convert the color mode of the normalized image from RGB mode to grayscale mode.
- Step 2.3 using the maximum between-class variance method OTSU to binarize the capacitance grayscale image.
- Step 3 In all the single capacitance images after preprocessing, a certain number of normal samples and defective samples are screened out, and the model is trained using the supervised learning method of support vector machine.
- This step mainly includes:
- Step 3.1 first set the target value label i according to the sample type, if it is a normal sample, set the label to 0, if it is a defective sample, set the label to 1, then traverse all the pixels of each sample image, and set the pixel The number of is set to the feature index index i , and the RGB value of the pixel is set to the feature value value i .
- Step 3.2 After processing all the sample images, normalize the obtained data to obtain the final training data.
- Step 3.3 use the supervised learning method of support vector machine to train the capacitance classification model.
- Step 4 According to the supervised learning method of the support vector machine, the capacitor classification training model is used to classify and detect the capacitors in the multi-capacitor arrangement diagram to obtain the capacitor defect prediction result.
- Step 5 Perform a secondary screening of the capacitor defect prediction results according to the contour hierarchical relationship in the capacitor map, determine the defective capacitor, and perform defect location and defect size calculation on the capacitor.
- This step mainly includes:
- Step 5.1 Perform contour detection on each single capacitor image in the capacitor defect prediction result, obtain all contours, and then locate the defect according to the contour hierarchy.
- Step 5.2 Calculate the actual size of the defect, and classify the defect capacitor according to the size.
- the beneficial effects of the present invention are: on the basis of the image processing method, the supervised learning method of the support vector machine is adopted, which improves the accuracy of the defect capacitance detection, reduces the missed detection rate of the defect capacitance, and can also detect human eye discrimination.
- the size of the internal defects of the capacitor can be quantitatively analyzed to realize the classification of capacitor defects.
- Figure 1 shows a flow chart of the training process of a method for intelligent detection of internal defects in capacitors based on ultrasound images of the present invention
- Fig. 2 shows a flow chart of the detection process of a method for intelligent detection of internal defects of a capacitor based on ultrasonic images of the present invention
- FIG. 3 shows a multi-capacitor arrangement diagram containing a plurality of capacitors according to an example of the present invention
- Figure 4 shows the bilinear interpolation method involved in the example of the present invention
- Figure 5 shows a partial defect sample of an example of the present invention
- Fig. 6 shows the final test result of the example of the present invention.
- FIG. 1 shows the specific process of the training process of the present invention
- FIG. 2 shows the specific process of the detection process of the present invention
- Step 1 The multi-capacitance arrangement diagram (as shown in FIG. 3) containing 2000 capacitors imaged by the ultrasound scan is divided into a single capacitance image.
- Step 1.1 first preprocess the multi-capacitor arrangement map, including grayscale processing, binarization and median filtering, and then perform the outer contour detection on the multi-capacitor arrangement pre-processing image, so that it can be ignored in the multi-capacitor arrangement map
- the internal defect contour of each capacitor can be found in the multi-capacitor arrangement diagram.
- Step 1.2 calculate the minimum positive circumscribed rectangle of all outer contours in the multi-capacitor arrangement diagram.
- Step 1.3 Filter the smallest bounding rectangle according to the size of different types of capacitors, and eliminate the interference partitions that are obviously not capacitors.
- Step 1.4 taking all the smallest circumscribed rectangles in the filtered multi-capacitor arrangement map as the dividing boundary, and performing segmentation processing on the original multi-capacitor arrangement image, so as to obtain all single capacitance images.
- Step 1.5 Determine the placement position of the capacitor in a single capacitor image. For capacitors that are not placed horizontally, obtain the rotation matrix operator based on the center point and rotation angle information of the minimum oblique circumscribed rectangle, and use this operator to level the capacitor Straighten up to facilitate intelligent analysis.
- Step 2 Perform preprocessing on the segmented single capacitance image, including size normalization, grayscale processing and binarization processing.
- Step 2.1 Scale the length and width of all single capacitance images to normalized sizes W and H to obtain a normalized image of a single capacitance image.
- the algorithm involved is the bilinear interpolation method, as shown in Figure 4. First, perform two linear interpolation calculations in the x direction (as shown in Equation 1), and then perform an interpolation calculation in the y direction (as shown in Equation 2). Show).
- Step 2.2 Use the spatial mapping method to convert the color mode of the normalized image from RGB mode to grayscale mode. , Its mapping formula is shown in formula 3.
- RGB[A]to Gray Y ⁇ 0.299 ⁇ R+0.587 ⁇ G+0.114 ⁇ B
- Step 2.3 using the maximum between-class variance method OTSU to binarize the capacitance grayscale image.
- the principle of binarization is shown in formula 4, dst (x, y) is the target pixel value, src (x, y) is the source pixel value, and thresh is the threshold value.
- the target pixel When the source pixel value is greater than the threshold value, the target pixel The value is set to maxval, otherwise it is set to 0.
- M ⁇ N represents the image size
- N0 represents the number of pixels whose gray value is less than the threshold value
- N1 represents the number of pixels whose gray value is greater than the threshold value
- ⁇ represents the integer
- g represents the variance between clusters, so that the threshold thresh that maximizes the variance between clusters g is the threshold obtained by the OTSU method.
- Step 3 In all the single capacitance images after preprocessing, a certain number of normal samples and defective samples are screened out respectively (some defective samples are shown in Figure 5), and the model is trained using the supervised learning method of support vector machine.
- Step 3.1 first set the target value labeli according to the sample type, if it is a normal sample, set the label to 0, if it is a defective sample, set the label to 1, and then traverse all the pixels of each sample image, and set the value of the pixel
- the number is set to the feature index indexi, and the RGB value of the pixel is set to the feature value valuei.
- Step 3.2 After processing all the sample images, normalize the obtained data to obtain the final training data.
- Step 3.3 use the supervised learning method of support vector machine to train the capacitance classification model.
- the optimization problem of solving the classification model from the training data is shown in formula 6, where w represents the normal vector of the hyperplane, and b represents the intercept of the hyperplane.
- Equation 9 the optimization problem that is not easy to solve is transformed into an optimization problem that is easy to solve, as shown in Equation 9, where d is the classification interval.
- the KKT condition is used to transform the optimization problem into a dual problem, and finally the Lagrangian multiplier in the dual problem is solved by the SMO algorithm, so as to calculate the capacitance classification model.
- Step 4 the capacitor classification training model is used to classify and detect the capacitors in the multi-capacitor arrangement diagram to obtain the capacitor defect prediction results.
- the value of the objective function corresponding to the detection data of the capacitance is less than -1, it is considered that the classification of the data to be detected is the same as that of the negative sample; when the value of the objective function corresponding to the detection data is greater than 1, it is considered that the data to be detected is the same as that of the positive sample.
- the classification is the same.
- the outlier penalty factor C is supported, which means that the classification is not completely strict.
- Step 5 Perform a secondary screening of the capacitor defect prediction results according to the contour hierarchical relationship in the capacitor map, determine the defective capacitor, and perform defect location and defect size calculation on the capacitor.
- Step 5.1 Perform contour detection on each single capacitor image in the capacitor defect prediction result, obtain all contours, and then locate the defect according to the contour hierarchy.
- Step 5.2 Calculate the actual size of the defect, and classify the defect capacitor according to the size.
- the final test result is shown in Figure 6.
- the green box indicates that the test result is a normal capacitance, and the boxes in other colors indicate that the test result is a different level of defective capacitance. Among them, yellow represents a defective capacitor with a defect ⁇ 0.25 mm; orange represents a defective capacitor with a defect ⁇ 0.50 mm, red represents a defective capacitor with a defect ⁇ 1.00 mm, dark red represents a defective capacitor with a defect ⁇ 1.50 mm, and purple represents a defect ⁇ Defective capacitors with 2.00mm are used dark blue to indicate defective capacitors with defects ⁇ 2.50mm.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Software Systems (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Medical Informatics (AREA)
- Artificial Intelligence (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Quality & Reliability (AREA)
- Image Processing (AREA)
Abstract
一种结合了图像处理方法和支持向量机的监督学习方法的电容内部缺陷的智能检测方法,包括了分割多电容排列图、预处理单个电容图像、训练模型、分类检测,缺陷定位及缺陷大小计算。该方法在使用图像处理方法的基础上,采用了支持向量机的监督学习方法,提高了缺陷电容检测的准确率,降低了缺陷电容的漏检率,还可以检测人眼辨别困难的、小缺陷的电容,同时,可以对电容内部缺陷大小进行定量分析,实现电容缺陷等级分类。
Description
本发明属于计算机智能检测领域,尤其涉及一种基于超声图像的电容内部缺陷智能检测方法。
随着电子信息产业的蓬勃发展,作为电子信息产业基础的电子元器件产业也获得了高速的发展。在电子元器件企业进行大规模生产时,电子元器件的质量很大程度上影响了企业的投资回报率,所以对电子元器件进行质量检测是非常有必要的。而传统的人工检测方法需要用人眼去辨别电容的超声图像,在面临数量极其庞大的电子元器件时,传统的人工检测方法不仅需要耗费巨大的人工成本,还无法保证检测的效率与准确率,因此十分有必要提供一种能够智能检测电子元器件质量的方法。
本发明不涉及电容电气性能的检测,仅针对电容内部的物理缺陷,如气泡、孔洞、裂纹、杂质等进行判断检测。与本发明类似的现有技术与产品有:论文“基于机器视觉的电容器表面缺陷检测系统的研究与开发”针对电容表面缺陷,研发了机器视觉检测系统,采用图像处理技术进行电容表面缺陷检测。论文“电容器内部缺陷检测,X-ray提供安全智能解决方案”采用X-ray对电容器的内部缺陷进行实时成像,根据图像,通过人工观看的方式对被检测的电容器缺陷进行判定,达到检测目的。论文“机器视觉在电容器外观缺陷检测中的应用”采用图像处理技术,提取缺陷特征实现电容器外观缺陷检测。发明专利“一种电解电容器外观缺陷检测装置”采用图像处理技术提高检测效率。发明专利“电容器缺陷的快速在线检测方法”根据频谱图所示谐振峰值的大小判别被测电容器的优劣,属于电容电气性能的检测。
上述同类技术或产品,共同点是采用了不同的成像手段对电容表面或内部进行成像,生成图像,然后针对图像进行处理和分析,从而检测缺陷电容。在对图像进行分析与处理中,存在两种方法,一种是通过人工肉眼观看、根据经验判断电容缺陷,另一种是通过计算机图像分析检测电容缺陷。前一种方法存在人员疲倦、经验差异等因素导致电容缺陷检测准确率低的问题,并且不能对缺陷大小进行定量判断。后一种方法虽然采用了图像处理技术,但并没有采用智能分析方法,也难以提高电容缺陷检测的准确率,特别是在实际生产检测过程,对图像背景复杂、噪声大、缺陷小的电容图难以提高检测准确率。
本发明主要针对超声波对电容内部成像的图像,采用图像处理与智能分析的方法进行缺陷智能检测方法,可以提高电容内部缺陷检测的准确率,并且对小尺寸电容内部的小缺陷都 能到达很高的检测准确率,还可以对电容内部缺陷进行定量分析,确实电容缺陷等级。
发明内容
本发明提供了一种结合了图像处理方法和支持向量机的监督学习方法的电容内部缺陷的智能检测方法,包括以下主要步骤:
步骤1,将超声扫描成像的包含2000个电容的多电容排列图分割为单个电容图像。
本步骤主要包括:
步骤1.1,首先对多电容排列图进行预处理,包括灰度处理,二值化处理及中值滤波,然后对多电容排列预处理图进行外轮廓检测,使得既能在多电容排列图中忽略每个电容的内部缺陷轮廓,又能够在多电容排列图中找出每个电容的电容轮廓。
步骤1.2,计算得出多电容排列图中所有外轮廓的最小正外接矩形。
步骤1.3,根据不同型号电容的尺寸,对最小外接矩形进行过滤,剔除明显不是电容的干扰分割区。
步骤1.4,以筛选后的多电容排列图中的所有最小外接矩形为分割边界,对多电容排列原始图进行分割处理,从而得到所有单个电容图像。
步骤1.5,判断单个电容图像中的电容摆放位置,针对没有水平摆放的电容,则根据其最小斜外接矩形的中心点及旋转角度信息得到旋转矩阵算子,并利用该算子将电容水平摆正,以利于智能分析。
步骤2,对分割出的单个电容图像进行尺寸归一化处理,灰度处理及二值化处理。
本步骤主要包括:
步骤2.1,将所有单个电容图像的长宽都缩放到归一化尺寸W和H,得到单个电容图像的归一化图像。
步骤2.2,利用空间映射的方法将归一化图像的颜色模式由RGB模式转换为灰度模式。
步骤2.3,利用最大类间方差法OTSU对电容灰度图像进行二值化处理。
步骤3,在预处理后的所有单个电容图像中,分别筛选出一定数量的正常样本和缺陷样本,采用支持向量机的监督学习方法训练模型。
本步骤主要包括:
步骤3.1,首先根据样本类型设置目标值label
i,如果为正常样本则将label设置为0,如果为缺陷样本则将label设置为1,然后遍历每一个样本图像的所有像素点,并将像素点的编号设置为特征索引index
i,将像素点的RGB值设置为特征值value
i。
步骤3.2,当处理完所有样本图像后,将得到的数据进行归一化以得到最终的训练数据。
步骤3.3,使用支持向量机的监督学习方法来训练电容分类模型。
步骤4,根据支持向量机的监督学习方法,使用电容分类训练模型对多电容排列图中的电容进行分类检测,得到电容缺陷预测结果。
步骤5,根据电容图中的轮廓层级关系对电容缺陷预测结果进行二次筛选,确定有缺陷的电容,并对该电容进行缺陷定位及缺陷大小计算。
本步骤主要包括:
步骤5.1,对电容缺陷预测结果中每一个单个电容图像进行轮廓检测,获得所有轮廓,再根据轮廓层级关系进行缺陷定位。
步骤5.2,计算得出缺陷的实际尺寸,并根据该尺寸对缺陷电容进行缺陷等级分类。
本发明的有益效果是:在使用图像处理方法的基础上,采用了支持向量机的监督学习方法,提高了缺陷电容检测的准确率,降低了缺陷电容的漏检率,还可以检测人眼辨别困难的、小缺陷的电容,同时,可以对电容内部缺陷大小进行定量分析,实现电容缺陷等级分类。
图1示出了本发明一种基于超声图像的电容内部缺陷智能检测方法的训练过程的流程图;
图2示出了本发明一种基于超声图像的电容内部缺陷智能检测方法的检测过程的流程图;
图3示出了本发明实例的包含多个电容的多电容排列图;
图4示出了本发明实例涉及到的双线性插值法;
图5示出了本发明实例的部分缺陷样本;
图6示出了本发明实例的最终检测结果。
下面结合附图和实施例对本发明优先实施方式进一步说明。
图1所示的流程图给出了本发明训练过程的具体过程,图2所示的流程图给出了本发明检测过程的具体过程:
步骤1,将超声扫描成像的包含2000个电容的多电容排列图(如图3所示)分割为单个电容图像。
步骤1.1,首先对多电容排列图进行预处理,包括灰度处理,二值化处理及中值滤波,然后对多电容排列预处理图进行外轮廓检测,使得既能在多电容排列图中忽略每个电容的内部缺陷轮廓,又能够在多电容排列图中找出每个电容的电容轮廓。
步骤1.2,计算得出多电容排列图中所有外轮廓的最小正外接矩形。
步骤1.3,根据不同型号电容的尺寸,对最小外接矩形进行过滤,剔除明显不是电容的干扰分割区。
步骤1.4,以筛选后的多电容排列图中的所有最小外接矩形为分割边界,对多电容排列原始图进行分割处理,从而得到所有单个电容图像。
步骤1.5,判断单个电容图像中的电容摆放位置,针对没有水平摆放的电容,则根据其最小斜外接矩形的中心点及旋转角度信息得到旋转矩阵算子,并利用该算子将电容水平摆正,以利于智能分析。
步骤2,对分割出的单个电容图像进行预处理,其中包括尺寸归一化,灰度处理及二值化处理。
步骤2.1,将所有单个电容图像的长宽都缩放到归一化尺寸W和H,得到单个电容图像的归一化图像。其中涉及的算法为双线性插值法,如图4所示,首先在x方向上进行两次线性插值计算(如公式1所示),然后在y方向上进行一次插值计算(如公式2所示)。
步骤2.2,利用空间映射的方法将归一化图像的颜色模式由RGB模式转换为灰度模式。,其映射公式如公式3所示。
RGB[A]to Gray:Y←0.299·R+0.587·G+0.114·B 公式3
步骤2.3,利用最大类间方差法OTSU对电容灰度图像进行二值化处理。其中,二值化的原理如公式4所示,dst(x,y)为目标像素值,src(x,y)为源像素值,thresh为阈值,当源像素值大于阈值时,将目标像素值设置为maxval,否则设置为0。
最大类间方差法OTSU的原理如公式5所示,M×N表示图像大小,N0表示灰度值小于阈值thresh的像素个数,N1表示灰度值大于阈值thresh的像素个数,μ表示整幅图像的平均灰度,g表示类间方差,使得类间方差g最大的阈值thresh即为通过OTSU方法求得的阈值。
ω0=N0/M×N
ω1=N1/M×N
N0+N1=M×N
ω0+ω1=1
μ=ω0*μ0+ω1*μ1
g=ω0(μ0-μ)^2+ω1(μ1-μ)^2
g=ω0ω1(μ0-μ1)^2 公式5
步骤3,在预处理后的所有单个电容图像中,分别筛选出一定数量的正常样本和缺陷样本(部分缺陷样本如图5所示),采用支持向量机的监督学习方法训练模型。
步骤3.1,首先根据样本类型设置目标值labeli,如果为正常样本则将label设置为0,如果为缺陷样本则将label设置为1,然后遍历每一个样本图像的所有像素点,并将像素点的编号设置为特征索引indexi,将像素点的RGB值设置为特征值valuei。
步骤3.2,当处理完所有样本图像后,将得到的数据进行归一化以得到最终的训练数据。
步骤3.3,使用支持向量机的监督学习方法来训练电容分类模型。由训练数据求解分类模型的最优化问题如公式6所示,其中w表示超平面的法向量,b表示超平面的截距。
将该最优化问题的有约束的原始目标函数转换为无约束的新构造的拉格朗日目标函数如公式7所示,其中α
i是拉格朗日乘子。
则将原本不易求解的最优化问题则转化为容易求解的最优化问题,如公式9所示,其中d为分类间隔。
利用KKT条件将该优化问题转化为对偶问题,并最终通过SMO算法求解对偶问题中的拉格朗日乘子,从而计算得出电容分类的模型。
步骤4,根据支持向量机的监督学习方法,使用电容分类训练模型对多电容排列图中的电 容进行分类检测,得到电容缺陷预测结果。当电容的检测数据对应的目标函数值小于-1时,则认为该待检测数据与负样本的分类相同;当检测数据对应的目标函数值大于1时,则认为该待检测数据与正样本的分类相同。同时支持异常值惩罚因子C,即允许分类不完全严格。
步骤5,根据电容图中的轮廓层级关系对电容缺陷预测结果进行二次筛选,确定有缺陷的电容,并对该电容进行缺陷定位及缺陷大小计算。
步骤5.1,对电容缺陷预测结果中每一个单个电容图像进行轮廓检测,获得所有轮廓,再根据轮廓层级关系进行缺陷定位。
步骤5.2,计算得出缺陷的实际尺寸,并根据该尺寸对缺陷电容进行缺陷等级分类。最终的检测结果如图6所示,绿色的框表示检测结果为正常电容,其他颜色的框表示检测结果为不同等级的缺陷电容。其中,黄色表示缺陷≤0.25mm的缺陷电容;橙色表示缺陷≤0.50mm的缺陷电容,用红色表示缺陷≤1.00mm的缺陷电容,用深红色表示缺陷≤1.50mm的缺陷电容,用紫色表示缺陷≤2.00mm的缺陷电容,用深蓝色表示缺陷≤2.50mm的缺陷电容。
Claims (5)
- 一种结合了图像处理方法和支持向量机的监督学习方法的电容内部缺陷的智能检测方法,其特征在于该方法包括以下步骤:步骤1,将超声扫描成像的包含2000个电容的多电容排列图分割为单个电容图像。步骤2,对分割出的单个电容图像进行尺寸归一化处理,灰度处理及二值化处理。步骤3,在预处理后的所有单个电容图像中,分别筛选出一定数量的正常样本和缺陷样本,采用支持向量机的监督学习方法训练模型。步骤4,根据支持向量机的监督学习方法,使用电容分类训练模型对多电容排列图中的电容进行分类检测,得到电容缺陷预测结果。步骤5,根据电容图中的轮廓层级关系对电容缺陷预测结果进行二次筛选,确定有缺陷的电容,并对该电容进行缺陷定位及缺陷大小计算。
- 根据权利要求1所述的结合了图像处理方法和支持向量机的监督学习方法的电容内部缺陷的智能检测方法的步骤1的特征在于进一步包括:步骤1.1,首先对多电容排列图进行预处理,包括灰度处理,二值化处理及中值滤波,然后对多电容排列预处理图进行外轮廓检测,使得既能在多电容排列图中忽略每个电容的内部缺陷轮廓,又能够在多电容排列图中找出每个电容的电容轮廓。步骤1.2,计算得出多电容排列图中所有外轮廓的最小正外接矩形。步骤1.3,根据不同型号电容的尺寸,对最小外接矩形进行过滤,剔除明显不是电容的干扰分割区。步骤1.4,以筛选后的多电容排列图中的所有最小外接矩形为分割边界,对多电容排列原始图进行分割处理,从而得到所有单个电容图像。步骤1.5,判断单个电容图像中的电容摆放位置,针对没有水平摆放的电容,则根据其最小斜外接矩形的中心点及旋转角度信息得到旋转矩阵算子,并利用该算子将电容水平摆正,以利于智能分析。
- 根据权利要求1所述的结合了图像处理方法和支持向量机的监督学习方法的电容内部缺陷的智能检测方法的步骤2的特征在于进一步包括:步骤2.1,将所有单个电容图像的长宽都缩放到归一化尺寸W和H,得到单个电容图像的归一化图像。步骤2.2,利用空间映射的方法将归一化图像的颜色模式由RGB模式转换为灰度模式。步骤2.3,利用最大类间方差法OTSU对电容灰度图像进行二值化处理。
- 根据权利要求1所述的结合了图像处理方法和支持向量机的监督学习方法的电容内部缺陷的智能检测方法的步骤3的特征在于进一步包括:步骤3.1,首先根据样本类型设置目标值label i,如果为正常样本则将label设置为0,如果为缺陷样本则将label设置为1,然后遍历每一个样本图像的所有像素点,并将像素点的编号设置为特征索引index i,将像素点的RGB值设置为特征值value i。步骤3.2,当处理完所有样本图像后,将得到的数据进行归一化以得到最终的训练数据。步骤3.3,使用支持向量机的监督学习方法来训练电容分类模型。
- 根据权利要求1所述的结合了图像处理方法和支持向量机的监督学习方法的电容内部缺陷的智能检测方法的步骤5的特征在于进一步包括:步骤5.1,对电容缺陷预测结果中每一个单个电容图像进行轮廓检测,获得所有轮廓,再根据轮廓层级关系进行缺陷定位。步骤5.2,计算得出缺陷的实际尺寸,并根据该尺寸对缺陷电容进行缺陷等级分类。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2019/122861 WO2021109011A1 (zh) | 2019-12-04 | 2019-12-04 | 一种基于超声图像的电容内部缺陷智能检测方法 |
CN202011285928.0A CN112862744B (zh) | 2019-12-04 | 2020-11-17 | 一种基于超声图像的电容内部缺陷智能检测方法 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2019/122861 WO2021109011A1 (zh) | 2019-12-04 | 2019-12-04 | 一种基于超声图像的电容内部缺陷智能检测方法 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021109011A1 true WO2021109011A1 (zh) | 2021-06-10 |
Family
ID=75996335
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/122861 WO2021109011A1 (zh) | 2019-12-04 | 2019-12-04 | 一种基于超声图像的电容内部缺陷智能检测方法 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN112862744B (zh) |
WO (1) | WO2021109011A1 (zh) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113822867A (zh) * | 2021-09-24 | 2021-12-21 | 东莞市诺丽电子科技有限公司 | 一种列车外观异常检测方法及列车外观异常检测系统 |
CN113838025A (zh) * | 2021-09-22 | 2021-12-24 | 联想(北京)有限公司 | 处理方法和处理装置 |
CN116008294A (zh) * | 2022-12-13 | 2023-04-25 | 无锡微准科技有限公司 | 一种基于机器视觉的键帽表面颗粒缺陷检测方法 |
CN116304645A (zh) * | 2023-05-24 | 2023-06-23 | 奥谱天成(厦门)光电有限公司 | 一种基于模态分解的重叠峰提取的方法及装置 |
TWI834426B (zh) * | 2022-06-21 | 2024-03-01 | 大陸商蘇州康代智能科技股份有限公司 | Pcb缺陷檢測模型的評估方法、評估裝置及訓練方法 |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115641337B (zh) * | 2022-12-23 | 2023-04-07 | 中科慧远视觉技术(北京)有限公司 | 一种线状缺陷检测方法、装置、介质、设备及系统 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106570511A (zh) * | 2016-11-02 | 2017-04-19 | 上海大学 | 基于计算机视觉的键盘字符缺陷在线检测系统和方法 |
CN107389701A (zh) * | 2017-08-22 | 2017-11-24 | 西北工业大学 | 一种基于图像的pcb表观缺陷自动检测系统及方法 |
CN108872250A (zh) * | 2018-07-23 | 2018-11-23 | 广州超音速自动化科技股份有限公司 | 锂电池极耳焊反检测方法及极耳焊接检测系统 |
CN109658376A (zh) * | 2018-10-24 | 2019-04-19 | 哈尔滨工业大学 | 一种基于图像识别的表面缺陷识别方法 |
US10417524B2 (en) * | 2017-02-16 | 2019-09-17 | Mitsubishi Electric Research Laboratories, Inc. | Deep active learning method for civil infrastructure defect detection |
CN110333240A (zh) * | 2019-07-03 | 2019-10-15 | 珠海格力智能装备有限公司 | 电容外观的检测方法及装置、存储介质和处理器 |
Family Cites Families (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015184153A (ja) * | 2014-03-25 | 2015-10-22 | Ntn株式会社 | 軸受部品の内部欠陥検査装置および内部欠陥検査方法 |
CN104392432A (zh) * | 2014-11-03 | 2015-03-04 | 深圳市华星光电技术有限公司 | 基于方向梯度直方图的显示面板缺陷检测方法 |
CN106934803B (zh) * | 2017-03-13 | 2019-12-06 | 珠海格力电器股份有限公司 | 电子器件表面缺陷的检测方法及装置 |
CN109298031A (zh) * | 2017-08-04 | 2019-02-01 | 燕山大学 | 航天隔热复合材料粘接缺陷检测方法 |
CN107563999A (zh) * | 2017-09-05 | 2018-01-09 | 华中科技大学 | 一种基于卷积神经网络的芯片缺陷识别方法 |
CN108362746B (zh) * | 2018-02-01 | 2021-07-02 | 中国石油大学(华东) | 基于单对电极电容成像检测技术提离效应的缺陷判别方法 |
CN108982508B (zh) * | 2018-05-23 | 2020-11-24 | 江苏农林职业技术学院 | 一种基于特征模板匹配和深度学习的塑封体ic芯片缺陷检测方法 |
CN108711154A (zh) * | 2018-08-24 | 2018-10-26 | 深圳市诚捷智能装备股份有限公司 | 电容器缺陷检测方法、电容器缺陷检测系统及电容器组立捺印连体机 |
CN109541032A (zh) * | 2018-12-03 | 2019-03-29 | 国网上海市电力公司 | 一种片式元器件检测方法及系统 |
CN109978875A (zh) * | 2019-04-03 | 2019-07-05 | 无锡立赫智能科技有限公司 | 一种电容器外观缺陷识别方法及识别装置 |
CN110363746B (zh) * | 2019-06-13 | 2022-02-11 | 西安交通大学 | 一种基于卷积神经网络的超声无损检测信号分类方法 |
CN110349125A (zh) * | 2019-06-17 | 2019-10-18 | 武汉大学 | 一种基于机器视觉的led芯片外观缺陷检测方法及系统 |
-
2019
- 2019-12-04 WO PCT/CN2019/122861 patent/WO2021109011A1/zh active Application Filing
-
2020
- 2020-11-17 CN CN202011285928.0A patent/CN112862744B/zh active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106570511A (zh) * | 2016-11-02 | 2017-04-19 | 上海大学 | 基于计算机视觉的键盘字符缺陷在线检测系统和方法 |
US10417524B2 (en) * | 2017-02-16 | 2019-09-17 | Mitsubishi Electric Research Laboratories, Inc. | Deep active learning method for civil infrastructure defect detection |
CN107389701A (zh) * | 2017-08-22 | 2017-11-24 | 西北工业大学 | 一种基于图像的pcb表观缺陷自动检测系统及方法 |
CN108872250A (zh) * | 2018-07-23 | 2018-11-23 | 广州超音速自动化科技股份有限公司 | 锂电池极耳焊反检测方法及极耳焊接检测系统 |
CN109658376A (zh) * | 2018-10-24 | 2019-04-19 | 哈尔滨工业大学 | 一种基于图像识别的表面缺陷识别方法 |
CN110333240A (zh) * | 2019-07-03 | 2019-10-15 | 珠海格力智能装备有限公司 | 电容外观的检测方法及装置、存储介质和处理器 |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113838025A (zh) * | 2021-09-22 | 2021-12-24 | 联想(北京)有限公司 | 处理方法和处理装置 |
CN113822867A (zh) * | 2021-09-24 | 2021-12-21 | 东莞市诺丽电子科技有限公司 | 一种列车外观异常检测方法及列车外观异常检测系统 |
TWI834426B (zh) * | 2022-06-21 | 2024-03-01 | 大陸商蘇州康代智能科技股份有限公司 | Pcb缺陷檢測模型的評估方法、評估裝置及訓練方法 |
CN116008294A (zh) * | 2022-12-13 | 2023-04-25 | 无锡微准科技有限公司 | 一种基于机器视觉的键帽表面颗粒缺陷检测方法 |
CN116008294B (zh) * | 2022-12-13 | 2024-03-08 | 无锡微准科技有限公司 | 一种基于机器视觉的键帽表面颗粒缺陷检测方法 |
CN116304645A (zh) * | 2023-05-24 | 2023-06-23 | 奥谱天成(厦门)光电有限公司 | 一种基于模态分解的重叠峰提取的方法及装置 |
CN116304645B (zh) * | 2023-05-24 | 2023-08-15 | 奥谱天成(厦门)光电有限公司 | 一种基于模态分解的重叠峰提取的方法及装置 |
Also Published As
Publication number | Publication date |
---|---|
CN112862744A (zh) | 2021-05-28 |
CN112862744B (zh) | 2023-03-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021109011A1 (zh) | 一种基于超声图像的电容内部缺陷智能检测方法 | |
WO2019104767A1 (zh) | 基于深度卷积神经网络与视觉显著性的织物缺陷检测方法 | |
CN108355987B (zh) | 一种基于分块模板匹配的电池丝印质量检测方法 | |
CN105067638B (zh) | 基于机器视觉的轮胎胎膜表面字符缺陷检测方法 | |
CN113592845A (zh) | 一种电池涂布的缺陷检测方法及装置、存储介质 | |
CN107437243B (zh) | 基于x光图像的轮胎杂质检测方法及装置 | |
CN109490316A (zh) | 一种基于机器视觉的表面缺陷检测算法 | |
CN109191421B (zh) | 柱形锂电池圆周面凹坑视觉检测方法 | |
Liang et al. | Defect detection of rail surface with deep convolutional neural networks | |
CN111667475B (zh) | 一种基于机器视觉的大枣分级检测方法 | |
CN102654464A (zh) | 基于多特征模糊识别的铜带表面缺陷检测系统 | |
CN109685766A (zh) | 一种基于区域融合特征的布匹瑕疵检测方法 | |
CN110598030A (zh) | 一种基于局部cnn框架的甲骨拓片分类方法 | |
Marques et al. | Automatic road pavement crack detection using SVM | |
CN110473194A (zh) | 基于多图像块阈值分割算法的水果表面缺陷检测方法 | |
Cheng et al. | Image segmentation technology and its application in digital image processing | |
CN110096980A (zh) | 字符检测识别系统 | |
CN107610119A (zh) | 基于直方图分解的带钢表面缺陷精准检测方法 | |
WO2023231262A1 (zh) | 基于视觉振频识别的提升钢丝绳张力检测方法 | |
CN114719749A (zh) | 基于机器视觉的金属表面裂纹检测及真实尺寸测量方法及系统 | |
KR20200136004A (ko) | 세포 샘플 내에서 적어도 하나의 기형을 가지는 세포를 검출하기 위한 방법 | |
CN115345876A (zh) | 一种基于超声图像的螺栓螺纹缺陷检测方法 | |
CN116228651A (zh) | 一种布匹缺陷检测方法、系统、设备及介质 | |
Berwo et al. | Automotive engine cylinder head crack detection: Canny edge detection with morphological dilation | |
Li et al. | Detection of small size defects in belt layer of radial tire based on improved faster r-cnn |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19954731 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19954731 Country of ref document: EP Kind code of ref document: A1 |