Golden finger defect detection method
By processing gold finger images and performing contour analysis and attribute calculations, combined with setting of screening parameters, the missed detection problem of gold finger defect detection in the prior art is solved, and efficient, accurate and comprehensive detection of gold finger areas and dark areas is achieved.
Patent Information
- Application Number
- CN202411612819.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-03-18
AI Technical Summary
The existing gold finger defect detection methods have the problem of defect missed detection, especially in the detection of oblique gold fingers and complex shapes of gold fingers. Traditional methods are difficult to achieve efficient, accurate and comprehensive detection.
By obtaining the gold finger image to be detected, the gold finger area image and dark area image are obtained, contour analysis and attribute calculation are performed, and filtering parameters are set to identify and display actual defects. It is suitable for the detection of vertical, horizontal and oblique gold fingers.
The comprehensive inspection of gold finger areas and dark areas is achieved, the accuracy and reliability of the detection is improved, and the ability to identify multiple types of defects is possible. It is suitable for gold fingers of various shapes and layouts, reducing false alarms and missed reports.
Smart Images

Figure CN119648633A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method for detecting gold finger defects. Background Art
[0002] With the increasing popularity of electronic products and the continuous improvement of performance requirements, the quality control of PCB boards and their connecting parts has become particularly important. As the key part of the PCB board used to connect other circuit boards or devices, the surface quality of the gold finger directly affects the reliability and service life of the entire electronic product. Therefore, the defect detection of gold fingers has become an indispensable part of the electronic product manufacturing process.
[0003] Traditional gold finger defect detection methods mostly rely on manual visual inspection, which is not only inefficient but also easily affected by human factors, resulting in unstable detection results. In recent years, with the development of computer vision technology and machine learning algorithms, automated detection technology has gradually become mainstream. Although the existing automated gold finger defect detection methods have improved detection efficiency and accuracy to a certain extent, they still have some shortcomings.
[0004] For example, prior art 1 (patent number: CN202310721774) effectively reduces the over-detection rate by using the defect contour position relative to the gold finger contour position for judgment. However, this solution does not describe how to extract defects. The actual defect conditions (position, size, type) in production are unknown and difficult to list completely. Therefore, this solution is more likely to cause defects to be missed.
[0005] Prior art 2 (patent number: CN202410865189) detects defects by calculating the distance. The specific method is to extract the two endpoints of each gold finger, calculate the midpoint, determine the reference value line based on the midpoint, and calculate the distance from the bright spot contour point to the reference value line. If the distance exceeds the threshold, it is considered to be a defect. However, this method is not suitable for oblique gold fingers. Summary of the invention
[0006] The present invention aims to at least solve the technical problems existing in the prior art. To this end, the present invention proposes a gold finger defect detection method, which obtains a gold finger image to be detected, processes the gold finger area image and the dark area image, and then performs detailed contour analysis and attribute calculation on these images, and finally identifies and displays the actual defects by setting screening parameters, which can detect common vertical or horizontal gold fingers, and can also detect oblique gold fingers, thereby realizing efficient, accurate and comprehensive gold finger defect detection.
[0007] A method for detecting gold finger defects according to some embodiments of the present invention includes the following steps:
[0008] S100, obtaining a gold finger image to be detected, and processing the gold finger image to be detected to obtain a gold finger area image and a dark area image between the gold fingers;
[0009] S200, searching the gold finger area image to obtain n gold finger contours, searching the dark area image to obtain n dark area contours, cutting each gold finger contour to obtain a small gold finger area image, and cutting each dark area contour to obtain a small dark area image;
[0010] S300, calculating the properties of each small block image in the gold finger area and the properties of each small block image in the dark area;
[0011] S400, screening the small block images of the golden finger area and the small block images of the dark area by setting screening parameters to obtain actual defects;
[0012] S500: Convert the coordinates of the actual defect into original image coordinates according to the actual defect, and display the defect on the original image.
[0013] A gold finger defect detection method according to some embodiments of the present invention has at least the following beneficial effects:
[0014] The present invention can not only detect defects in the gold finger area, but also detect defects in the dark area between the gold fingers, which makes the detection range wider, can discover more potential problems, and improves the comprehensiveness and reliability of the detection. By processing the gold finger area image and the dark area image separately, the present invention can more accurately identify different types of defects, including but not limited to scratches, stains, corrosion, disconnection, collapse, etc. The present invention can not only detect common vertically or horizontally arranged gold fingers, but also detect diagonally arranged gold fingers. This flexibility makes the method suitable for gold fingers of various shapes and layouts, and has high versatility and adaptability. It can be understood that by finding the gold finger contour and the dark area contour and cutting them, the present invention can simplify the complex image into multiple small blocks, which is convenient for further attribute calculation and defect analysis. At the same time, by setting the screening parameters, the non-defective area can be effectively filtered out, false alarms and missed alarms can be reduced, and the accuracy of detection can be improved.
[0015] According to a gold finger defect detection method of some embodiments of the present invention, the processing of the gold finger image to be detected to obtain the gold finger area image and the dark area image between the gold fingers includes: specifying an ROI area for detection for the gold finger image to be detected, performing Gaussian filtering on the ROI area, binarizing after Gaussian filtering to obtain the gold finger area and the dark area, and obtaining the gold finger area image and the dark area image from the gold finger area and the dark area.
[0016] According to a gold finger defect detection method of some embodiments of the present invention, obtaining the gold finger area image and the dark area image from the gold finger area and the dark area includes: obtaining the gold finger area image from the gold finger area, performing morphological operations on the gold finger area to obtain a Mask area map, and further adjusting the image of the dark area through the Mask area map to obtain the dark area image.
[0017] According to a gold finger defect detection method of some embodiments of the present invention, the step of cutting each gold finger contour to obtain a small block image of the gold finger area includes: classifying all gold finger contours into normal gold finger contours and abnormal gold finger contours, cutting the normal gold finger contours and the abnormal gold finger contours to obtain the small block image of the gold finger area.
[0018] According to a gold finger defect detection method of some embodiments of the present invention, the classification of all gold finger contours into normal gold finger contours and abnormal gold finger contours includes: by setting a parameter standard width, the gold finger contours smaller than the standard width are classified as normal gold finger contours, and the other part are classified as abnormal gold finger contours.
[0019] According to a gold finger defect detection method of some embodiments of the present invention, the cutting of the normal gold finger contour and the abnormal gold finger contour includes: first cutting the normal gold finger contour, cutting each gold finger contour from top to bottom by setting the height parameter of the gold finger block, and the number of gold finger blocks on each normal gold finger contour can be obtained; then cutting the abnormal gold finger contour, searching the gold finger contour for each gold finger block, and the number of gold finger blocks on each abnormal gold finger contour can be obtained.
[0020] According to a gold finger defect detection method of some embodiments of the present invention, each dark area contour is cut to obtain multiple dark area small block images: all dark contours are classified into normal dark contours and abnormal dark contours, and the normal dark contours and the abnormal dark contours are cut to obtain the dark area small block images.
[0021] According to a gold finger defect detection method of some embodiments of the present invention, the classification of all dark contours into normal dark contours and abnormal dark contours includes: by setting a parameter standard width, dark contours smaller than the standard width are classified as normal dark contours, and the other part are classified as abnormal dark contours.
[0022] According to a gold finger defect detection method of some embodiments of the present invention, the cutting of the normal dark contour and the abnormal dark contour includes: first cutting the normal dark contour, cutting each dark contour from top to bottom by setting the height parameter of the dark contour block, and the number of dark contour blocks on each normal dark contour can be obtained; then cutting the abnormal dark contour, performing dark contour search on each dark contour block, and the number of dark contour blocks of each abnormal dark contour can be obtained.
[0023] According to a gold finger defect detection method of some embodiments of the present invention, the attributes include length, width, average contrast, standard deviation, the number of gold finger blocks for each gold finger contour, and the number of dark contour blocks for each dark contour.
[0024] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0026] Figure 1 It is an overall flow chart of an embodiment of the present invention.
[0027] Figure 2 Flow chart of step S100 of an embodiment of the present invention.
[0028] Figure 3 This is a gold finger image to be detected in an embodiment of the present invention.
[0029] Figure 4 This is an image after Gaussian filtering according to an embodiment of the present invention.
[0030] Figure 5 This is a gold finger area image according to an embodiment of the present invention.
[0031] Figure 6 is an image of a dark area according to an embodiment of the present invention.
[0032] Figure 7 This is a Mask area diagram of an embodiment of the present invention.
[0033] Figure 8 This is a dark area image obtained by further adjusting the Mask area map according to an embodiment of the present invention.
[0034] Fig. 9 It is a small block diagram of the golden finger area and a small block diagram of the dark area according to an embodiment of the present invention.
[0035] Fig.10This is a defect detection effect diagram of an embodiment of the present invention.
[0036] Fig.11 This is a gold finger breakage detection diagram according to an embodiment of the present invention. DETAILED DESCRIPTION
[0037] Embodiments of the present invention are described in detail below, and examples of the embodiments 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.
[0038] In the description of the present invention, it should be understood that the descriptions involving orientations, such as up, down, left, right, front, back, etc., and the orientations or positional relationships indicated are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the modules or components referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.
[0039] In the description of the present invention, if there is a description of first and second, it is only for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0040] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.
[0041] like Figure 1-Figure 11 As shown, an embodiment of the present invention provides a method for detecting gold finger defects.
[0042] A method for detecting gold finger defects comprises the following steps:
[0043] S100, obtaining a gold finger image to be detected, and processing the gold finger image to be detected to obtain a gold finger area image and a dark area image between the gold fingers;
[0044] S200, searching the gold finger area image to obtain n gold finger contours, searching the dark area image to obtain n dark area contours, cutting each gold finger contour to obtain a small gold finger area image, and cutting each dark area contour to obtain a small dark area image;
[0045] S300, calculating the properties of each small block image in the gold finger area and the properties of each small block image in the dark area;
[0046] S400, screening the small block images of the golden finger area and the small block images of the dark area by setting screening parameters to obtain actual defects;
[0047] S500: Convert the coordinates of the actual defect into original image coordinates according to the actual defect, and display the defect on the original image.
[0048] The present invention can not only detect defects in the gold finger area, but also detect defects in the dark area between the gold fingers, which makes the detection range wider, can discover more potential problems, and improves the comprehensiveness and reliability of the detection. By processing the gold finger area image and the dark area image separately, the present invention can more accurately identify different types of defects, including but not limited to scratches, stains, corrosion, disconnection, collapse, etc. The present invention can not only detect common vertically or horizontally arranged gold fingers, but also detect diagonally arranged gold fingers. This flexibility makes the method suitable for gold fingers of various shapes and layouts, and has high versatility and adaptability. It can be understood that by finding the gold finger contour and the dark area contour and cutting them, the present invention can simplify the complex image into multiple small blocks, which is convenient for further attribute calculation and defect analysis. At the same time, by setting the screening parameters, the non-defective area can be effectively filtered out, false alarms and missed alarms can be reduced, and the accuracy of detection can be improved.
[0049] like Figure 3-Figure 6 As shown, a gold finger defect detection method described in this embodiment, the processing of the gold finger image to be detected to obtain the gold finger area image and the dark area image between the gold fingers includes: specifying the ROI area to be detected for the gold finger image to be detected, performing Gaussian filtering on the ROI area, binarizing after Gaussian filtering to obtain the gold finger area and the dark area, and obtaining the gold finger area image and the dark area image from the gold finger area and the dark area. Specifically, by specifying the ROI area, unnecessary calculations are reduced and processing efficiency is improved, and Gaussian filtering and binarization processing can effectively remove noise, enhance the contrast of the image, make the boundaries of the gold finger area and the dark area clearer, and facilitate subsequent contour search and defect detection.
[0050] like Figure 7-Figure 8As shown, the gold finger defect detection method described in this embodiment, obtaining the gold finger area image and the dark area image from the gold finger area and the dark area includes: obtaining the gold finger area image from the gold finger area, performing morphological operations on the gold finger area to obtain a Mask area map, and further adjusting the image of the dark area through the Mask area map to obtain the dark area image. Specifically, the morphological operation can further optimize the boundary of the gold finger area, making the Mask area map more accurate, which helps to improve the accuracy and reliability of the dark area image. Adjusting the dark area image through the Mask area map can better distinguish the gold finger and the dark area, and avoid false detection and missed detection.
[0051] In the present embodiment, a method for detecting defects in gold fingers is described, wherein the step of cutting each gold finger contour to obtain a small gold finger area image includes: classifying all gold finger contours into normal gold finger contours and abnormal gold finger contours, cutting the normal gold finger contours and the abnormal gold finger contours to obtain the small gold finger area image. Specifically, by classifying the gold finger contours, defects of different types of gold fingers can be processed more accurately, thereby improving the pertinence of detection. Cutting the gold finger contours into small images can more carefully analyze the characteristics of each area, which is helpful for discovering tiny defects.
[0052] In the present embodiment, a gold finger defect detection method is described, wherein the classification of all gold finger contours into normal gold finger contours and abnormal gold finger contours includes: by setting a parameter standard width, gold finger contours smaller than the standard width are classified as normal gold finger contours, and the other part is classified as abnormal gold finger contours. Specifically, by setting the standard width, normal and abnormal gold finger contours can be effectively distinguished to avoid false detection and missed detection. The setting of the standard width can be adjusted according to actual conditions, thereby improving the flexibility and adaptability of the method.
[0053] In the present embodiment, a method for detecting defects in gold fingers is described, wherein the cutting of the normal gold finger contour and the abnormal gold finger contour comprises: first cutting the normal gold finger contour, cutting each gold finger contour from top to bottom by setting the height parameter of the gold finger small block, and then obtaining the number of gold finger small blocks on each normal gold finger contour; then cutting the abnormal gold finger contour, searching for the gold finger contour for each gold finger small block, and then obtaining the number of gold finger small blocks on each abnormal gold finger contour. Specifically, by setting the height parameter, the gold finger contour can be cut more evenly, ensuring that the size of each small block is consistent, facilitating subsequent attribute calculation and defect detection, and performing additional contour searching on the abnormal gold finger contour can more accurately identify and handle abnormal situations, thereby improving the accuracy of detection.
[0054] In the gold finger defect detection method described in this embodiment, each dark area contour is cut to obtain multiple dark area small blocks: all dark contours are classified into normal dark contours and abnormal dark contours, and the normal dark contours and the abnormal dark contours are cut to obtain the dark area small blocks. Specifically, by classifying the dark contours, defects of different types of dark areas can be processed more accurately, and the detection is more targeted. Cutting the dark contours into small blocks can analyze the characteristics of each area more carefully, which is helpful to find tiny defects.
[0055] It is understandable that if Fig. 9 In this embodiment, the small block image of the golden finger area and the small block image of the dark area can be displayed on the same image.
[0056] In the gold finger defect detection method described in this embodiment, the classification of all dark contours into normal dark contours and abnormal dark contours includes: by setting a parameter standard width, dark contours smaller than the standard width are classified as normal dark contours, and the other part is classified as abnormal dark contours. Specifically, by setting the standard width, normal and abnormal dark contours can be effectively distinguished to avoid false detection and missed detection. The setting of the standard width can be adjusted according to actual conditions, thereby improving the flexibility and adaptability of the method.
[0057] In the gold finger defect detection method described in this embodiment, the cutting of the normal dark contour and the abnormal dark contour includes: first cutting the normal dark contour, cutting each dark contour from top to bottom by setting the height parameter of the dark contour block, and then the number of dark contour blocks on each normal dark contour can be obtained; then cutting the abnormal dark contour, performing dark contour search on each dark contour block, and then the number of dark contour blocks of each abnormal dark contour can be obtained. Specifically, by setting the height parameter, the dark contour can be cut more evenly to ensure that the size of each small block is consistent, which is convenient for subsequent attribute calculation and defect detection. Performing additional contour search on abnormal dark contours can more accurately identify and handle abnormal situations and improve the accuracy of detection.
[0058] In the gold finger defect detection method described in this embodiment, the attributes include length, width, average contrast, standard deviation, the number of gold finger blocks for each gold finger contour, and the number of dark contour blocks for each dark contour. Specifically, the selection of the above attributes covers geometric characteristics and grayscale characteristics, and can perform defect detection from multiple angles, improve the reliability and accuracy of detection, and can comprehensively evaluate the characteristics of each small block image, which helps to identify defects more accurately.
[0059] It can be understood that the gold finger area and the dark area are two sets of attributes. Generally, if there are defects in the gold finger area, its characteristic value will be darker; if there are defects in the dark area, its characteristic value will generally be brighter.
[0060] like Fig.11 As shown, the present invention can further reduce missed detection of the gold finger area by detecting the dark area, while the existing solution cuts the gold finger into small pieces and calculates the circumscribed rectangle of the small piece. When the gold finger is broken, the value of the calculated circumscribed rectangle does not change, thus causing missed detection. The present invention can detect it by adding dark area detection.
[0061] It is understandable that in some embodiments, the gold finger area outline, the dark area outline, the gold finger outline block and the dark area outline block may be numbered in sequence to locate defects.
[0062] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
Claims
1. A gold finger defect detection method, characterized in that: The following steps are involved: S100, obtaining a gold finger image to be detected, and processing the gold finger image to be detected to obtain a gold finger area image and a dark area image between the gold fingers; S200, searching the gold finger area image to obtain n gold finger contours, searching the dark area image to obtain n dark area contours, cutting each gold finger contour to obtain a small gold finger area image, and cutting each dark area contour to obtain a small dark area image; S300, calculating the properties of each small block image in the gold finger area and the properties of each small block image in the dark area; S400, screening the small block images of the golden finger area and the small block images of the dark area by setting screening parameters to obtain actual defects; S500: Convert the coordinates of the actual defect into original image coordinates according to the actual defect, and display the defect on the original image.
2. A gold finger defect detection method according to claim 1, characterized in that: The processing of the gold finger image to be detected to obtain the gold finger area image and the dark area image between the gold fingers includes: specifying a detection ROI area for the gold finger image to be detected, performing Gaussian filtering on the ROI area, binarizing after Gaussian filtering to obtain the gold finger area and the dark area, and obtaining the gold finger area image and the dark area image from the gold finger area and the dark area.
3. A gold finger defect detection method according to claim 2, characterized in that: Obtaining the golden finger area image and the dark area image from the golden finger area and the dark area includes: obtaining the golden finger area image from the golden finger area, performing morphological operations on the golden finger area to obtain a Mask area map, and further adjusting the image of the dark area through the Mask area map to obtain the dark area image.
4. The method for detecting gold finger defects according to claim 1, characterized in that: The step of cutting each gold finger contour to obtain a small gold finger area image includes: classifying all gold finger contours into normal gold finger contours and abnormal gold finger contours, cutting the normal gold finger contours and the abnormal gold finger contours to obtain the small gold finger area image.
5. A gold finger defect detection method according to claim 4, characterized in that: The classification of all gold finger contours into normal gold finger contours and abnormal gold finger contours includes: by setting a parameter standard width, gold finger contours smaller than the standard width are classified as normal gold finger contours, and the other part are classified as abnormal gold finger contours.
6. A gold finger defect detection method according to claim 4, characterized in that: The cutting of the normal gold finger contour and the abnormal gold finger contour comprises: first cutting the normal gold finger contour, cutting each gold finger contour from top to bottom by setting the height parameter of the gold finger block, and at this time the number of gold finger blocks on each normal gold finger contour can be obtained; then cutting the abnormal gold finger contour, searching the gold finger contour for each gold finger block, and at this time the number of gold finger blocks on each abnormal gold finger contour can be obtained.
7. The method for detecting gold finger defects according to claim 1, characterized in that: The method of cutting each dark area contour to obtain a plurality of dark area small block images is as follows: all dark contours are classified into normal dark contours and abnormal dark contours, and the normal dark contours and the abnormal dark contours are cut to obtain the dark area small block images.
8. A dark defect detection method according to claim 7, characterized in that: The classifying all dark contours into normal dark contours and abnormal dark contours includes: by setting a parameter standard width, classifying dark contours smaller than the standard width into normal dark contours, and the other part into abnormal dark contours.
9. A dark defect detection method according to claim 7, characterized in that: The cutting of the normal dark contour and the abnormal dark contour includes: first cutting the normal dark contour, cutting each dark contour from top to bottom by setting the height parameter of the dark contour block, and the number of dark contour blocks on each normal dark contour can be obtained; then cutting the abnormal dark contour, performing dark contour search on each dark contour block, and the number of dark contour blocks of each abnormal dark contour can be obtained.
10. The method for detecting gold finger defects according to claim 1, characterized in that: The attributes include length, width, average contrast, standard deviation, the number of gold finger patches for each gold finger contour, and the number of dark contour patches for each dark contour.
Citation Information
Patent Citations
Gold finger defect review method, device, equipment and storage medium
CN116758031B
Gold finger defect detection method, device, computer equipment, and storage medium
CN118397011B