Chip pin identification method for SMT chip mounter
By employing a shape combination matching method in SMT pick-and-place machines, and utilizing Hu invariant moment and Hausdorff distance difference to identify chip pins, the problems of low identification efficiency and unstable accuracy are solved, thereby improving the accuracy of chip identification and placement efficiency.
Patent Information
- Application Number
- CN202511570671.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-30
- Publication Date
- 2026-01-16
- Estimated Expiration
- 2045-10-30
AI Technical Summary
Existing technologies for chip pin identification in SMT placement machines suffer from low identification efficiency, unstable accuracy, and high requirements for lighting conditions, making it difficult to meet the real-time performance requirements of industrial automation.
A shape combination matching identification method is adopted. The shape and number of chip pins are determined by Hu invariant moment and Hausdorff distance difference. The pin library is then used for matching to identify the type and number of pins in the chip.
It improves the accuracy and efficiency of chip pin identification, reduces the defect rate in the process, and enhances the overall placement efficiency of SMT placement machines.
Smart Images

Figure CN121033059B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application mainly relates to the field of pin recognition, in particular to a chip pin recognition method for an SMT chip mounter. BACKGROUND
[0002] In visual positioning measurement, there are many techniques commonly used for chip recognition, such as edge detection, template matching, feature recognition and deep learning. With the rapid development of artificial intelligence in recent years, the technology of deep learning has been significantly improved, and many flaw recognition and classification recognition can be easily solved, but the requirement for hardware performance is high, and the real-time performance cannot meet the requirements of industrial automation. Edge detection and template matching are fast and can achieve millisecond-level recognition response, but they require a lot of light and cannot guarantee the accuracy of each recognition after a long time of work. Feature recognition is a combination of the above techniques, with the dual advantages of recognition efficiency and recognition accuracy, but when facing thousands of materials in the chip mounter, the establishment of the feature library is a huge project, so it is often used for separate identification of special chips.
[0003] In view of the problems encountered in the above techniques, in combination with the high-contrast chip images in the application of the chip mounter, the present application adopts a shape combination matching recognition method, which identifies all similar shapes on the chip and in the pin library, classifies them, and then determines the pin types and quantities, and then matches the similar pin types and quantities in the packaging library, to finally obtain the accurate pin quantity of the chip, so as to determine whether the chip has a fatal defect on the pin, and to establish a stable foundation for subsequent chip measurement and mounting.
[0004] The present application discloses a chip pin recognition method for an SMT chip mounter, which corrects the similarity of similar contours by the Hu invariant moment and Hausdorff distance difference, and then accurately identifies all pin types and corresponding quantities contained in a chip according to the characteristics that the shapes and sizes of the same type of pins in the chip are all the same, so as to facilitate subsequent chip packaging recognition and chip measurement. As one of the important standards for judging the integrity of the chip, pin recognition helps to find the defects of the chip at the first time, reduces the defect rate in the whole process, and improves the overall mounting efficiency of the SMT chip mounter. SUMMARY
[0005] Therefore, it is necessary to provide a chip pin recognition method for an SMT chip mounter in view of the existing problems.
[0006] A chip pin recognition method for an SMT chip mounter, comprising:
[0007] Step 1: Take an image of the bottom of the complete chip through the camera, and obtain all contours corresponding to each pin of the chip and the minimum circumscribed rectangle of each contour after binarization processing by the function threshold;
[0008] Step 2: Calculate the shortest distance L of each coordinate point Pn of each contour to its minimum circumscribed rectangle, and calculate the proportion R of each distance L to the length of the adjacent side of the minimum circumscribed rectangle, respectively ABlmN , the number of proportions R ABlmN less than 0.3 accounts for more than 70% of the total number, and the contour edge is identified as a straight line, and the total number of all straight lines is calculated;
[0009] Step 3: Use the function approxPolyDP to perform polygon fitting processing on each contour in turn, and record the number of right angles Angle_Num and the number of vertices AP_Num of the fitted polygon in the contour;
[0010] Step 4: Determine the number of straight lines, the number of right angles and the number of vertices in each contour to obtain the approximate shape of the contour, which is a triangle, a circle, a rectangle or a polygon, and calculate the shape score value;
[0011] Step 5: After identifying the approximate shape of the contour using the figure, the contours with the same shape in the pin library in the cache array are extracted, respectively, the Hu moments of the two are obtained by using the function HuMoments, and the low-order moment deviation and the Hausdorff distance difference of the two contours are calculated;
[0012] Step 6: The shape score value, the Hu low-order moment deviation and the Hausdorff distance difference are normalized to obtain the actual deviation score value, and if the actual deviation score value is less than a set threshold value, wherein the set threshold value is 0.2-0.5, the contour with the same shape in the pin library in the cache array is recorded as matching the detected contour;
[0013] Step 7: If the actual deviation score value is greater than the set threshold value, a new pin is created in the cache array, and is stored in the pin library. The pin library also stores the length W, the width H, the circumference C, the area S, the number of straight lines LineNum, the number of right angles Angle_Num, the number of polygon vertices AP_Num and the total score sum_score of the newly created pin, which is used as the matching standard of other contours in the pin library.
[0014] Further technical solutions, the shape score value, the Hu low-order moment deviation and the Hausdorff distance difference are normalized to obtain the actual deviation score value, and if the actual deviation score value is less than a set threshold value, wherein the set threshold value is 0.3.
[0015] Further technical solutions, the step 2 includes:
[0016] The length W1, the width H1, the four vertices A, B, C, D and the four side lengths AB, BC, CD, DA of the circumscribed rectangle are recorded, and the length-width ratio , the perimeter-area ratio .
[0017] Further technical solutions, the step 3 includes:
[0018] The projection ratio of the first coordinate point P1 in the contour on the side length AB is calculated According to the projection coordinate calculation formula, the projection coordinate point Q1 (x q1 , y q1 ) of the coordinate point P1 on the side length AB can be obtained, the P1 coordinate point is (x P1 , y P1 ), the A point coordinate is (x A , y A ), the B point coordinate is (x B , y B ), , The distance of the projection coordinate point Q1 to P1 can be obtained .
[0019] Further technical solutions, the step 4 includes:
[0020] Repeat step 3 to obtain the distances L P1Q2 , L P1Q3 , L P1Q4 of the other three side lengths, compare the sizes of the four distances, and the closest rectangular edge and the shortest distance L min1 from the P1 point to the frame can be obtained.
[0021] Further technical solutions, the step 5 includes:
[0022] Repeat steps 2 to 4 to obtain the shortest distances L min2 , L min3 ,... L minN of the remaining coordinate points P2, P3,... Pn in the first contour to the circumscribed rectangle and the closest rectangular edge, and the distances L ABmN of all points close to the side length AB to the side length H1 of the adjacent side BC are calculated If R ABlm1 , R ABlm2 ,... R ABlmNIf the number of lines less than 0.3 is more than 70% of the total number, the profile edge is considered as a straight line; the number of straight lines in the remaining three groups is calculated, and the total number of straight lines in the first profile is recorded as LineNum.
[0023] Further technical solutions, the step 6 includes:
[0024] The polygon approximation is performed on the profile by using the function approxPolyDP to obtain a polygon vertex coordinate set Pa[n], and the included angle of the polygon is calculated according to the vector included angle calculation formula ,
[0025] If , the corresponding angle is judged as a right angle, and the number of right angles Angle_Num and the number of vertices AP_Num of the fitted polygon in the profile are recorded.
[0026] Further technical solutions, the step 7 includes:
[0027] The relationship between the number of straight lines LineNum, the number of right angles Angle_Num and the number of vertices AP_Num in the profile is established, and whether (Angle_Num + LineNum) / AP_Num is less than 0.25 is judged. If the condition is met, it is indicated that the profile is a circle, and the following step performs a circle matching logic. If (Angle_Num + LineNum) / AP_Num is greater than or equal to 0.25, a rectangle or polygon matching calculation is performed.
[0028] Further technical solutions, the method further includes:
[0029] Step 8: If it is judged as a circle in step 7, the circle score value is calculated , if the circle_score is less than 0.3, the profile is determined as a circular profile, otherwise a rectangle matching calculation is performed; if it is confirmed as a circular profile again, whether it is a first circular profile with a diameter of is judged, dev1 is a settable deviation value, the default value is 0.15, if it is the first profile, it is stored in the program cache array as a pin library, if it is not the first profile, the matching pin in the pin library is extracted for profile matching calculation.
[0030] Further technical solutions, the method further includes steps 9 to 14, specifically including:
[0031] Step 9: If it is not a circle in step 7, the number of AP_Num is judged, and the number of vertices of the fitted polygon is sufficient in the case of a rectangular profile. If 4<AP_Num<7, it is determined as a triangle, and the pin is saved as a triangle,
[0032] Other rectangle-like calculation rectangle score , determine whether the first non-circular contour of long = W1 * (1 ± dev1), high = H1 * (1 ± dev2), dev1, dev2 are settable deviation values, the default value is 0.15, if it is the first contour, it is stored in the program cache array as a pin library, if it is not the first contour, the matching pin in the pin library is extracted to perform contour matching calculation in step 10;
[0033] Step 10: After the approximate contour shape is distinguished by the graphic judgment, the shape consistent contours in the pin library in the cache array and the detected contours are compared respectively, and the Hu moments of the two are obtained by using the function HuMoments, Ma[7] and Mb[7],
[0034] Calculate the deviation of low-order moments , where n < 5, , ;
[0035] Step 11: Calculate the Hausdorff distance of the shape consistent contours in the pin library in the cache array and the detected contours, extract all pixel coordinates in the contour ctr1 and the contour ctr2 respectively, and calculate the Euclidean distance to obtain h(ctr1, ctr2) and h(ctr2, ctr1), wherein , , wherein a point is a cyclic sampling in the contour ctr1, take a point and a cyclic sampling b point in the contour ctr2 to calculate the distance one by one, and finally get the Hausdorff distance deviation ;
[0036] Step 12: According to the four values of circle_score, rect_score, dev_sum, and dev_huf obtained in the above steps, if it is a circle, calculate the total score , if it is a non-circular shape, calculate the total score , wherein ratio1, ratio2, and ratio3 are settable normalization coefficients, and satisfy (ratio1 + ratio2 + ratio3) = 1;
[0037] Step 13: compare the actual deviation score value sum_score with the software set threshold value set_score, if sum_score < set_score, it means that the detected profile is similar to the pin profile in the pin library, record the matching pin profile, if the matching fails, a new pin is created, and the length W, width H, circumference C, area S, number of straight lines LineNum, number of right angles Angle_Num, number of polygon vertices AP_Num and total score sum_score of the new pin are recorded as the matching standard of the pin library for other profiles;
[0038] Step 14: repeat the above steps until all profiles are processed, classify all pins in an IC image, and finally return the total number of pins in the entire image, the type and number of pins of various shapes and sizes, and preliminarily classify the approximate packaging type of the processed IC according to the data of the pin types and quantities contained in the existing component library, facilitating subsequent measurement and integrity judgment of the chip.
[0039] Compared with the prior art, the present application has the following advantages: (1) only the light pin of the binary image is processed, which can avoid noise errors caused by lighting problems, and at the same time can save time-consuming algorithm operations such as edge finding and filtering, thereby improving the efficiency of visual recognition. (2) By using the Hu invariant moment and Hausdorff distance difference discrimination method, the similarity of similar profiles is corrected, and then all pin types and corresponding quantities contained in a chip are accurately recognized according to the characteristics that the shapes and sizes of the same type of pins in a chip are all the same, which facilitates subsequent chip packaging recognition and chip measurement. (3) As one of the important standards for judging the integrity of a chip, pin recognition helps to find defects in a chip at the first time, reduces the defect rate in the whole process, and improves the overall mounting efficiency of the SMT mounter. BRIEF DESCRIPTION OF DRAWINGS
[0040] Figure 1 A flowchart of a chip pin recognition method for an SMT mounter is provided for the embodiments of the present application.
[0041] Figure 2 A total flowchart of pin recognition is provided for the embodiments of the present application. DETAILED DESCRIPTION
[0042] A chip pin recognition method for an SMT mounter includes the following steps:
[0043] Step 1: take an image of the bottom of a complete chip through a camera, and obtain all profiles corresponding to each pin of the chip and the minimum circumscribed rectangle of each profile after function threshold binaryzation processing;
[0044] Step 2: Calculate the shortest distance L of each coordinate point Pn of each contour to its minimum circumscribed rectangle, and calculate the proportion R of each distance L to the length of the adjacent side of the minimum circumscribed rectangle respectively ABlmN , the proportion R ABlmN If the number of proportions R less than 0.3 accounts for more than 70% of the total number, the contour edge is identified as a straight line, and the total number of all straight lines is calculated.
[0045] Step 3: Use the function approxPolyDP to perform polygon fitting processing on each contour in turn, and record the number of right angles Angle_Num and the number of vertices AP_Num of the fitted polygon in the contour.
[0046] Step 4: Determine the number of straight lines, the number of right angles, and the number of vertices in each contour to obtain the approximate shape of the contour, which is a triangle, a circle, a rectangle, or a polygon, and calculate the shape score value.
[0047] Step 5: After identifying the approximate contour shape using the graph, extract the contours with the same shape from the pin library in the cache array, use the function HuMoments to obtain the Hu moments Ma[7] and Mb[7] of the two contours, and finally calculate the deviation of the low-order moments and the Hausdorff distance difference between the two contours.
[0048] Step 6: Normalize the shape score value, the deviation of the Hu low-order moments, and the Hausdorff distance difference to obtain the actual deviation score value. If the actual deviation score value is less than the set threshold value, which is preferably 0.2-0.5, record that the contour with the same shape in the cache array matches the detected contour.
[0049] Step 7: If the actual deviation score value is greater than the set threshold value, create a new pin in the cache array and store it in the pin library. The pin library also stores the length W, width H, perimeter C, area S, number of straight lines LineNum, number of right angles Angle_Num, number of polygon vertices AP_Num, and total score sum_score of the newly created pin as the matching standard for other contours in the pin library.
[0050] Preferably, the shape score value, the deviation of the Hu low-order moments, and the Hausdorff distance difference are normalized to obtain the actual deviation score value. If the actual deviation score value is less than the set threshold value, which is preferably 0.3.
[0051] Step 2 includes recording the perimeter , area , and length , width , four vertices A, B, C, D and four side lengths AB, BC, CD, DA, get the aspect ratio
[0052] , the perimeter area ratio .
[0053] Preferably, the step 3 comprises:
[0054] Calculate the projection ratio of the first coordinate point P1 in the contour in the side length AB According to the projection coordinate calculation formula, the projection coordinate point of the coordinate point P1 on the side length AB can be obtained as , the P1 coordinate point is , the A point coordinate is , and the B point coordinate is , , The distance of the projection coordinate point Q1 to P1 can be obtained .
[0055] Preferably, the step 4 comprises:
[0056] Repeat step 3 to obtain the distances L of the first coordinate point P1 to the other three side lengths P1Q2 , L P1Q3 , L P1Q4 Compare the sizes of the four distances, and the closest rectangular edge to the P1 point and the shortest distance L to the frame can be obtained min1 .
[0057] Preferably, the step 5 comprises:
[0058] Repeat steps 2 to 4 to obtain the shortest distances L of the remaining coordinate points P2, P3,... Pn in the first contour to the circumscribed rectangle min2 , L min3 ,... L minN and the closest rectangular edge, calculate the distance L of all points close to the side length AB ABmN to the length H1 of the adjacent side BC If the number of R ABlm1 , R ABlm2 ,... R ABlmN is more than 70% of the total number, it is considered that this contour is a straight line; calculate the number of straight lines in the remaining three groups, and record the total number of straight lines in the first contour as LineNum.
[0059] Preferably, the step 6 comprises:
[0060] The contour is polygonally approximated by using the function approxPolyDP to obtain a polygon vertex coordinate set Pa[n], and the polygon angle is calculated according to the vector angle calculation formula ,
[0061] If , the corresponding angle is determined as a right angle, and the number of right angles Angle_Num in the contour and the number of polygon vertices AP_Num are recorded.
[0062] Preferably, the step 7 comprises:
[0063] The relationship of the number of straight lines LineNum, the number of right angles Angle_Num and the number of vertices AP_Num in the contour is established, and it is determined whether (Angle_Num + LineNum) / AP_Num is less than 0.25. If the condition is met, it is indicated that the contour is a circle, and the subsequent step performs a circle matching logic. If (Angle_Num + LineNum) / AP_Num is greater than or equal to 0.25, a rectangular or polygon matching calculation is performed.
[0064] Preferably, the method further comprises:
[0065] Step 8: If it is determined as a circle in step 7, a circle score value is calculated If the circle_score is less than 0.3, the contour is determined as a circular contour, otherwise a rectangular matching calculation is performed. If it is again determined as a circular contour, it is determined whether it is a first circular contour with a diameter of W1*(1±dev1). dev1 is a settable deviation value, and the default value is 0.15. If it is the first contour, it is stored in the program cache array as a pin library. If it is not the first contour, the matching pin in the pin library is extracted for contour matching calculation.
[0066] Preferably, the method further comprises steps 9 to 14, specifically comprising:
[0067] Step 9: If it is not determined as a circle in step 7, the number of AP_Num is determined. In the case that the number of vertices of the fitted polygon is sufficient, the number of vertices of the rectangular contour is 4<AP_Num<7. If it is equal to 3, it is determined as a triangle, and the pin is saved as a triangle.
[0068] Other rectangular calculation rectangular score , it is determined whether it is 、 The first non-circular contour, dev1, dev2 is a settable deviation value, the default value is 0.15, if it is the first contour, it is stored in the program cache array as a pin library, if it is not the first contour, the matching pin in the pin library is extracted for contour matching calculation in step 10;
[0069] Step 10: After roughly distinguishing the contour shape through the graph, the shape consistent contours in the pin library in the cache array and the detected contour are compared, and the Hu moments of the two are obtained by using the function HuMoments, that is, Ma[7] and Mb[7],
[0070] Calculate the deviation of low-order moments , Where n< 5, , ;
[0071] Step 11: Calculate the Hausdorff distance of the shape consistent contour in the pin library in the cache array and the detected contour. Extract all pixel coordinates in the contour ctr1 and the contour ctr2, and calculate the Euclidean distance to obtain h(ctr1, ctr2) and h(ctr2, ctr1), wherein , , Where a is the circular sampling point in the contour ctr1, and the circular sampling point b in the contour ctr2 is taken to calculate the distance one by one, and finally the Hausdorff distance deviation is obtained ;
[0072] Step 12: According to the four values of circle_score, rect_score, dev_sum, and dev_huf obtained in the above steps, if it is a circle, the total score is calculated , If it is a non-circular shape, the total score is calculated , Wherein ratio1, ratio2, and ratio3 are settable normalization coefficients, and satisfy (ratio1+ratio2+ratio3)=1;
[0073] Step 13: Compare the actual deviation score sum_score with the software set threshold set_score. If sum_score < set_score, it means that the detected contour is similar to the pin contour in the pin library, and the matching pin contour is recorded. If the matching fails, a new pin is created, and the length W, width H, circumference C, area S, number of straight lines LineNum, number of right angles Angle_Num, number of polygon vertices AP_Num, and total score sum_score of the new pin are recorded as the pin library for matching standards of other contours.
[0074] Step 14: repeat the above steps until all the contour processing is completed, all the pins in an IC image are classified, the total number of pins in the entire image, the type and number of pins of various shapes and sizes are returned, and the approximate packaging type of the processed IC is preliminarily classified according to the data of the pin types and quantities contained in the existing component library, facilitating subsequent measurement and integrity judgment of the chip.
Claims
1. A chip pin recognition method for an SMT chip mounter, characterized by, The method comprises the following steps: Step 1: an image of the bottom of a complete chip is captured by a camera, and after being binarized by a function threshold, all contours corresponding to the pins of the chip in the image and the minimum circumscribed rectangle of each contour are obtained; Step 2: Calculate the shortest distance L of each coordinate point Pn of each contour to its minimum circumscribed rectangle, and calculate the proportion of each distance L to the length of the adjacent side of the minimum circumscribed rectangle respectively , the proportion If the number of proportions less than 0.3 accounts for more than 70% of the total number, the contour edge is identified as a straight line, and the total number of all straight lines is calculated. Step 3: the function approxPolyDP is used to sequentially perform polygon fitting processing on each contour, and the number of right angles Angle_Num in the contour and the number of vertices AP_Num of the fitted polygon are recorded; Step 4: the number of straight lines, the number of right angles and the number of vertices in each contour are judged to obtain the approximate shape of the contour, which is a triangle, a circle, a rectangle or a polygon, and the shape score value is calculated; Step 5: after the approximate contour shape is distinguished by using the graph, the contours with the same shape in the pin library in the cache array are extracted respectively, the Hu moments of the two contours are obtained by using the function HuMoments, that is, Ma[7] and Mb[7], finally the deviation of the low-order moments is calculated, and the Hausdorff distance difference of the two contours is calculated; Step 6: the shape score value, the deviation of the Hu low-order moments and the Hausdorff distance difference are normalized to obtain an actual deviation score value, if the actual deviation score value is less than a set threshold value, wherein the set threshold value is 0.2-0.5, then it is recorded that the contour with the same shape in the pin library in the cache array matches the detected contour; Step 7: if the actual deviation score value is greater than the set threshold value, a new pin is created in the cache array, and is stored in the pin library, the length W, the width H, the circumference C, the area S, the number of straight lines LineNum, the number of right angles Angle_Num, the number of polygon vertices AP_Num and the total score sum_score of the new pin are stored in the pin library as the matching standard of other contours.
2. The chip pin recognition method for SMT chip mounter according to claim 1, characterized in that, The shape score value, the deviation of the Hu low-order moments and the Hausdorff distance difference are normalized to obtain an actual deviation score value, if the actual deviation score value is less than a set threshold value, wherein the set threshold value is 0.
3.
3. The chip pin recognition method for SMT chip mounter according to claim 1, characterized in that, The step 2 comprises: the perimeter of the contour , the area , and the length , the width , the four vertices A, B, C, D and the four side lengths AB, BC, CD, DA, to obtain the aspect ratio , the perimeter-to-area ratio .
4. The chip pin recognition method for SMT chip mounter according to claim 3, characterized in that, The step 3 comprises: The projection ratio of the first coordinate point P1 in the contour on the side length AB is calculated According to the projection coordinate calculation formula, the projection coordinate point of the coordinate point P1 on the side length AB can be obtained The coordinate point P1 is The coordinate of point A is The coordinate of point B is , , The distance from the projection coordinate point Q1 to P1 can be obtained by calculating the distance from the first coordinate point P1 in the contour to the side length AB of the minimum circumscribed rectangle .
5. The chip pin recognition method for SMT chip mounter according to claim 4, characterized in that, The step 4 comprises: Repeat step 3 to get the distance to the other three sides Compare the four distances to get the closest side to P1 and the shortest distance to the frame 6. The chip pin recognition method for SMT chip mounter according to claim 5, characterized in that, The step 5 comprises: Repeat step 2 to step 4 to get the shortest distance from the rest of the coordinate points P2, P3,... Pn in the first contour to the circumscribed rectangle and the closest rectangle side, calculate the distance of all points close to the side length AB Proportion to the side length H1 of the adjacent side BC If If the number of points with a value less than 0.3 in the group is more than 70% of the total number, it is considered a straight line; calculate the number of straight lines in the remaining three groups, and record the total number of straight lines in the first contour as LineNum.
7. The chip pin recognition method for SMT chip mounter according to claim 6, characterized in that, The step 6 comprises: The contour is polygonally approximated by using a function approxPolyDP to obtain a polygon vertex coordinate set Pa[n], and the polygon angle is calculated according to a vector angle calculation formula , If the corresponding angle is determined as a right angle, and the number of right angles Angle_Num and the number of vertices of the fitted polygon AP_Num in the contour are recorded.
8. The chip pin recognition method for SMT chip mounter according to claim 7, characterized in that, The step 7 comprises: The relationship between the number of straight lines LineNum, the number of right angles Angle_Num and the number of vertices AP_Num in the contour is established to determine whether it is less than 0.25, and if the condition is met, it is indicated that the contour is a circle, and the following step performs a circle matching logic, and if it is greater than or equal to 0.25, a rectangle or polygon matching calculation is performed.
9. The chip pin recognition method for SMT chip mounter according to claim 8, characterized in that, The method further comprises: Step 8: If the shape is determined to be a circle in step 7, then calculate the circle score value If the circle score is less than 0.3, then the shape is determined to be a circular shape, otherwise, proceed to the rectangle matching calculation. If the shape is again determined to be a circular shape, then determine if the shape is a first circular shape with a diameter of dev1, where dev1 is a settable deviation value, and the default value is 0.
15. If the shape is a first circular shape, then store the shape in a program buffer array for use as a pin library. If the shape is not a first circular shape, then extract a matching pin from the pin library and proceed to the pin matching calculation.
10. The chip pin recognition method for an SMT chip mounter according to claim 9, wherein The method further comprises steps 9 to 14, specifically comprising: Step 9: If the judgment is not a circle in step 7, judge the number of AP_Num, and the number of vertices of the rectangle contour is in line with the number of vertices of the polygon in the case of enough pixel points If equal to 3, it is identified as a triangle, and the pin is saved as a triangle, Other rectangle-like calculation rectangle score values , determine whether it is , The first non-circular contour dev1, dev2 is a settable deviation value, the default value is 0.15, if it is the first contour, it is stored in the program cache array as a pin library, and if it is not the first contour, the matching pin in the pin library is extracted for contour matching calculation in step 10. Step 10: after the approximate contour shape is distinguished by using the graph, the contours with the same shape in the pin library in the cache array and the detected contour are extracted respectively for comparison, the Hu moments of the two contours are obtained by using the function HuMoments, that is, Ma[7] and Mb[7], computing the bias and , wherein n < 5, , ; Step 11: Calculate the Hausdorff distance of the shape consistent contour of the pin library in the cache array and the detection contour, respectively extract all the pixel coordinates in the contour ctr1 and the contour ctr2, and calculate the Euclidean distance to obtain and wherein , wherein a point is a cyclic sampling in the contour ctr1, and the cyclic sampling b point in the contour ctr2 is taken to calculate the distance one by one, and finally the Hausdorff distance deviation is obtained; Step 12: Total score is calculated according to the above steps Four values, if circular If non-circular Where ratio1, ratio2, ratio3 are settable normalization coefficients and satisfy ; Step 13: compare the actual deviation score sum_score with the software set threshold set_score, if sum_score < set_score, it means that the detected profile is similar to the pin profile in the pin library, record the matching pin profile, if the matching fails, create a new pin, record the length W, width H, circumference C, area S, line number LineNum, right angle number Angle_Num, polygon vertex number AP_Num and total score sum_score of the new pin, as the pin library for matching standard of other profiles; Step 14: repeat the above steps until all profiles are processed, classify all pins in an IC image, finally return the total number of pins in the whole image, the type and number of pins of various shapes and sizes, and preliminarily classify the approximate packaging type of the processed IC according to the data of the type and number of pins contained in the existing component library, which is convenient for subsequent measurement and integrity judgment of the chip.
Citation Information
Patent Citations
Cabinet identification method based on laser point cloud
CN115187744A
Method and device for the characterization of living specimens from a distance
US20210004577A1