A method, device, equipment and storage medium for detecting MIC hole defects
By identifying the shape and feature values of the PI surface in the circuit board image, the problem that existing AI detection technologies cannot detect the qualification of MIC holes is solved, and fast and accurate MIC hole detection is achieved.
Patent Information
- Application Number
- CN202311146503.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-06
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2043-09-06
AI Technical Summary
Existing AI detection technology cannot effectively detect whether the MIC holes on the circuit board are qualified, especially whether they are missing, too small, or misaligned.
By identifying the shape of the PI surface in the circuit board image, it is determined whether it is circular or annular. The feature value of the PI surface is calculated and compared with a preset threshold to determine whether the MIC hole is too small or misaligned. Contour mapping or contour recognition is used to determine the detection area.
It enables rapid detection of whether the MIC holes on the circuit board meet the requirements, improves the detection speed and accuracy, and can effectively screen out unqualified MIC holes.
Smart Images

Figure CN117274174B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of MIC hole defect detection technology, and specifically to a MIC hole defect detection method, apparatus, equipment, and storage medium. Background Technology
[0002] During the production of circuit boards, they need to be inspected to remove unqualified boards. Currently, most circuit board inspections are conducted using AI technology to detect defects such as scratches, optical defects, and CVL (FPC cover film) anomalies on the circuit board surface. Among these, CVL anomalies include CVL misalignment and CVL solder mask misalignment.
[0003] In circuit board applications, it is necessary to create a MIC (Microphone) hole on the circuit board. A schematic diagram of a qualified MIC hole is shown below. Figure 1 As shown, the MIC hole is opened on the circular PI (Polyimide) surface. The PI surface refers to the area formed by the material polyimide. The outer periphery of the PI surface is provided with a ring-shaped gold wire area, i.e., a ring-shaped gold surface. When the MIC hole is opened on the PI surface, the PI surface becomes a PI hole ring.
[0004] Currently, most MIC holes are made by stamping. When the stamping position of the circuit board deviates, the position of the MIC hole will be abnormal. Therefore, it is necessary to check whether the MIC hole is qualified and screen out the unqualified MIC holes. In addition, there may be cases where the circuit board is not stamped during actual production. In this case, there is no MIC hole on the circuit board, so it is also necessary to detect this situation.
[0005] Existing AI detection technologies can often only identify the gold wire area and the PI area, but cannot detect whether the MIC hole is qualified. That is, they cannot detect whether the MIC hole is under-punched, too small, or misaligned. Summary of the Invention
[0006] In view of the shortcomings of the prior art, the present invention provides a method, apparatus, device and storage medium for detecting MIC hole defects. The technical problem to be solved is that existing AI technology cannot detect whether MIC holes are qualified when visually inspecting circuit boards.
[0007] To address the above technical problems, in a first aspect, the present invention provides the following technical solution: a method for detecting MIC hole defects, the method comprising...
[0008] Acquire an image containing the MIC hole to be detected;
[0009] The detection area is determined in the image;
[0010] First, identify the PI surface within the detection area and determine whether the PI surface is circular or annular. If the PI surface is circular, there is a MIC hole under-punch defect, and the detection ends. If the PI surface is annular, calculate the feature value of the PI surface, then compare the feature value with a preset threshold, and determine whether the MIC hole is too small based on the comparison result. If the MIC hole is too small, the detection ends; otherwise, determine whether the area of the MIC hole exceeds a preset area. If the area of the MIC hole exceeds the preset area, there is a MIC hole misalignment defect; otherwise, the detection is qualified.
[0011] In a first embodiment of the first aspect, the detection area is determined as follows:
[0012] The detection area can be determined by contour mapping matching or by contour recognition.
[0013] In a second embodiment based on the first aspect of the first implementation, the step of determining the detection region by contour mapping matching is as follows:
[0014] First, the image is mapped to the master image, and the MIC hole coordinates on the image are determined according to the MIC hole coordinates on the master image. Then, the detection area is determined according to the MIC hole coordinates.
[0015] The steps for determining the detection region using contour recognition are as follows:
[0016] First, the image is identified to locate the MIC hole, and then the detection area is determined based on the location of the MIC hole.
[0017] In the third embodiment of the first aspect, the calculated characteristic value is the average width of the PI surface, or the inner radius of the PI surface, or the inner diameter of the PI surface.
[0018] In the fourth embodiment based on the third embodiment of the first aspect, when the feature value of the PI surface is the average width of the PI surface, the average width is compared with the preset average width. If the average width is greater than the preset average width, it is considered that there is a defect of the MIC hole being too small.
[0019] When the characteristic value of the PI surface is the inner circle radius of the PI surface, the inner circle radius of the PI surface is compared with the preset inner circle radius. If the inner circle radius of the PI surface is smaller than the preset inner circle radius, it is considered that there is a defect of the MIC hole being too small.
[0020] When the characteristic value of the PI surface is the inner diameter of the PI surface, the inner diameter of the PI surface is compared with the preset inner diameter. If the inner diameter of the PI surface is smaller than the preset inner diameter, it is considered that there is a defect of the MIC hole being too small.
[0021] In the fifth embodiment of the first aspect, the method for determining whether a MIC hole misalignment defect exists is as follows:
[0022] The presence of a MIC hole exceeding a preset area is determined by judging whether the shortest distance between the inner and outer circles of the PI surface is less than a distance threshold. If the shortest distance is less than the distance threshold, there is a MIC hole misalignment defect.
[0023] In the sixth embodiment of the first aspect, the method for determining whether a MIC hole misalignment defect exists is as follows:
[0024] Identify the annular gold surface within the detection area, calculate the roundness of the inner circle of the annular gold surface, and then determine whether there is a MIC hole misalignment defect based on the roundness.
[0025] Secondly, the present invention also provides a MIC hole defect detection device, including...
[0026] Image acquisition unit, used to acquire an image of the MIC hole to be detected;
[0027] A detection region determination unit is used to determine a detection region on the image;
[0028] The first processing unit is used to identify the PI surface within the detection area and determine whether the PI surface is a circular surface or an annular surface; if the PI surface is a circular surface, there is a MIC hole punching defect, and the detection ends.
[0029] The second processing unit is used to calculate the feature value of the PI surface when there is no MIC hole punching defect, then compare the feature value with a preset threshold, and determine whether the MIC hole is too small based on the comparison result. If the MIC hole is too small, the detection ends.
[0030] The third processing unit is used to determine whether there is a portion of the MIC hole area that exceeds the preset area when the MIC hole is not misaligned. If the MIC hole area exceeds the preset area, there is a MIC hole misalignment defect, and the test ends; otherwise, the test is considered qualified.
[0031] Thirdly, the present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executed as in any of the methods described above.
[0032] Fourthly, the present invention also provides a computer-readable storage medium, characterized in that it stores a computer program capable of being loaded by a processor and executed as in any of the methods described above.
[0033] The beneficial effects of this invention compared with the prior art are as follows: The method of this invention first identifies the PI surface within the detection area and determines whether the PI surface is circular or annular. If the PI surface is circular, there is a MIC hole under-punch defect, and the detection ends. If the PI surface is annular, the feature value of the PI surface is calculated, and then the feature value is compared with a preset threshold. Based on the comparison result, it is determined whether the MIC hole is too small. If the MIC hole is too small, the detection ends. Otherwise, it is determined whether the area of the MIC hole exceeds a preset area. If the area of the MIC hole exceeds the preset area, there is a MIC hole misalignment defect. Otherwise, the detection is qualified. Thus, it can quickly detect whether the MIC holes on the circuit board meet the requirements. Attached Figure Description
[0034] Figure 1 A schematic diagram of a qualified MIC hole;
[0035] Figure 2 A schematic diagram of the structure of the MIC hole leakage punch;
[0036] Figure 3 A schematic diagram of a structure where the MIC aperture is too small;
[0037] Figure 4 This is a schematic diagram of the first structure for MIC hole misalignment.
[0038] Figure 5 This is a schematic diagram of the second structure for MIC hole misalignment.
[0039] Figure 6 A schematic diagram of the obtained circuit board image;
[0040] Figure 7 This is a schematic diagram of the structure of the device of the present invention in the embodiment;
[0041] Figure 8 This is a schematic diagram of the structure of the device of the present invention in an embodiment.
[0042] In the figure: 1. Circuit board, 2. Ring gold surface, 3. PI surface, 4. MIC hole, 10. Image acquisition unit, 11. Detection area determination unit, 12. First processing unit, 13. Second processing unit, 14. Third processing unit, 20. Memory, 21. Processor. Detailed Implementation
[0043] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0044] The structure of the qualified MIC hole 4 opened on circuit board 1 is as follows: Figure 1As shown, it is located on the PI surface 3, where PI refers to polyimide material. The PI surface has a ring-shaped gold surface 2 around its perimeter. During the manufacturing of the MIC hole, defective MIC holes 4 need to be inspected and processed; otherwise, defective MIC holes 4 will affect the normal use of the circuit board 1, causing the headphones to be unable to be inserted. Defects present in the actual manufacturing of MIC holes 4 include incomplete punching, undersized holes, and misalignment.
[0045] To detect defects in MIC hole 4, this embodiment of the invention provides a method for detecting MIC hole defects, which is as follows:
[0046] Acquire an image containing the MIC hole 4 to be detected;
[0047] Identify the detection region in the image;
[0048] First, identify PI surface 3 within the detection area and determine whether PI surface 3 is circular or annular. If PI surface 3 is circular, there is a MIC hole under-punch defect, and the detection ends. If PI surface 3 is annular, calculate the feature value of PI surface 3, then compare the feature value with a preset threshold, and determine whether MIC hole 4 is too small based on the comparison result. If MIC hole 4 is too small, the detection ends. Otherwise, determine whether there is a part in the area of MIC hole 4 that exceeds the preset area. If there is a part in the area of MIC hole 4 that exceeds the preset area, there is a MIC hole 4 misalignment defect. Otherwise, the detection is qualified.
[0049] In this embodiment, a schematic diagram of the MIC hole 4 being punched is shown below. Figure 2 As shown in the diagram, the MIC hole 4 is too small. Figure 3 As shown in the diagram, one possible scenario of MIC hole 4 misalignment is as follows: Figure 4 As shown in the diagram, another schematic diagram of the MIC hole 4 misalignment is as follows: Figure 5 As shown. The actual obtained circuit board image is as follows. Figure 6 As shown, Figure 6 The left image in the image shows a defective MIC hole. Figure 6 The image on the right shows a qualified MIC hole.
[0050] In practical use, images of the MIC hole 4 can be acquired using a camera or webcam, and the type of camera or webcam can be set according to the detection accuracy. In one embodiment, multiple cameras can be set to acquire images of the MIC hole 4 to be detected. In another embodiment, the angle at which the camera shoots the circuit board 1 can be adjusted according to actual needs; it can shoot perpendicularly to the circuit board 1 or at an angle. In addition, to ensure the clarity of the captured image, an additional lighting source can be added to assist in the shooting.
[0051] Specifically, in this embodiment, there are two methods to determine the detection area, wherein method one is as follows:
[0052] The detection area is determined by contour mapping matching;
[0053] Method 2 is as follows:
[0054] The detection area is determined by contour recognition.
[0055] Specifically, for Method 1, the steps for determining the detection region through contour mapping matching are as follows:
[0056] First, the image is mapped to the master image, and the MIC hole coordinates on the image are determined based on the MIC hole coordinates on the master image. Then, the detection area is determined based on the MIC hole coordinates. The master image is the actual image that has been set up, specifically based on the circuit board 1 to be detected and MIC hole 4.
[0057] Specifically, for Method 2, the steps for determining the detection region using contour recognition are as follows:
[0058] First, the image is recognized to identify MIC hole 4. Then, the detection area is determined based on the position of MIC hole 4. Once MIC hole 4 is identified, it can be used as a reference point to divide the area into regions. The size of each region can be preset to determine the detection area. For example, the detection area can be formed by expanding outwards from MIC hole 4 as the center, and the detection area can be square in shape.
[0059] If there is no missed punching in MIC hole 4, it is necessary to determine whether MIC hole 4 is too small, referring to... Figure 3 When the MIC hole 4 is too small, it will cause the width of the PI surface 3 to increase, the inner radius of the PI surface 3 to decrease, or the inner diameter of the PI surface 3 to decrease. Based on this, in this embodiment, the calculated characteristic value is the average width of the PI surface 3, the inner radius of the PI surface 3, or the inner diameter of the PI surface 3.
[0060] Furthermore, when the feature value of PI surface 3 is the average width of PI surface 3, the average width is compared with the preset average width. If the average width is greater than the preset average width, it is considered that there is a defect that the MIC hole 4 is too small. The preset average width is set according to the actual detection requirements, and the existing algorithm can be used to calculate the average width of PI surface 3.
[0061] When the characteristic value of PI surface 3 is the inner circle radius of PI surface 3, the inner circle radius of PI surface 3 is compared with the preset inner circle radius. If the inner circle radius of PI surface 3 is smaller than the preset inner circle radius, it is considered that there is a defect that the MIC hole 4 is too small.
[0062] When the characteristic value of PI surface 3 is the inner diameter of PI surface 3, the inner diameter of PI surface 3 is compared with the preset inner diameter. If the inner diameter of PI surface 3 is smaller than the preset inner diameter, it is considered that there is a defect that the MIC hole 4 is too small.
[0063] When MIC hole 4 is not misaligned, it is necessary to determine whether MIC hole 4 has a misalignment defect. The method for determining whether MIC hole 4 has a misalignment defect is as follows:
[0064] exist Figure 4 In the middle, the MIC hole 4 has a misalignment defect because it is too close to the inner circle of the PI surface 3. Figure 4 Taking the misalignment defect shown as an example, the presence of a portion exceeding a preset area in the region of the MIC hole 4 is determined by judging whether the shortest distance between the inner and outer circles of the PI surface 3 is less than a distance threshold. If the shortest distance is less than the distance threshold, a misalignment defect of the MIC hole 4 exists. In actual use, the distance threshold can be set according to actual detection requirements; for example, the distance threshold can be 1 mm.
[0065] exist Figure 5 In the middle, MIC hole 4 has a misalignment defect due to being stamped onto the annular gold surface 2. Figure 5 Taking the misalignment defect shown as an example, the method for determining whether a MIC hole misalignment defect exists is as follows:
[0066] Identify the annular gold surface 2 within the detection area and calculate the roundness of the inner circle of the annular gold surface 2. Then, determine whether there is a misalignment defect in the MIC hole 4 based on the roundness. The roundness can be compared with a preset roundness. If the roundness is greater than the preset roundness, the MIC hole 4 has a misalignment defect. The preset roundness can be set according to actual needs.
[0067] In one implementation, the presence of the MIC hole 4 can be determined by calculating the overlap area between the MIC hole 4 and the annular gold surface 2. Figure 5 The shown is a misalignment defect.
[0068] The method of the present invention performs the detection sequentially by first detecting whether the MIC hole 4 is under-punched, then detecting whether the MIC hole 4 is too small, and finally detecting whether the MIC hole 4 is misaligned. This can improve the detection speed and reduce the processing time during detection.
[0069] In addition, such as Figure 7 As shown, the present invention also provides a MIC hole defect detection device, including...
[0070] Image acquisition unit 10 is used to acquire an image of the MIC hole 4 to be detected;
[0071] The detection region determination unit 11 is used to determine the detection region on the image;
[0072] The first processing unit 12 is used to identify the PI surface 3 within the detection area and determine whether the PI surface 3 is a circular surface or an annular surface; if the PI surface 3 is a circular surface, there is a MIC hole 4 under-punch defect, and the detection ends.
[0073] The second processing unit 13 is used to calculate the feature value of the PI surface 3 when there is no missing punching defect in the MIC hole 4, then compare the feature value with a preset threshold, and determine whether the MIC hole 4 is too small based on the comparison result. If the MIC hole 4 is too small, the detection ends.
[0074] The third processing unit is used to determine whether there is a portion of the area of MIC hole 4 that exceeds the preset area when MIC hole 4 is not deviated. If there is a portion of the area of MIC hole 4 that exceeds the preset area, then there is a MIC hole 4 misalignment defect and the test ends; otherwise, the test is considered qualified.
[0075] The MIC hole defect detection device provided in this application embodiment can be applied to the MIC hole defect detection method provided in the above embodiment. For relevant details, please refer to the above method embodiment. The implementation principle and technical effect are similar, and will not be repeated here.
[0076] It should be noted that the MIC hole defect detection device provided in this embodiment is only illustrated by the above-described division of functional modules / units when performing MIC hole defect detection. In practical applications, the above functions can be assigned to different functional modules / units as needed, that is, the internal structure of the MIC hole defect detection device can be divided into different functional modules / units to complete all or part of the functions described above. Furthermore, the implementation method of the MIC hole defect detection method provided in the above method embodiment and the implementation method of the MIC hole defect detection device provided in this embodiment belong to the same concept. The specific implementation process of the MIC hole defect detection device provided in this embodiment is detailed in the above method embodiment and will not be repeated here.
[0077] In addition, the present invention also provides a computer device, which may be a desktop computer, a laptop computer, a handheld computer, or a cloud server, etc. Figure 8 As shown, the computer device may include, but is not limited to, a processor 21 and a memory 20, on which a computer program capable of being loaded by the processor 21 and executed as described above is stored.
[0078] Additionally, the processor 21 and memory 20 can be connected via a bus or other means. The processor 21 can be a central processing unit (CPU). The processor 21 can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, graphics processing units (GPUs), embedded neural network processing units (NPUs) or other dedicated deep learning coprocessors, discrete gate or transistor logic devices, discrete hardware components, or combinations of the above types of chips.
[0079] The memory 20, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the methods in the above embodiments of this application. The processor 21 executes various functional applications and data processing by running the non-transitory software programs, instructions, and modules stored in the memory 20, thereby implementing the methods in the above embodiments. The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a function; the data storage area may store data created by the processor, etc. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 20 may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0080] Fourthly, the present invention also provides a computer-readable storage medium storing a computer program that can be loaded by a processor and executed as described in any of the methods above. The storage medium may be a magnetic disk, optical disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk drive (HDD), or solid-state drive (SSD), etc.; the storage medium may also include combinations of the above types of memory.
[0081] Unless otherwise defined, the technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains. The terms “first,” “second,” and similar terms used in this patent application specification and claims do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, terms such as “connected” or “linked” are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. “One end” and “the other end” indicate only relative positional relationships; when the absolute positional relationship of the described objects changes, the corresponding positional relationship also changes accordingly. Furthermore, “at least one” as used herein includes one, two, or more.
[0082] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention described herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the claims.
[0083] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A method for detecting MIC hole defects, characterized in that, The method includes Acquire an image containing the MIC hole to be detected; The detection area is determined in the image; First, identify the PI surface within the detection area and determine whether the PI surface is circular or annular. If the PI surface is circular, there is a MIC hole under-punch defect, and the test ends. If the PI surface is an annular surface, the feature value of the PI surface is calculated, and then the feature value is compared with a preset threshold. Based on the comparison result, it is determined whether the MIC hole is too small. If the MIC hole is too small, the detection ends. Otherwise, it is determined whether the area of the MIC hole exceeds the preset area. If the area of the MIC hole exceeds the preset area, there is a MIC hole misalignment defect. Otherwise, the detection is qualified.
2. The MIC hole defect detection method according to claim 1, characterized in that, The detection area is determined as follows: The detection area can be determined by contour mapping matching or by contour recognition.
3. The MIC hole defect detection method according to claim 2, characterized in that, The steps for determining the detection region through contour mapping matching are as follows: First, the image is mapped to the master image, and the MIC hole coordinates on the image are determined according to the MIC hole coordinates on the master image. Then, the detection area is determined according to the MIC hole coordinates. The steps for determining the detection region using contour recognition are as follows: First, the image is identified to locate the MIC hole, and then the detection area is determined based on the location of the MIC hole.
4. The MIC hole defect detection method according to claim 1, characterized in that, The calculated characteristic value is the average width of the PI surface, the inner radius of the PI surface, or the inner diameter of the PI surface.
5. The MIC hole defect detection method according to claim 4, characterized in that, When the characteristic value of the PI surface is the average width of the PI surface, the average width is compared with the preset average width. If the average width is greater than the preset average width, it is considered that there is a defect of the MIC hole being too small. When the characteristic value of the PI surface is the inner circle radius of the PI surface, the inner circle radius of the PI surface is compared with the preset inner circle radius. If the inner circle radius of the PI surface is smaller than the preset inner circle radius, it is considered that there is a defect of the MIC hole being too small. When the characteristic value of the PI surface is the inner diameter of the PI surface, the inner diameter of the PI surface is compared with the preset inner diameter. If the inner diameter of the PI surface is smaller than the preset inner diameter, it is considered that there is a defect of the MIC hole being too small.
6. The MIC hole defect detection method according to claim 1, characterized in that, The following methods can be used to determine whether there is a MIC hole misalignment defect: The presence of a MIC hole exceeding a preset area is determined by judging whether the shortest distance between the inner and outer circles of the PI surface is less than a distance threshold. If the shortest distance is less than the distance threshold, there is a MIC hole misalignment defect.
7. The MIC hole defect detection method according to claim 1, characterized in that, The following methods can be used to determine whether there is a MIC hole misalignment defect: Identify the annular gold surface within the detection area, calculate the roundness of the inner circle of the annular gold surface, and then determine whether there is a MIC hole misalignment defect based on the roundness.
8. A MIC hole defect detection device, characterized in that, include Image acquisition unit, used to acquire an image of the MIC hole to be detected; A detection region determination unit is used to determine a detection region on the image; The first processing unit is used to identify the PI surface within the detection area and determine whether the PI surface is a circular surface or an annular surface. If the PI surface is circular, there is a MIC hole under-punch defect, and the test ends. The second processing unit is used to calculate the feature value of the PI surface when there is no MIC hole punching defect, then compare the feature value with a preset threshold, and determine whether the MIC hole is too small based on the comparison result. If the MIC hole is too small, the detection ends. The third processing unit is used to determine whether there is a portion of the MIC hole area that exceeds the preset area when the MIC hole is not misaligned. If the MIC hole area exceeds the preset area, there is a MIC hole misalignment defect, and the test ends; otherwise, the test is considered qualified.
9. A computer device, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executed according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer program is stored that can be loaded by a processor and executed according to any one of claims 1 to 7.
Citation Information
Patent Citations
Microphone reception hole defect detection method
CN112419319A
Defect detection method, device and equipment and storage medium
CN114283132A