A visual inspection method based on inductive surface defects
By employing a visual inspection method based on inductor surface defects, and utilizing multi-channel image processing technology and morphological operations, the problems of high false positive rate and low efficiency in inductor appearance defect detection are solved, achieving high-precision and low-cost automated inspection.
Patent Information
- Application Number
- CN202310768030.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-27
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2043-06-27
AI Technical Summary
The current manual inspection of inductor appearance defects has a high misjudgment rate and low efficiency, and it is particularly difficult to distinguish slight dark cracks and glue protrusions, resulting in frequent defective products being shipped out.
A visual inspection method based on inductive surface defects is adopted. Multi-channel images are converted into single-channel images, grayscale information templates are established, affine transformation matrices are calculated, grayscale stretching and morphological operations are performed, and defects are detected by utilizing grayscale differences and contour feature points.
It improved detection accuracy, reduced the false positive rate, enhanced detection efficiency, and reduced labor costs.
Smart Images

Figure CN116797578B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of visual inspection, in particular to a visual inspection method based on inductance surface defects. BACKGROUND
[0002] Inductance is widely used in our life, and in the process of producing inductance, there are many defects. The purpose of detecting inductance appearance defects is to solve the problem of defective products flowing out, increase production and reduce cost. Among the many defects of inductance, glue convexity and dark crack are the most difficult defects in inductance quality inspection. For slight dark crack and glue convexity, it is difficult for artificial to distinguish and handle, resulting in many defective products flowing out frequently, and the quality inspection has always been time-consuming and laborious and inaccurate.
[0003] In recent years, with the rapid development of modern industry and the improvement of manufacturing technology, the level of automated technology manufacturing is also getting higher and higher. At the same time, digital image processing technology and machine learning have been widely applied and developed in many fields. Using machine vision detection technology to replace human eye detection has become an irresistible trend in the future.
[0004] Therefore, with the help of visual inspection technology, it is necessary to provide an inductance appearance defect detection method with high detection precision and efficiency, which can replace artificial detection and reduce labor cost. SUMMARY
[0005] The purpose of the present application is to provide a visual inspection method based on inductance surface defects, which can solve the problem of high false positive rate and low efficiency of artificial detection.
[0006] In order to solve the above technical problems, the present application provides the following technical scheme: a visual inspection method based on inductance surface defects, comprising the following steps,
[0007] Step 1, acquiring multiple channel images of the product to be inspected by taking an image module, and converting the multiple channel images into single channel images;
[0008] Step 2, establishing a region for the single channel image, creating a template according to the gray scale information in the region, and obtaining the center coordinate position of the template;
[0009] Step 3, drawing one or more detection regions for the image surface of the product to be inspected;
[0010] Step 4, calculating the affine transformation matrix, and calculating the relative distance between the detection region and the template position to realize the translation and rotation of the detection region following the template position;
[0011] Step 5, cutting the drawn detection region, calculating the pixel equivalent in the cutting region, linearly stretching each pixel in the region from 0 to 255, and processing it by using the gray difference degree function.
[0012] Step 6, morphological operation, by adjusting each pixel in the image based on the value of other pixels in its neighborhood, different structure elements are constructed for morphological operation, and finally the inductance surface defect detection is realized according to the contour feature points.
[0013] The visual detection method based on inductance surface defects has the advantages that:
[0014] 1. The linear change of gray scale of part of defects in different spatial domains is more obvious, therefore, different spatial domain images are decomposed by different color component information, so that the defects are easier to obtain and detect.
[0015] 2. By reducing the detection field of view range, the gray scale stretching enhances the gray scale difference, reduces most of the misjudgment rate, and further improves the detection efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiment or prior art description. Obviously, the drawings described below are some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.
[0017] Fig. 1 The inductance surface defect detection method flow chart is described in the present application.
[0018] Fig. 2 The inductance defect image processing chart is described in the present application. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical scheme and advantages of the embodiments of the present application more clear, the technical scheme in the embodiments of the present application will be described clearly and completely in the following with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0020] In the description of the present application, it should be noted that unless otherwise explicitly specified and limited, the terms "mounting", "connection", "connection" should be understood in a broad sense, for example, it can be fixed connection, or detachable connection, or integral connection; it can be mechanical connection, or electrical connection; it can be directly connected, or indirectly connected through intermediate medium, or the communication between two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0021] Referring to Figs. 1-2 An embodiment of the present application provides a visual detection method based on inductance surface defects, comprising the following steps,
[0022] Step 1, an image of a product to be detected is acquired by a taking image module, and the image is converted into a single channel image;
[0023] Specifically, the taking image module acquires a color image of an inductance to be detected (hereinafter referred to as inductance) through a three-color light illumination mode, and the acquired color image is decomposed into three images of different channels of R, G and B, and then the three-channel images are converted into H, S and V color spaces.
[0024] In this embodiment, nine taking image modules are provided, which are named C1, C2, C3, C4, C5, C6, C7, C8 and C9 in this embodiment, and the nine taking image modules are arranged beside a rotating disc, the inductance is transported by the rotating disc, and the inductance on the rotating disc is imaged by the taking image modules. Among the nine taking image modules, four are end surface taking image modules, and five are side surface taking image modules. The end surface taking image module includes a camera, a lens and a light source, and the side surface taking image module adds a prism to the end surface taking image module.
[0025] Specifically, the camera in the C1 taking image module shoots the end surface bottom body of the inductance from bottom to top; the camera in the C2 taking image module shoots the outer side surface of the inductance through a 45-degree prism from top to bottom; the camera in the C3 taking image module shoots the side surface electrode of the inductance through a 45-degree prism from top to bottom; the camera in the C4 taking image module shoots the front end surface of the product from top to bottom; the camera in the C5 taking image module shoots the inner side surface of the inductance through a 45-degree prism from top to bottom; the camera in the C6 taking image module shoots the electrode surface through a 45-degree prism from top to bottom; the camera in the C7 taking image module shoots the end surface bottom electrode of the product from bottom to top; the camera in the C8 taking image module shoots the front end foot surface of the product from top to bottom; and the camera in the C9 taking image module is a horizontal camera, and the camera lens shoots the inner and outer side surface profile of the product.
[0026] Step 2, a region is established for the single channel image, a template is created according to the gray scale information in the region, and the center coordinate position of the template is obtained;
[0027] Specifically, the gray scale difference function measurement is used to select an image with high pixel distribution uniformity and less detection and background noise as the reference image, a region with a single characteristic and gray scale attribute in the reference image is selected, a gray scale information reference template is established, and it is determined whether there is a similar feature to the template in the image, so as to determine the template region. The matching algorithm is based on NCC gray scale template matching, that is, the normalized cross-correlation coefficient. The theoretical basis formula features are as follows:
[0028]
[0029] Where f represents the p-point gray value, u represents the average pixel in the image window, and represents the standard deviation. If t represents the template pixel value, then:
[0030]
[0031] Where N is the total number of template pixels, and n-1 is the degree of freedom. Finally, the pixel center of the area in the template region is calculated to obtain the coordinate position and angle.
[0032] Step 3, draw one or more detection areas on the image surface of the product to be inspected;
[0033] Specifically, one or more detection areas are established in the region to be inspected in the product image window, the detection area range is reduced, and the interference information brought by large field of view detection is reduced.
[0034] Step 4, calculate the affine transformation matrix to obtain the relative distance between the detection area and the template position, and realize the translation and rotation of the detection area following the template position;
[0035] Specifically, according to the association between the template center coordinate information and the center position of the similar region matched therewith, a rigid affine transformation is calculated according to the point correspondence and the two corresponding angles, that is, a transformation by rotation and translation is calculated and returned as a homogeneous transformation matrix, and the drawn region is translated and rotated following the template center region.
[0036] Step 5, crop the drawn detection area, calculate the pixel equivalent in the cropped area, linearly stretch each pixel in the region from 0 to 255, and process it using a gray difference degree function;
[0037] Specifically, the detection area after following and rotating is segmented and recognized, and the image integrity and local characteristics are adjusted purposefully at the same time, so as to improve the difference between the product surface defects and the background features in the image, remove the interference noise points around the detection, and strengthen the image interpretation and recognition effect. The gray difference degree function can be obtained as follows:
[0038] g':=g*Mult+Add
[0039] The current pixel value is represented as g, the multiplied coefficient is represented as Mult, and Add is the offset. According to the formula, the linear change of gray value is obtained by multiplying and offsetting.
[0040] Step 6, morphological operation, by adjusting each pixel in the image based on the values of other pixels in its neighborhood, different structure elements are constructed for morphological operation, and finally the inductance surface defect detection is realized according to the contour feature points.
[0041] By using expansion, corrosion, differential morphological operation, required feature information is obtained and numerical extraction is performed through the feature information, and finally good products and defective products are screened through pixel size and area, and the good products and defective products are classified into different material receiving mechanisms.
[0042] In the description of the present application, it should be noted that unless specifically defined and limited, the terms "mounting", "connected", "connection" should be understood broadly, for example, it can be fixed connection, or detachable connection, or integral connection; it can be mechanical connection, or electrical connection; it can be directly connected, or indirectly connected through intermediate medium, or internal communication of two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0043] The device embodiments described above are only schematic, wherein the units illustrated as separate components can or can not be physically separate, and the components illustrated as units can or can not be physical units, i.e. can be located in one place, or can be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment. Those skilled in the art can understand and implement without creative labor.
[0044] Finally, it should be noted that: the above examples are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing examples, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing examples, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for visual inspection of surface defects based on inductance, characterized in that: The method comprises the following steps, Step 1, obtaining a multi-channel image of a product to be detected by a camera module, and converting the multi-channel image into a single-channel image; Step 2, establishing a region for the single-channel image, creating a template according to gray scale information in the region, and obtaining a center coordinate position of the template; Step 3, drawing one or more detection regions for a surface detection area of the product image; Step 4, calculating an affine transformation matrix, obtaining a relative distance between the detection region and the template position, and realizing translation and rotation of the detection region following the template position; Step 5, cutting the drawn detection region, calculating a pixel equivalent in the cutting region, linearly stretching each pixel in the region from 0 to 255, and processing by using a gray scale difference degree function; Step 6, morphological operation, adjusting each pixel in the image based on other pixel values in its neighborhood, constructing different structural elements for morphological operation, and finally realizing surface defect detection of the inductor according to contour feature points.
Citation Information
Patent Citations
High-frequency inductance bonding pad quality detection method and system
CN111402222A