Pin defect detection method, electronic equipment and storage medium
By obtaining the height map and texture map of the component, determining the pin profile, and determining the defect detection results of the pin based on the position, height value and preset threshold of the reference point, the problems of complex programming, poor universality, and missed detection in the prior art are solved, and efficient and accurate pin defect detection of a variety of components are achieved.
Patent Information
- Application Number
- CN202410540666.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-30
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-04-30
AI Technical Summary
When facing the detection needs of multiple components, existing automatic optical detection is complex in programming, poor in versatility, and there are problems of missed detection.
By obtaining the height map and texture map of the component, determine the pin profile, and determine the defect detection result of the pin based on the position, height value and preset threshold of the reference point. This method adapts to changes in component types and differences in installation details, improving the versatility of detection.
It realizes automation of the pin defect detection process of multiple components, reduces programming complexity, improves detection universality and accuracy, and reduces the risk of missed detection.
Smart Images

Figure CN119845949A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of optical detection technology, and in particular to a pin defect detection method, electronic equipment, and storage medium. Background Art
[0002] In the actual application scenarios of AOI (Automated Optical Inspection), it is usually necessary to obtain parameters such as the position, shape, and size of the pins of electronic components (such as integrated circuits, chips, connectors, etc.) to ensure that there are no defects such as floating height collapse. When the height of the tail of a pin is significantly higher or lower than other pins, it can be determined as a floating height collapse abnormality. Traditional AOI is mainly implemented through two-dimensional images, that is, two-dimensional image detection is performed through a camera, and for defects such as pin floating height collapse and other pin position floating defects, the difference in the vertical direction cannot be learned from the two-dimensional graphics alone.
[0003] Based on the limitations of two-dimensional detection in the vertical direction, laser projection and structured light 3D sensors can be used to obtain height maps of electronic component pins. The height map accurately records image information such as the outline, shape, height and spacing of the pins. In terms of spatial height relationship, the pins are usually located between the printed circuit board and the surface of the component. For the position detection of the pins in the height map, the current common method is to filter out the pin area through a fixed height threshold. This method usually requires more accurate pin prior knowledge, including the height screening range of specific pins and the approximate position of the pins and the pads. For components of different types and models, there may be differences in height. The existing prior knowledge is difficult to transfer and re-sampling experiments are required. When facing the detection needs of multiple components, the programming is complex and the versatility is poor. In addition, during the industrial detection process, there are cases of component offset and tilt, but there is no problem with the welding of the components themselves. The existing method of setting the reference height in the detection may result in the failure to detect abnormalities or the detection of non-existent abnormalities when performing the detection of a single component, and there are cases of false detection and missed detection. Summary of the invention
[0004] The present invention provides a pin defect detection method, an electronic device and a storage medium to solve the technical problems that the existing automatic optical detection has complex programming and poor versatility when facing the detection requirements of multiple components, and there are false detections and missed detections when performing the detection of a single component.
[0005] In a first aspect, an embodiment of the present invention provides a pin defect detection method, the pin defect detection method comprising:
[0006] Acquire a test image of the component under test, where the component under test includes a plurality of pins under test, and the test image includes a height map and a texture map;
[0007] Determine the pin contour corresponding to each pin to be tested according to the height value corresponding to the pin to be tested in the height map and the texture map;
[0008] Determine the position of the reference point corresponding to each pin outline and the height value corresponding to the reference point;
[0009] The defect detection result of each pin to be tested is determined based on the position, height value and preset threshold value corresponding to the reference point.
[0010] As described above, during the automatic optical inspection process, based on the height map and texture map obtained by image acquisition of the circuit board to be tested, the pin contour of the pin to be tested is confirmed, and the defect detection result of each pin to be tested is determined according to the position, height value and preset threshold of the reference point corresponding to each pin contour. The entire inspection process can adapt to the actual parameter changes caused by changes in component types and differences in installation details. There is no need to program for the inspection requirements of each component, which improves the versatility of the inspection solution.
[0011] Among them, the preset thresholds include a height threshold and a difference value threshold;
[0012] The defect detection result of each pin to be tested is determined based on the position, height value and preset threshold corresponding to the reference point, including:
[0013] Fit the position of each reference point and the corresponding height value to obtain the fitting height of each reference point;
[0014] According to the relationship between the height value of the reference point and the height value threshold, and the relationship between the difference value between the height value of the reference point and the fitting height and the difference value threshold, the height defect detection result of each pin to be tested is determined.
[0015] As described above, based on the height value and the fitting height of the reference point corresponding to each pin outline, the defect detection result of the pin to be tested is confirmed by the difference between the height value and the fitting height. The entire detection process can adapt to the actual parameter changes caused by changes in component types and differences in installation details. There is no need to program for the detection requirements of each component, which improves the versatility of the detection solution.
[0016] Wherein, the preset threshold includes a distance deviation threshold;
[0017] Determining the defect detection result of each pin to be tested based on the position, height value and preset threshold value corresponding to the reference point, including:
[0018] Calculating the distance between the reference points of each pin outline according to the position of the reference point of each pin outline;
[0019] According to the relationship between the distance and the distance deviation threshold, the offset defect detection result of each pin to be tested is determined.
[0020] As described above, based on the distance between the reference points of the pin contour, it is confirmed whether the gap between the pins remains basically consistent, so as to accurately determine the pin offset state.
[0021] Wherein, according to the height value corresponding to the pin to be tested in the height map and the texture map, determining the pin contour corresponding to each pin to be tested includes:
[0022] Determine the orientation of the pin to be tested based on the height map;
[0023] Determine the reference area of the pin group where the pin to be tested is located according to the orientation;
[0024] Confirm the pin outline of each pin to be tested based on the height value and texture map in the reference area.
[0025] As described above, the orientation of the pin is determined according to the height map, the height value is screened based on the orientation, and the pin outline is determined in combination with the texture map. This can be generalized to various scenarios and accurately determine the pin outlines of pins in various orientations.
[0026] The reference area of the pin group where the pin to be tested is located is determined according to the orientation, including:
[0027] For each pin group, determining a corresponding first reference line according to a normal vector component associated with a corresponding orientation;
[0028] Using the first reference line as a reference, move a preset distance toward the end of the pin to obtain a second reference line;
[0029] The area between the corresponding first reference line and the second reference line of each pin group is used as the reference area.
[0030] In the above, based on the texture represented by the normal vector component, the reference area is quickly confirmed.
[0031] Wherein, according to the height value and the texture map in the reference area, the pin profile of each pin to be tested is confirmed, including:
[0032] The average value of the height values in the reference area is taken as the lower threshold value of the height value based on the average value and the preset weight, and the maximum height value in the reference area is taken as the upper threshold value;
[0033] Extract reference pixel points whose height values are between the corresponding lower threshold and upper threshold among the corresponding pixel points of the pin group;
[0034] The texture image is subjected to color extraction, and the reference pixel points corresponding to each pin to be tested are subjected to an opening operation to obtain the pin outline of each pin to be tested.
[0035] As described above, based on all height values and texture maps within the pin group, the pin outline of each pin to be tested can be quickly confirmed.
[0036] Wherein, according to the height value and the texture map in the reference area, the pin profile of each pin to be tested is confirmed, including:
[0037] Screening a preset number of highest range height values from the reference area and confirming the maximum height value in the reference area;
[0038] The average value of the highest range height value is used as the lower threshold, and the maximum height value is used as the upper threshold;
[0039] Extract reference pixel points whose height values are between the corresponding lower threshold and upper threshold among the corresponding pixel points of the pin group;
[0040] The texture image is subjected to color extraction, and the reference pixel points corresponding to each pin to be tested are subjected to an opening operation to obtain the pin outline of each pin to be tested.
[0041] As described above, based on the partial height values and texture map inside the pin group, the pin outline of each pin to be tested can be quickly confirmed.
[0042] The process of determining the orientation of the pin to be tested based on the height map includes:
[0043] Based on the aspect ratio between the image length and the image width of the area image of each chip in the height map, the length and width orientation of each chip is determined;
[0044] According to the height relationship between the two sides of each pin group in the regional image of each chip, the orientation of each pin group is determined as the orientation of the pin to be tested therein.
[0045] As described above, the pin orientation can be quickly confirmed by the overall aspect ratio of the chip and the height relationship on both sides of the pin group.
[0046] Wherein, according to the height relationship between the two sides of each pin group in the regional image of each chip, determining the orientation of each pin group as the orientation of the pin to be tested therein includes:
[0047] According to the height relationship between the midpoints on both sides of each pin group in the regional image of each chip, the orientation of each pin group is determined as the orientation of the pin to be tested therein.
[0048] As described above, based on the comparison of the two points, the height relationship between the two sides of the pin group can be quickly confirmed, and then the direction of the pin group can be quickly confirmed.
[0049] In a second aspect, an embodiment of the present invention provides an electronic device, the electronic device comprising:
[0050] one or more processors;
[0051] a memory for storing one or more computer programs;
[0052] When one or more computer programs are executed by one or more processors, the electronic device implements the pin defect detection method of the first aspect.
[0053] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the pin defect detection method of the first aspect.
[0054] The electronic device and computer of the second and third aspects can be used to execute the pin defect detection method provided by any of the above embodiments, and have corresponding functions and beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0056] Figure 1 A method flow chart of a pin defect detection method provided in an embodiment of the present application;
[0057] Figure 2 It is a schematic diagram of the height map of the components;
[0058] Figure 3 This is a schematic diagram of the pin group facing left;
[0059] Figure 4 A schematic diagram of the pin group facing upward;
[0060] Figure 5 A schematic diagram of the associated normal vector components of the pin group;
[0061] Figure 6 A schematic diagram of the pin outline obtained by color extraction for the pin group;
[0062] Figure 7 A height diagram of reference points of the pin outline of the pin group;
[0063] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0064] In order to make the purpose, technical scheme and advantages of the present application clearer, the embodiments of the present application will be further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are used to explain the present invention, rather than to limit the present invention. It should also be noted that, for the sake of ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0065] It should be noted that due to space limitations, this application description does not list all optional implementation methods. After reading this application description, those skilled in the art should be able to understand that as long as the technical features do not contradict each other, any combination of technical features can constitute an optional implementation method.
[0066] Each embodiment is described in detail below.
[0067] Based on the limitations of two-dimensional image detection in the vertical direction, laser projection and structured light 3D sensors can be used to obtain the height map of component pins. Figure 2 It can be seen that the height map accurately records the image information such as the outline, shape, height and spacing of the pins. From the perspective of spatial height relationship, the pins are usually located between the printed circuit board and the surface of the component. For the position detection of pins in three-dimensional images, the current common method is to screen out the area of the pins through a fixed height threshold. This method usually requires more accurate prior knowledge of the pins, including the height screening range of specific pins, and the approximate position of the pins and pads. In the height map obtained during the AOI process, the plane parallel to the printed circuit board is usually defined as the XoY plane, where one of the X-axis and Y-axis directions is the length direction and the other is the width direction, and the direction perpendicular to the printed circuit board is defined as the Z-axis direction, and the Z-axis direction is defined as the height direction.
[0068] In the actual industrial printed circuit board production process, when automatic optical inspection is performed, for the position detection of pins in the height map, the current common method is to screen out the pin area through a fixed height threshold. This method usually requires more accurate pin prior knowledge, including the height screening range of specific pins, and the approximate position of the pins and the pads. For components of different types and models, there may be differences in height. The existing prior knowledge is difficult to transfer, and re-sampling experiments are required. When facing the detection needs of multiple components, the programming is complex and the versatility is poor. In addition, there is a certain inclination phenomenon when the component pins are welded. This slight inclination makes the normal pin height at both ends of the component inconsistent, but it will not cause poor contact between the pins and the pads or poor welding quality, which belongs to the category of normal welding. However, the current common pin abnormality detection method calculates the average height of all pins as the standard for troubleshooting abnormal pins. For slightly tilted components, this method of screening by global average value is difficult to set an accurate troubleshooting threshold, and abnormal pins cannot be effectively troubleshooted, and there is a risk of false positives and negatives.
[0069] To solve the above technical problems, an embodiment of the present application proposes a pin defect detection method. During the automatic optical inspection process, the pin contour of the pin to be tested is confirmed based on the height map and texture map obtained by image acquisition of the circuit board to be tested, and the defect detection result of each pin to be tested is determined according to the position, height value and preset threshold of the reference point corresponding to each pin contour. The entire inspection process can adapt to the actual parameter changes caused by changes in component types and differences in installation details. There is no need to program according to the inspection requirements of each component, which improves the versatility of the inspection solution.
[0070] Figure 1 is a method flow chart of a pin defect detection method provided by an embodiment of the present application, such as Figure 1 As shown, the pin defect detection method includes but is not limited to steps S110 to S160.
[0071] Step S110: acquiring an image to be tested of the component to be tested, where the component to be tested includes a plurality of pins to be tested, and the image to be tested includes a height map and a texture map.
[0072] The image to be tested is an image obtained by collecting images of the circuit board to be tested using image acquisition means such as optical cameras, laser projection, and structured light 3D sensors during the automatic optical detection of the pins to be tested. In the embodiment of the present application, it at least includes a height map detected by laser projection or structured light 3D sensors, and a texture map collected by an optical camera. In the specific automatic optical detection process, light sources of different colors can be applied to the circuit board to be tested, so that different colors can be presented in different structural areas with the same or similar colors in the texture map, so as to facilitate more accurate recognition and judgment in the subsequent image processing process. The pins to be tested are, for example, the pins of the chip in the circuit board to be tested.
[0073] Step S120: determining a pin contour corresponding to each pin to be tested according to the height value corresponding to the pin to be tested in the height map and the texture map.
[0074] The basic shape of the main body of the chip is usually a cuboid with a strict distinction between the top and the bottom (corresponding to a rectangle). The pins of the chip are arranged on the four sides of the chip or on two opposite sides close to the bottom and extend outward. In the case of only two sides, they are usually arranged on a set of longer sides at the bottom. In the embodiment of the present application, in order to facilitate defect detection based on the same reference, for the pins in a chip, all the pins on the same side are treated as a pin group. For each pin group, it can be detected and the orientation can be confirmed by image recognition; it can also be detected by correspondingly confirming the orientation. The orientation of the pin group refers to the direction in which the pins extend outward, and the orientation of the pin group corresponds to the orientation of the pins therein.
[0075] If the pin group is confirmed by orientation, it is equivalent to first determining the orientation of the pin to be tested based on the height map, and then confirming the reference area of the pin group where the pin to be tested is located according to the orientation, and finally confirming the pin outline of each pin to be tested according to the height value and texture map in the reference area. According to the height value recorded in the height map, the orientation of the pin group where the pin to be tested is located can be confirmed, and then the reference area of the pin group where the pin to be tested is located can be confirmed according to the orientation, where the reference area is the area corresponding to the position of the pin in the height map, in which the height value corresponding to the pin is recorded. Confirming the orientation of the pin according to the height map, screening the height value based on the orientation, and confirming the pin outline in combination with the texture map can generalize the application to various scenarios and accurately confirm the pin outline of each orientation pin. In the specific implementation process, the pin group detected and confirmed by image recognition can also confirm the reference area in the manner described above.
[0076] In the process of specifically confirming the orientation of the pin group, firstly, based on the aspect ratio between the image length and the image width of the regional image of each chip in the height map, the length and width orientation of each chip is confirmed. On the basis of the complete three-dimensional image corresponding to the circuit board to be tested in step S110, the regional image corresponding to a single chip is further obtained, and the regional image includes the main body of a chip and the pins outside the main body. For the main body, according to the ratio of length and width, the length and width orientation of its size shape can be confirmed, that is, the rectangle at the top is a horizontal / vertical rectangle. In the case where the chip has pins on only two sides, it is determined whether the aspect ratio is greater than 1. If it is greater than 1, the length is long and the width is short, and the pins are facing left / right. If it is less than 1, the length is short and the width is long, and the pins are facing up / down. After confirming the overall orientation, according to the height relationship between the two sides of each pin group in the regional image of each chip, the orientation of each pin group is confirmed as the orientation of the pins to be tested. That is, it is confirmed which direction the single pin group is facing specifically, left, right, up, or down. At this time, the orientation of the pin can be determined based on the height difference between the side where the pin is connected to the chip and the end where the pin extends outward. The orientation of the pin can be quickly confirmed by the overall aspect ratio of the chip and the height relationship on both sides of the pin group. Specifically, a pin can be randomly selected as a representative to determine the orientation, or the orientation of each pin group can be confirmed based on the height relationship of the midpoints on both sides of each pin group in the regional image of each chip. Based on the comparison of the two points, the height relationship on both sides of the pin group can be quickly confirmed, and then the orientation of the pin group can be quickly confirmed. The two sides of the pin group refer to the side connected to the main part and the side extending outward.
[0077] For details, please refer to Figure 3 and Figure 4 , Figure 3 One of the pin groups is connected to the main body on the right side and extends outward on the left side. In the specific data processing process, the corresponding direction can be obtained according to the height of the corresponding position (that is, the coordinate component of the Z axis). Figure 4 Shown is a schematic diagram with the pin group facing upward.
[0078] It should be understood that the orientation in the embodiment of the present application is related to the direction in which the image is placed when performing image processing. When the XoY plane of the image is rotated by a multiple of 90°, the corresponding orientation changes, but it does not affect the implementation of the overall solution.
[0079] After confirming the orientation of a single pin group, the Sober operator can be used on its corresponding three-dimensional image to calculate the texture information of the height map as needed, thereby obtaining the normal vector images in three directions, namely NormalX and NormalY, which represent the normal vector components in the horizontal and vertical directions respectively. Figure 5As shown in the figure, if the pin is facing downward, the NormalY normal vector component is selected for calculation. Due to the large height difference between the edge of the chip and the pin area, the absolute value of the normal vector component at the root of the pin is large, so it can be known that Figure 5 The position of the root of the middle pin is used as the first reference line. The first reference line is used as a reference and moved downward by a preset distance (for example, 10 pixels) to obtain the second reference line, thereby intercepting the area of all pins of the pin group between the first reference line and the second reference as the reference area.
[0080] In general, for any pin group, the corresponding first reference line is determined according to the normal vector component associated with the corresponding orientation; the second reference line is obtained by moving a preset distance toward the end of the pin with the first reference line as a reference; the area between the corresponding first reference line and the second reference line of the pin group is used as the reference area. Based on the texture represented by the normal vector component, the reference area can be quickly determined.
[0081] For the pixel points in the reference area, which are equivalent to the pixel points corresponding to one end of the main part of the pin close to the chip, this part is higher than the end of the pin. In the embodiment of the present application, the pin outline of the pin to be tested is confirmed with reference to the height of this part. An optional way to confirm the pin outline of the pin to be tested through the reference area is to screen a preset number of highest range height values from the reference area and confirm the maximum height value in the reference area; take the average value of the highest range height value as the lower threshold, and take the maximum height value as the upper threshold; extract the reference pixel points whose height values in the corresponding pixel points of the pin group are between the corresponding lower threshold and the upper threshold; perform color extraction on the texture map, and perform an open operation on the reference pixel points corresponding to each pin to be tested to obtain the pin outline of each pin to be tested. In this way, based on the representative height values (i.e., the preset number of highest range height values) in the reference area that can represent the pin, the lower threshold of the height of the corresponding area of the pin is confirmed, and the maximum height value is directly confirmed as the upper threshold of the height, and the pixel points between the upper threshold and the lower threshold are used as reference pixels, and then the pin outline is confirmed in combination with the texture map. Based on the pixels inside the pin group, the pin outline of each pin to be tested can be quickly confirmed. Figure 6 Shown is the effect of the contour confirmation process and the schematic diagram of the final confirmed contour.
[0082] Another optional way to confirm the pin outline of the pin to be tested through the reference area is to obtain the lower threshold of the height value based on the average value of the height value in the reference area and the preset weight, and use the maximum height value in the reference area as the upper threshold; extract the reference pixel points whose height values are between the corresponding lower threshold and upper threshold in the corresponding pixel points of the pin group; perform color extraction on the texture map, and perform an open operation on the reference pixel points corresponding to each pin to be tested to obtain the pin outline of each pin to be tested. In this way, based on all the height values in the reference area that can represent the pin (that is, the average value of the height values in the reference area), the lower threshold of the height of the area corresponding to the pin is confirmed by weighted adjustment of the average value, and the maximum height value is directly confirmed as the upper threshold of the height, and the pixel points between the upper threshold and the lower threshold are used as reference pixels, and then the pin outline is confirmed in combination with the texture map.
[0083] In the specific implementation process, Figure 6 The following is a schematic diagram of the process of confirming the pin outline based on the texture map and reference pixels. Figure 6 The small branches in the middle state cause the pin outline to deviate greatly from the pin itself, so it can be based on Figure 6 The texture image on the left is processed by color extraction to obtain the following Figure 6 The pin outline is shown on the far right of the figure. In the specific implementation process, considering that a single pin is a relatively concentrated shape with relatively smooth edges, it is also possible not to use texture map processing, but to directly remove small branches through graphics, and retain the main part as the final pin outline.
[0084] Step S130: Determine the position of the reference point corresponding to each pin outline and the height value corresponding to the reference point.
[0085] The pin contour obtained in step S120 corresponds to the coverage area of each pin to be tested, and the reference point of the contour is obtained according to the coverage area, that is, the coverage area itself has an area attribute, and a point (such as the centroid) is confirmed as a reference point for each coverage area according to the same rule, and the height value of the reference point is used as the height value of the corresponding pin to be tested. When the position of the reference point is confirmed, the height value corresponding to the reference point can be directly confirmed from the height map.
[0086] Step S140: Determine the defect detection result of each pin to be tested based on the position and height value corresponding to the reference point and a preset threshold.
[0087] In the embodiment of the present application, various parameters for characterizing the pin position state can be obtained based on the position and height values corresponding to the reference point, and these parameters are compared with the corresponding preset thresholds to obtain the defect detection results of each test object. The defect detection results mainly include height defect detection results (whether there is a collapse or floating defect) and offset defect detection results (whether the distance between adjacent pins is too large or too small).
[0088] Corresponding to the height detection result, there are height value thresholds and difference value thresholds, wherein the height value threshold is used to determine whether the absolute height of the pin is qualified, and the difference value threshold is used to determine whether the relative height of the pins in the same pin group is qualified.
[0089] When the position and height value of the reference point are known, the position of each reference point and the corresponding height value are first fitted to obtain the fitted height of each reference point, and then the defect detection result of each pin to be tested is determined based on the difference between the height value of the reference point and the fitted height.
[0090] When the height value of each reference point has been confirmed, the reference point can be fitted to obtain a fitting equation, which can describe the expected position relationship of the pins in a pin group. In the specific fitting process, the ideal distribution of the pins is uniform distribution in a row, and the corresponding fitting equation is a linear equation, that is, the relative arrangement position of the pin group (such as a continuous positive integer) is used as the independent variable, and the height value (that is, the distance between the center of mass and the circuit base) is used as the dependent variable for fitting. The specific relationship between the center of mass and the circuit base is as follows: Figure 7 It should be understood that in the specific fitting, the horizontal axis is the circuit base where the pins are soldered, and the vertical axis corresponds to the height value. Figure 7 The figure only shows the general relationship between the reference points of the pin contour and the circuit base plate. In fact, the pin contour should be parallel to the circuit base plate, the reference points on the pin contour should be equally spaced, and the distance between them and the horizontal axis should be equal to the corresponding height value. The coordinates of multiple points confirmed by the reference points are obtained, and a straight line is obtained by fitting based on these coordinates. The independent variables corresponding to each center of mass on the straight line can confirm the corresponding fitting height.
[0091] For example, the fitting equation y=ax+b, where x represents the relative arrangement position of the pins, a and b represent the fitting parameters, and y represents the fitting height of the pins at the position x. Based on the fitting equation, the difference between the height value of each reference point and the fitting height can be confirmed, and then the abnormal state can be judged.
[0092] In the specific fitting process, the average value of each height value can also be directly taken for fitting, which is equivalent to the fitting result being a straight line parallel to the circuit board, that is, a straight line of y=b (y=ax+b, where a=0). The fitting result can also be a quadratic equation, which can reflect the height relationship of multiple centroids as a whole. On the basis of the existing fitting results, the dependent variables corresponding to each centroid are substituted into the fitting results to obtain the corresponding fitting height. Of course, for the straight line of y=b, all the fitting heights are the same, that is, the average value of each height value.
[0093] There are two main types of specific height anomalies, and there are corresponding judgment methods. When the height value of the reference point is greater than the fitting height and reaches the preset first threshold, the corresponding pin to be tested is confirmed to be a floating height anomaly; when the height value of the reference point is less than the fitting height and reaches the preset second threshold, the corresponding pin to be tested is confirmed to be a collapsed anomaly. The specific judgment principle is that if the height value (actual height) exceeds the expected height (fitting height) too much, it is considered to be a floating height anomaly; if the height value is too much lower than the expected height, it is considered to be a collapse anomaly. Floating height anomalies and collapse anomalies are common defect types in automatic optical inspection and will not be explained in detail here.
[0094] On the basis of abnormality detection, the defect detection results can also be displayed based on the texture map after the abnormal state is detected (whether it is a collapse abnormality, a floating abnormality or a subsequent offset abnormality). For example, different colors are used to identify the corresponding defect type on the corresponding pin. The specific processing after the abnormality is detected can refer to the abnormality processing method after the relevant automatic optical inspection, which will not be repeated here.
[0095] Specific abnormality detection, in addition to the detection of collapse anomalies or floating height anomalies based on height, can also detect the offset anomalies of the pins to obtain the offset defect detection results, that is, the preset threshold includes a distance offset threshold, and the distance between the reference points of each pin outline is calculated according to the position of the reference point of each pin outline; according to the relationship between the distance and the distance deviation threshold, the offset defect detection result of each pin to be tested is determined. For a standardized chip, the pin distribution should be highly consistent and evenly spaced. A certain degree of deformation may occur when it is specifically welded to the circuit board, but the degree of deformation should at least be controlled within the range that does not affect the product quality. In the embodiment of the present application, according to the distance between the reference points of the pin outline, it is confirmed whether the gap between the pins remains basically consistent, so as to accurately judge the pin offset state, that is, when the distance deviation between the reference points of the pin outline is large, it can be considered that the original uniform spacing between the pins is broken, and it is obviously within the range that affects the product quality. At this time, it can be considered that there is a defect of excessive pin offset, and the offset defect detection result is the presence of an offset defect.
[0096] In an embodiment of the present application, for a chip in a printed circuit board, the pins are grouped, and defect detection is performed on the pins in the pin group, thereby achieving comprehensive and accurate detection of the chip in a step-by-step analysis manner.
[0097] In the above pin defect detection method, an image to be tested of the component to be tested is obtained, the component to be tested includes a plurality of pins to be tested, and the image to be tested includes a height map and a texture map; the pin contour corresponding to each pin to be tested is determined according to the height value and the texture map corresponding to the pin to be tested in the height map; the position of the reference point corresponding to each pin contour and the height value corresponding to the reference point are determined; the defect detection result of each pin to be tested is determined based on the position, height value and preset threshold corresponding to the reference point. During the automatic optical inspection process, the pin contour of the pin to be tested is confirmed on the basis of the height map and texture map obtained by image acquisition of the circuit board to be tested, and the defect detection result of each pin to be tested is determined according to the position, height value and preset threshold of the reference point corresponding to each pin contour. The entire inspection process can adapt to the actual parameter changes caused by the changes in the types of components and the differences in installation details, and there is no need to program for the inspection requirements of each component, which improves the versatility of the inspection scheme.
[0098] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 8 As shown, the electronic device includes a processor 310 and a memory 320. The interactive tablet and conference control device mentioned above are both electronic devices in terms of hardware architecture. In a common electronic device product form, an input device 330, an output device 340 and a communication device 350 may also be included. The number of processors 310 in the electronic device may be one or more. Figure 8 A processor 310 is taken as an example; the processor 310, the memory 320, the input device 330, the output device 340 and the communication device 350 in the electronic device can be connected via a bus or other means. Figure 8 The example of connecting through bus is taken in the following.
[0099] The memory 320, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the pin defect detection method in the embodiment of the present application. The processor 310 executes various functional applications and data processing of the electronic device by running the software programs, instructions and modules stored in the memory 320, that is, implements the above-mentioned pin defect detection method.
[0100] The memory 320 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 320 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 320 may further include a memory remotely arranged relative to the processor 310, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0101] The input device 330 may be used to receive network configuration information. The output device 340 may include a display device such as a display screen.
[0102] The above electronic device can be used to execute any pin defect detection method and has corresponding functions and beneficial effects.
[0103] An embodiment of the present invention also provides a storage medium containing computer executable instructions. When the computer executable instructions are executed by a computer processor, they are used to perform relevant operations in the pin defect detection method provided in any embodiment of the present application, and have corresponding functions and beneficial effects.
[0104] Those skilled in the art should understand that the embodiments of the present application may be provided as methods, systems, or computer program products.
[0105] Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the functions in the process. Figure 1 A process or multiple processes and / or boxes Figure 1These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0106] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory. The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0107] Computer readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0108] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0109] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A pin defect detection method, characterized in that: include: Acquire an image to be tested of the component to be tested, wherein the component to be tested includes a plurality of pins to be tested, and the image to be tested includes a height map and a texture map; Determine a pin contour corresponding to each pin to be tested according to the height value corresponding to the pin to be tested in the height map and the texture map; Determine the position of the reference point corresponding to each pin outline and the height value corresponding to the reference point; The defect detection result of each of the pins to be tested is determined based on the position, height value and preset threshold value corresponding to the reference point.
2. The pin defect detection method according to claim 1, characterized in that: The preset thresholds include a height value threshold and a difference value threshold; The step of determining the defect detection result of each pin to be tested based on the position, height value and preset threshold value corresponding to the reference point includes: Fitting the position of each reference point and the corresponding height value to obtain a fitting height of each reference point; The height defect detection result of each pin to be tested is determined according to the relationship between the height value of the reference point and the height value threshold, and the relationship between the difference value between the height value of the reference point and the fitting height and the difference value threshold.
3. The pin defect detection method according to claim 1, characterized in that: The preset threshold includes a distance deviation threshold; The step of determining the defect detection result of each pin to be tested based on the position, height value and preset threshold value corresponding to the reference point includes: Calculating the distance between the reference points of each pin outline according to the position of the reference point of each pin outline; According to the relationship between the distance and the distance deviation threshold, the offset defect detection result of each of the pins to be tested is determined.
4. The pin defect detection method according to claim 1, characterized in that: Determining the pin contour corresponding to each pin to be tested according to the height value corresponding to the pin to be tested in the height map and the texture map comprises: Determining the orientation of the pin to be tested based on the height map; Determine a reference area of the pin group where the pin to be tested is located according to the orientation; The pin profile of each pin to be tested is confirmed according to the height value in the reference area and the texture map.
5. The pin defect detection method according to claim 4, characterized in that: The step of determining a reference area of the pin group where the pin to be tested is located according to the orientation includes: For each of the pin groups, determining a corresponding first reference line according to a normal vector component associated with a corresponding orientation; Taking the first reference line as a reference, moving a preset distance toward the end of the pin to be tested to obtain a second reference line; An area between the corresponding first reference line and the second reference line of each pin group is used as a reference area.
6. The pin defect detection method according to claim 4, characterized in that: The step of confirming the pin profile of each pin to be tested according to the height value in the reference area and the texture map comprises: The average value of the height values in the reference area is taken as the lower threshold value of the height value based on the average value and a preset weight, and the maximum height value in the reference area is taken as the upper threshold value; Extracting reference pixel points whose height values are between the corresponding lower threshold value and upper threshold value from the corresponding pixel points of the pin group; The texture image is subjected to color extraction, and the reference pixel points corresponding to each pin to be tested are subjected to an opening operation to obtain the pin outline of each pin to be tested.
7. The pin defect detection method according to claim 4, characterized in that: The step of confirming the pin profile of each pin to be tested according to the height value in the reference area and the texture map comprises: Screening a preset number of highest range altitude values from the reference area, and confirming the maximum altitude value in the reference area; The average value of the highest range height values is used as the lower threshold, and the maximum height value is used as the upper threshold; Extracting reference pixel points whose height values are between the corresponding lower threshold value and upper threshold value from the corresponding pixel points of the pin group; The texture image is subjected to color extraction, and the reference pixel points corresponding to each pin to be tested are subjected to an opening operation to obtain the pin outline of each pin to be tested.
8. The pin defect detection method according to claim 4, characterized in that: The determining the orientation of the pin to be tested based on the height map includes: Determining the length and width orientation of each chip based on the aspect ratio between the image length and the image width of the area image of each chip in the height map; According to the height relationship between the two sides of each pin group in the regional image of each chip, the orientation of each pin group is determined as the orientation of the pin to be tested therein.
9. The pin defect detection method according to claim 8, characterized in that: The step of determining the orientation of each pin group as the orientation of the pin to be tested therein according to the height relationship between the two sides of each pin group in the regional image of each chip includes: According to the height relationship between the midpoints on both sides of each pin group in the regional image of each chip, the orientation of each pin group is determined as the orientation of the pin to be tested therein.
10. The pin defect detection method according to any one of claims 1 to 9, characterized in that: The step of determining the defect detection result of each pin to be tested according to the difference between the height value of the reference point and the fitting height includes: When the height value of the reference point is greater than the fitting height and reaches a preset first threshold, confirming that the corresponding pin to be tested is abnormally floating; When the height value of the reference point is less than the fitting height and reaches a preset second threshold, it is confirmed that the corresponding pin to be tested is collapsed abnormally.
11. The pin defect detection method according to any one of claims 1 to 9, characterized in that: After determining the defect detection result of each pin to be tested according to the difference between the height value of the reference point and the fitting height, the method further includes: The defect detection result is displayed based on the texture map.
12. An electronic device, characterized in that: include: one or more processors; a memory for storing one or more computer programs; When the one or more computer programs are executed by the one or more processors, the electronic device implements the pin defect detection method as described in any one of claims 1-11.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the pin defect detection method as described in any one of claims 1-11 is implemented.
Citation Information
Patent Citations
Chip pin defect detection method, detection device and equipment
CN115456945A
SOP chip pin coplanarity detection method and device
CN117115228A
Imaging device for inspecting ic package
JP1995332940A