A method for detecting microphone component defects based on X-ray imaging
Through the detection method based on X-ray imaging, the problem of complex background of the microphone element Pad and ring area is solved, resulting in low detection accuracy, and high-precision defect detection is achieved.
Patent Information
- Application Number
- CN202111489953.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-08
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2041-12-08
AI Technical Summary
In the prior art, due to the complex background of the microphone element Pad area and the ring area, manual detection accuracy is not high and time-consuming.
Using an X-ray imaging-based detection method, MASK images are acquired by collecting X-Ray images of microphone elements, positioning segmentation, and AI training, calibration and amplification, extracting the areas to be detected, dividing the Pad and ring areas, and performing defect detection and output results.
It effectively reduces the interference of background to the detection area and greatly improves the accuracy of internal defect detection of microphone components.
Smart Images

Figure CN114240865B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of defect detection, and in particular to a microphone element defect detection method based on X-ray imaging. Background Art
[0002] During the microphone component manufacturing process, due to problems such as improper manufacturing process or operation methods, defects of different levels will be generated inside the components. Such defects are difficult to distinguish with the naked eye. Under X-Ray imaging, its internal structure can be clearly presented. The internal defects of the microphone components are mainly distributed in the Pad area and the ring area, but the grayscale of the Pad area and the ring area is uneven. Direct manual inspection will lead to misjudgment due to the complex background and many interference factors. The detection accuracy is low and it is time-consuming and labor-intensive. Summary of the invention
[0003] The present invention discloses a microphone element defect detection method based on X-ray imaging, which solves the problem that when defects in the pad area and the annular area of the microphone element are directly detected manually, the detection accuracy is low and the detection is time-consuming and labor-intensive due to the complex background. It effectively reduces the interference of the background on the detection area and greatly improves the detection accuracy.
[0004] To achieve the above object, the technical solution of the present invention is specifically implemented as follows:
[0005] The present invention discloses a method for detecting microphone element defects based on X-ray imaging, comprising the following steps:
[0006] S1: Collect X-Ray images of microphone elements;
[0007] S2: Position and segment the collected X-Ray image of the microphone element, and extract the ROI area required for detection;
[0008] S3: Segment the ROI area of the microphone element and input it into AI training to obtain its MASK image;
[0009] S4: Calibrate the Mask image of the microphone element and calculate the magnification, and extract each part area to be detected in the X-Ray image of the microphone element according to a preset rectangular template, count the number of areas to be detected, and collect and mark the center coordinate points of each area to be detected;
[0010] S5: Divide the pad area and the ring area of the microphone element;
[0011] S6: Detecting the pad area of the microphone element;
[0012] S7: Detecting the circular area of the microphone element;
[0013] S8: Output the detection result.
[0014] Furthermore, defect detection items for the pad area of the microphone element include pad coverage, pad bridging and cold soldering.
[0015] Furthermore, defect detection items for the circular ring area of the microphone element include the bubble area ratio within the circular ring, whether there are solder beads in the circular ring, circular ring breakage and bubble ring width ratio.
[0016] Furthermore, the step of detecting the microphone element Pad area includes:
[0017] Extract the center coordinate points of each area to be detected collected in S4, and find the intersection with the rectangular template to determine the Pad area currently being detected;
[0018] The determined current detection Pad area is intersected with the Mask image of the microphone element obtained in S3 to obtain area R1;
[0019] R1 intersects with the rectangular template to obtain region R2;
[0020] Calculate the number of regions R2. If the number of regions R2 is 0, it is a cold soldering defect. If the number of regions R2 is greater than 1, it is a solder joint defect.
[0021] Calculate the area and coverage of the current detection pad area and compare it with the preset standard coverage.
[0022] Furthermore, the step of detecting the microphone element circular area includes:
[0023] Get the center point of the annular area, and extend several rays from the center point as the starting point. Each ray has an intersection with the annular area, and the angles between two adjacent rays are the same.
[0024] Calculate the distance between each intersection point and the center point, and divide the intersection points into inner circle intersection points and outer circle intersection points;
[0025] The inner circle intersection is quasi-circled to obtain the inner circle; the outer circle intersection is quasi-circled to obtain the outer circle;
[0026] Subtract the outer circle from the inner circle to obtain the circle area Y1;
[0027] The outer ring and the mask image of the microphone element are intersected to obtain the broken ring area D2;
[0028] Subtract the circular ring area Y1 from the broken ring area D2 to obtain the broken ring area D3;
[0029] The inner ring and the outer ring are respectively intersected with the broken ring area D3. If both the inner ring and the outer ring intersect with the broken ring area, it is judged as a broken ring defect.
[0030] The inner circle area in the X-Ray image of the microphone element is extracted from the inner circle ring obtained by the quasi-circle, and the extracted inner circle area is binarized with a fixed threshold to detect whether there is a solder bead defect in the circle ring;
[0031] Extract all areas with grayscale values of 0 in the circular area on the Mask image of the microphone element, and calculate the ratio of the area of all areas with grayscale values of 0 to the area of the circular area;
[0032] Select the area with the largest gray value of 0 and calculate its ring width ratio.
[0033] Furthermore, the standard coverage interval is (0.75, 1.8).
[0034] Further, the step of calculating the ring width ratio includes:
[0035] Convert the area with the largest gray value of 0 to the polar coordinate system;
[0036] Calculate the projection length of the area with the largest gray value of 0 in the vertical direction;
[0037] The ratio of the projection length to the width of the annular region is calculated.
[0038] Beneficial technical effects:
[0039] The present invention discloses a microphone element defect detection method based on X-ray imaging, comprising the following steps: S1: collecting an X-Ray image of a microphone element; S2: positioning and segmenting the collected X-Ray image of the microphone element, and intercepting the ROI area required for detection; S3: segmenting the ROI area of the microphone element, and inputting it into AI training to obtain its MASK image; S4: calibrating the Mask image of the microphone element and calculating the magnification, and extracting each part area to be detected in the X-Ray image of the microphone element according to a pre-set rectangular template, counting the number of areas to be detected and collecting and marking the center coordinate points of each area to be detected; S5: dividing the Pad area and the annular area of the microphone element; S6: detecting the Pad area of the microphone element; S7: detecting the annular area of the microphone element; S8: outputting the detection result, which solves the problem that when the defects of the Pad area and the annular area of the microphone element are directly detected manually, the detection accuracy is low and it is time-consuming and labor-intensive due to the complex background, effectively reduces the interference of the background on the detection area, and greatly improves the detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solution of the present invention, the drawings required for describing the embodiments are briefly introduced below.
[0041] Figure 1 A flowchart of the steps of a method for detecting microphone element defects based on X-ray imaging according to the present invention;
[0042] Figure 2 A flowchart of the steps of Pad area detection in a microphone element defect detection method based on X-ray imaging according to the present invention;
[0043] Figure 3 A flowchart of the steps of detecting annular areas in a method for detecting microphone element defects based on X-ray imaging according to the invention;
[0044] Figure 4 is an X-Ray image of the microphone element;
[0045] Figure 5 is the Mask image of the microphone element;
[0046] Figure 6 It is a schematic diagram of a rectangular template;
[0047] Figure 7 The diagram is a schematic diagram showing that an X-Ray image of a microphone element is divided into a pad area and a ring area;
[0048] Figure 8a It is a schematic diagram of two rays extending from the center point of the circular area;
[0049] Figure 8b It is a schematic diagram of a number of rays extending from the center point of the circular area as the starting point;
[0050] Figure 8c It is a schematic diagram of the intersection of the ray and the ring area;
[0051] Fig. 9 is a schematic diagram of the inner and outer rings after fitting;
[0052] Fig.10 A schematic diagram of the ring area Y1 obtained by subtracting the outer ring from the inner ring;
[0053] Fig.11 A schematic diagram of the broken ring area D2 obtained by intersecting the outer ring with the mask image of the microphone element;
[0054] Fig.12 The schematic diagram of the broken ring area D3 is obtained by subtracting the circular ring area Y1 from the broken ring area D2;
[0055] Fig.13 Schematic diagram of the tin bead defect within the ring;
[0056] Fig.14 This is a schematic diagram of all black hole areas with grayscale values of 0 in the circular area of the Mask image;
[0057] Fig.15 It is a schematic diagram of a cold soldering defect;
[0058] Fig.16 Schematic diagram of tin-link defect.
[0059] Among them, 1-Pad area, 2-ring area, 3-tin bead defect area inside the ring, 4-cold soldering defect area, 5-tinning defect area. DETAILED DESCRIPTION
[0060] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0061] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0062] The present invention discloses a method for detecting microphone element defects based on X-ray imaging. Figure 1 , specifically including the following steps:
[0063] S1: Collect X-Ray images of microphone components, see Figure 4 ;
[0064] S2: Position and segment the collected X-Ray image of the microphone element, and extract the ROI area required for detection;
[0065] S3: Segment the ROI area of the microphone element and input it into AI training to obtain its MASK image;
[0066] Specifically, the AI neural network model is trained using the labeled image data, and the ROI area required for detection obtained in step S2 is input into the trained AI neural network model to obtain a Mask image of the microphone element, see Figure 5 , locate the component, and make corresponding rotation and fine-tuning on the ROI area and Mask image;
[0067] S4: Calibrate the Mask image of the microphone element and calculate the magnification, and extract each part area to be detected in the X-Ray image of the microphone element according to a preset rectangular template, count the number of areas to be detected, and collect and mark the center coordinate points of each area to be detected;
[0068] Specifically, according to the preset rectangular template, see Figure 6 , extract the coordinate points corresponding to the overall area and each part to be inspected and collect them. Since the actual algorithm determines the orientation of the sub-component according to the relative position relationship, calibration and magnification calculation are required. Calibration is to correct the tilt of the image and calibrate the relative position of each area. The magnification calculation is to obtain the length and width of the original image, set the relevant scaling factor according to the requirements, and scale the size of each component according to the factor. Different products are stored in different projects with different position parameters in mm. After calibration, they are converted into pixels accordingly. At the same time, the defect area will also be converted from square millimeters to pixels accordingly;
[0069] S5: Divide the pad area and the ring area of the microphone element;
[0070] For the division of microphone elements into regions, see Figure 7 , the area of the microphone element is divided into the pad area and the ring area. The detection of the pad area mainly includes defects such as pad coverage, pad tin short circuit and cold soldering; the detection of the ring area mainly includes defects such as the proportion of bubble area in the ring, whether there are tin beads in the ring, ring breakage and bubble width ratio in the ring;
[0071] S6: Detecting the pad area of the microphone element;
[0072] For the steps of detecting the pad area of the microphone element, refer to Figure 2 , specifically including the following steps:
[0073] Extract the center coordinate points of each area to be detected collected in S4, and find the intersection with the rectangular template to determine the Pad area currently being detected;
[0074] The determined current detection Pad area is intersected with the Mask image of the microphone element obtained in S3 to obtain area R1;
[0075] R1 intersects with the rectangular template to obtain region R2;
[0076] Calculate the number of regions R2. If the number of regions R2 is 0, it is a cold soldering defect. Fig.15 ; If the number of regions R2 is greater than 1, it is a tinning defect, see Fig.16 ;
[0077] Calculate the area and coverage of the current detection pad area, and compare them with the preset standard coverage. The standard coverage interval set in the present invention is (0.75, 1.8). Coverage less than 0.75 or coverage greater than 1.8 is considered defective.
[0078] S7: Detecting the circular area of the microphone element;
[0079] For the steps of detecting the ring area of microphone elements, refer to Figure 3 , specifically including the following steps:
[0080] The center point of the annular area is obtained, and a number of rays are extended from the center point as the starting point. Each ray has an intersection with the annular area, and the angles between two adjacent rays are the same. In the invention, the rays extend outward at 0 degrees, 45 degrees, 90 degrees, 135 degrees, 180 degrees, 225 degrees, 270 degrees, 315 degrees and 360 degrees respectively. Figure 8a-8b ;
[0081] Calculate the distance between each intersection point and the center point, and divide the intersection points into inner circle intersection points and outer circle intersection points, see Figure 8c ;
[0082] The inner circle is obtained by quasi-circling the intersection points of the inner circle; the outer circle is obtained by quasi-circling the intersection points of the outer circle, see Fig. 9 ;
[0083] Subtract the outer ring from the inner ring to obtain the ring area Y1, see Fig.10 ;
[0084] The intersecting of the outer ring and the mask image of the microphone element is used to obtain the broken ring area D2, see Fig.11 ;
[0085] Subtract the circular area Y1 from the broken ring area D2 to obtain the broken ring area D3. Fig.13 ;
[0086] The inner ring and the outer ring are respectively intersected with the broken ring area D3. If both the inner ring and the outer ring intersect with the broken ring area, it is judged as a broken ring defect.
[0087] The inner circle area in the microphone element X-Ray image is extracted from the inner circle obtained by the quasi-circle, and the extracted inner circle area is binarized with a fixed threshold to detect whether there is a solder bead defect in the circle, see Fig.14 ;
[0088] Extract all areas with grayscale values of 0 in the circular area on the Mask image of the microphone element, and calculate the area ratio of all areas with grayscale values of 0 to the area ratio of the circular area. The bubble area is the area with grayscale values of 0 in the circular area on the Mask image. If the bubble area accounts for more than 25%, it is judged as a defective product.
[0089] Select the area with the largest gray value of 0 and calculate its ring width ratio.
[0090] Specifically, the bubble with the largest area is selected to calculate the bubble ring width ratio. However, the bubbles in the ring area may be connected to the edge of the ring. If the operation is performed directly on the ring, it may have a certain impact on the edge and thus reduce the accuracy of the bubble ring width ratio. Therefore, the polar coordinate transformation method is used to calculate the bubble ring width ratio. Specifically:
[0091] Convert the area with the largest gray value of 0 (the area of the largest bubble) to the polar coordinate system;
[0092] Calculate the projection length of the area with the largest gray value of 0 (the area of the bubble with the largest area) in the vertical direction;
[0093] Calculating the ratio of the projection length to the width of the annular region;
[0094] S8: Output the detection result;
[0095] Specifically, the pad area, the circular area and the corresponding coordinates of the microphone element are converted to the initial state according to the original magnification, annotated and displayed in the X-Ray image of the microphone element, and the detection results of each area are output in the form of an array.
[0096] The invention discloses a method for detecting defects of microphone components based on X-ray imaging, which effectively reduces the interference of background on the area to be detected and greatly improves the accuracy of detecting defects inside microphone components.
[0097] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0098] The above embodiments are only descriptions of the preferred implementation modes of the present invention, and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary engineering and technical personnel in the field should fall within the protection scope determined by the claims of the present invention.
Claims
1. A method for detecting microphone element defects based on X-ray imaging, characterized in that: The following steps are involved: S1: Collect X-Ray images of microphone elements; S2: Position and segment the collected X-Ray image of the microphone element, and extract the ROI area required for detection; S3: Segment the ROI area of the microphone element and input it into AI training to obtain its Mask image; S4: Calibrate the Mask image of the microphone element and calculate the magnification, and extract each part area to be detected in the X-Ray image of the microphone element according to a preset rectangular template, count the number of areas to be detected, and collect and mark the center coordinate points of each area to be detected; S5: Divide the pad area and the ring area of the microphone element; S6: Detecting the pad area of the microphone element; The steps for detecting the pad area of the microphone element include: Extract the center coordinate points of each area to be detected collected in S4, and find the intersection with the rectangular template to determine the Pad area currently being detected; The determined current detection Pad area is intersected with the Mask image of the microphone element obtained in S3 to obtain area R1; R1 intersects with the rectangular template to obtain region R2; Calculate the number of regions R2. If the number of regions R2 is 0, it is a cold soldering defect. If the number of regions R2 is greater than 1, it is a solder joint defect. Calculate the area and coverage of the current detection pad area and compare it with the preset standard coverage; S7: Detecting the circular area of the microphone element; The steps for detecting the microphone element ring area include: Get the center point of the annular area, and extend several rays from the center point as the starting point. Each ray has an intersection with the annular area, and the angles between two adjacent rays are the same. Calculate the distance between each intersection point and the center point, and divide the intersection points into inner circle intersection points and outer circle intersection points; The inner circle intersection is quasi-circled to obtain the inner circle; the outer circle intersection is quasi-circled to obtain the outer circle; Subtract the outer circle from the inner circle to obtain the circle area Y1; The outer ring and the mask image of the microphone element are intersected to obtain the broken ring area D2; Subtract the circular ring area Y1 from the broken ring area D2 to obtain the broken ring area D3; The inner ring and the outer ring are respectively intersected with the broken ring area D3. If both the inner ring and the outer ring intersect with the broken ring area, it is judged as a broken ring defect. The inner circle area in the X-Ray image of the microphone element is extracted from the inner circle ring obtained by the quasi-circle, and the extracted inner circle area is binarized with a fixed threshold to detect whether there is a solder bead defect in the circle ring; Extract all areas with grayscale values of 0 in the circular area on the Mask image of the microphone element, and calculate the ratio of the area of all areas with grayscale values of 0 to the area of the circular area; Select the area with the largest gray value of 0 and calculate its ring width ratio; S8: Output the detection result.
2. The method for detecting microphone element defects based on X-ray imaging according to claim 1, characterized in that: The defect detection items for the pad area of microphone components include pad coverage, pad bridging and cold soldering.
3. The method for detecting microphone element defects based on X-ray imaging according to claim 1, characterized in that: The defect detection items for the circular ring area of the microphone element include the bubble area ratio within the circular ring, whether there are solder beads in the circular ring, the broken ring and the bubble ring width ratio.
4. The method for detecting microphone element defects based on X-ray imaging according to claim 1, characterized in that: The standard coverage interval is (0.75, 1.8).
5. The method for detecting microphone element defects based on X-ray imaging according to claim 1, characterized in that: The steps to calculate the ring width ratio include: Convert the area with the largest gray value of 0 to the polar coordinate system; Calculate the projection length of the area with the largest gray value of 0 in the vertical direction; The ratio of the projection length to the width of the annular region is calculated.
Citation Information
Patent Citations
Chip appearance detection method and system
CN101995223A
Automatic BGA defect detection method
CN106770333A