CN111553885A - SOT type chip pin parameter detection method based on rollback tree - Google Patents

SOT type chip pin parameter detection method based on rollback tree Download PDF

Info

Publication number
CN111553885A
CN111553885A CN202010271193.XA CN202010271193A CN111553885A CN 111553885 A CN111553885 A CN 111553885A CN 202010271193 A CN202010271193 A CN 202010271193A CN 111553885 A CN111553885 A CN 111553885A
Authority
CN
China
Prior art keywords
pin
chip
group
feet
pins
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010271193.XA
Other languages
Chinese (zh)
Other versions
CN111553885B (en
Inventor
刘伟华
杨学博
孙昊
于兴虎
高会军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Harbin Institute of Technology
Original Assignee
Harbin Institute of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Harbin Institute of Technology filed Critical Harbin Institute of Technology
Priority to CN202010271193.XA priority Critical patent/CN111553885B/en
Publication of CN111553885A publication Critical patent/CN111553885A/en
Application granted granted Critical
Publication of CN111553885B publication Critical patent/CN111553885B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/12Edge-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30148Semiconductor; IC; Wafer

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Geometry (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

A method for detecting SOT type chip pin parameters based on a rollback tree belongs to the technical field of SOT type chip detection. The invention aims to solve the problem that the chip pins cannot be correctly identified and grouped in the traditional teaching method. The method comprises the following steps: acquiring a gray level image of a pin of an SOT type chip; obtaining a chip pin binaryzation image; obtaining a chip pin image containing a digital mark; according to the constraint condition of the rollback tree, pins represented by the numerical marks are divided into an upper group of feet, a root group and a lower group of feet by using a rollback number algorithm; calculating according to the central position of each foot in a chip pin binary image corresponding to the digital mark to obtain a rough rotation angle of the chip, carrying out one-to-one correspondence between the root pin of the digital mark and all the foot pins by using the rough rotation angle to obtain a plurality of pin pairs comprising one foot and one corresponding root, and solving a minimum external rectangle for each pair of pin pairs to obtain the length and the width of each pin pair. The invention improves the precision and efficiency of chip detection.

Description

SOT type chip pin parameter detection method based on rollback tree
Technical Field
The invention relates to a method for detecting SOT type chip pin parameters based on a rollback tree, and belongs to the technical field of SOT type chip detection.
Background
In the mounting process of the chip mounter, teaching correction needs to be performed on the chip to acquire parameter information of the chip.
The rollback tree algorithm is also called backtracking method, and is a method for systematically searching the solution of the problem. The basic idea of the rollback tree algorithm is: and finding the solution of the problem in the search attempt process, and returning to the backtracking process to try other paths when the solution condition is not met. The rollback tree algorithm needs pruning conditions, is suitable for the problems that the local optimal solution can be accepted and can judge whether the current solution is effective or not through quick and effective judgment conditions.
In the chip pin parameter detection method of the traditional teaching method, the backspacing tree algorithm is not effectively utilized to identify the chip pin parameters, and the correct identification and grouping of the chip pins cannot be realized.
Disclosure of Invention
The invention provides a method for detecting SOT type chip pin parameters based on a rollback tree, which aims to solve the problem that chip pins cannot be correctly identified and grouped in the traditional teaching method.
The invention discloses a method for detecting SOT type chip pin parameters based on a rollback tree, which comprises the following steps:
the method comprises the following steps: acquiring a gray level image of a pin of an SOT type chip;
step two: setting a segmentation threshold value, and segmenting the gray level image of the chip pin to obtain a chip pin binaryzation image;
step three: carrying out 8 connected domain analysis on the chip pin binary image to obtain a chip pin image containing a digital mark;
step four: designing a constraint condition of a rollback tree according to the fact that upper pins and lower pins of the SOT type chip are parallel and the number of roots and feet are the same; according to the constraint condition, dividing the pins represented by the numerical marks into an upper group of feet, a root group of feet and a lower group of feet by using a backspacing algorithm;
step five: calculating according to the central position of each foot in a chip pin binary image corresponding to the digital mark to obtain a rough rotation angle of the chip, carrying out one-to-one correspondence between the root pin of the digital mark and all the foot pins by using the rough rotation angle to obtain a plurality of pin pairs comprising one foot and one corresponding root, and solving a minimum external rectangle for each pair of pin pairs to obtain the length and the width of each pin pair.
The method for detecting the SOT type chip pin parameters based on the rollback tree further comprises the following steps:
step six: and determining the accurate rotation angle of the chip based on the position relationship among the upper group of feet, the lower group of feet and the lower group of feet by taking all the root pins corresponding to the upper group of feet in the root group as the upper group of roots and taking all the root pins corresponding to the lower group of feet as the lower group of roots.
According to the method for detecting the pin parameters of the SOT type chip based on the rollback tree,
the rollback tree constraints include: the method comprises the following steps of pin group fitting straight line included angle constraint, pin group fitting straight line range constraint, pin group fitting straight line residual error constraint and pin number constraint.
According to the method for detecting the pin parameters of the SOT type chip based on the rollback tree,
the pin group fitting straight line included angle constraint comprises:
the included angle between the straight line formed by all the pins in the upper group of feet and the horizontal direction of the image is less than 30 degrees; and the included angle between the straight line formed by all the pins in the lower group of feet and the horizontal direction of the image is less than 30 degrees;
the pin group fitting straight line range constraints include: all the root pins are positioned between the straight line formed by the upper group of feet and the straight line formed by the lower group of feet;
the pin group fitting straight line residual error constraint comprises:
the sum of the residual errors of all the pins in the upper group of feet and the straight lines of the upper group of feet and the residual errors of all the pins in the lower group of feet and the straight lines of the lower group of feet is less than a parallel threshold value;
the pin number constraints include: the sum of the number of all pins in the upper group of feet and the number of all pins in the lower group of feet is equal to the number of the root pins.
According to the method for detecting the pin parameters of the SOT type chip based on the rollback tree,
in the fourth step, the specific method for dividing the pins represented by the numerical marks into an upper group of feet, a root group and a lower group of feet comprises the following steps: obtaining a first pin in the upper group of feet and a first pin in the lower group of feet by using an ergodic searching method according to the position of the pin in the chip pin binaryzation image and the extreme value of the pin position in the image; on the basis, a backspacing tree algorithm is adopted according to backspacing tree constraint conditions, and all pins are divided into an upper group of feet, a root group, a lower group of feet and an unknown group; and then, the pins in the unknown group are searched downwards one by one according to the constraint condition of the rollback tree until all the pins in the unknown group are classified into an upper group foot, a root group or a lower group foot.
According to the method for detecting the SOT type chip pin parameters based on the rollback tree, the concrete method for obtaining the length and the width of the pin pair in the fifth step comprises the following steps:
firstly, obtaining the central position of a chip by using the average value of the central positions of pins of the foot of the chip obtained by analyzing a connected domain; calculating the rough rotation angle of the chip by using the grouping information of the upper group of feet, the root group and the lower group of feet; the rough rotation angle is the average value of the included angle between the straight line of the upper group of feet and the horizontal direction of the image and the included angle between the straight line of the lower group of feet and the horizontal direction of the image; projecting all pins by using the linear direction of the rough rotation angle and the orthogonal direction thereof to obtain the root corresponding to each foot, and determining a pin pair; the length and the width of the minimum external rectangle are the length and the width of the corresponding pin pair, and the area of the minimum external rectangle is the area of the corresponding pin pair.
According to the method for detecting the SOT type chip pin parameters based on the rollback tree, the method for obtaining the chip center position comprises the following steps:
setting n foot pins on the chip, wherein the coordinates of the n upper foot pins in a plane rectangular coordinate system are (x)1,y1)…(xn,yn) The number of the lower foot pins is m, and the coordinates of the m lower foot pins in the rectangular plane coordinate system are (x'1,y′1)...(x′m,y′m) The chip center position coordinate (x)center,ycenter) Comprises the following steps:
Figure BDA0002443209880000031
according to the method for detecting the SOT type chip pin parameters based on the rollback tree, the method for calculating the rough rotation angle of the chip comprises the following steps:
setting the included angle between the least square fitting straight line of the assembled foot part on the chip and the horizontal direction of the image as thetaupThe angle formed by the lower foot part is thetadownThen the chip roughly rotates by an angle thetaoriComprises the following steps:
Figure BDA0002443209880000032
according to the SOT type chip pin parameter detection method based on the rollback tree, in the fifth step, the method for carrying out one-to-one correspondence on the root pins marked by the numbers and all the foot pins comprises the following steps:
establishing a chip pixel coordinate system S according to the original direction of a chip pin binary imagepixelThe chip pixel coordinate system SpixelRotating theta along the pixel origin in the direction of the chip rotation angleoriObtaining a chip position coordinate system Sposition(ii) a Position coordinate system S of each pixel in chip pin binary imagepositionThe position in (2) is obtained by a picture matrix; chip pixel coordinate system SpixelPixel position (x, y) in chip position coordinate system SpositionThe position in (A) is (x)1,y1) Then (x)1,y1) And (x, y) are in the following transformation relationship:
Figure BDA0002443209880000033
according to the method for detecting the SOT type chip pin parameters based on the rollback tree, the method for obtaining the accurate rotation angle of the chip in the sixth step comprises the following steps:
setting the included angle between the straight line of the upper group of feet and the horizontal edge of the image as theta1The included angle between the straight line formed by the roots of the upper group and the horizontal edge of the image is theta2The angle between the straight line of the lower group of feet and the horizontal edge of the image is theta3The included angle between the straight line of the lower group root and the horizontal edge of the image is theta4,θ1、θ2、θ3And theta4The included angle between the least square fitting straight line and the image horizontal edge is obtained by using the position of a chip pin; the precise rotation angle θ of the chip is:
Figure BDA0002443209880000041
the invention has the advantages that: the invention can be used as a chip mounter SOT type chip teaching method, and is used for solving the problems of pin grouping and parameter acquisition of SOT type chips detected by a chip mounter in the chip teaching process, wherein the parameters comprise information such as the position, the size, the rotation angle and the like of the chips. The method utilizes a rollback tree to group pins, and utilizes a minimum external rectangle to obtain parameter information of the paired root and foot. The SOT type chip pin parameter information obtained by the method has higher precision and stability, and experiments prove that the method has stronger robustness.
The method improves the correct grouping capability of chip pin detection in the chip mounter, and improves the precision and efficiency of chip detection.
Drawings
FIG. 1 is a general flowchart of a method for detecting SOT type chip pin parameters based on a rollback tree according to the present invention;
FIG. 2 is a pin illustration schematic of a SOT23 type chip;
FIG. 3 is a binarized image of a SOT23 model chip;
FIG. 4 is a chip pin image containing numerical labels after a connected domain analysis of a SOT23 type chip; (ii) a
FIG. 5 is a flowchart of a back-off tree pin grouping algorithm;
FIG. 6 is a diagram illustrating pin grouping after initialization;
FIG. 7 is an illustration of pin groupings after initialization;
FIG. 8 is a schematic diagram of a pin group fitting straight line angle constraint;
FIG. 9 is a schematic diagram of a pin group fitting straight line range constraint;
FIG. 10 is a pin group fitting straight line residual constraint diagram;
FIG. 11 is a transformation diagram of the relationship between the foot and the root of the lead with the coordinate system;
FIG. 12 is a schematic view of the upper and lower sets of feet being angled in a straight line;
FIG. 13 is a schematic illustration of an undesirable grouping of upper and lower sets of feet;
fig. 14 is a schematic diagram of a pin identification process of a typical chip SOT 23.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict.
The first embodiment is as follows: the following describes the present embodiment with reference to fig. 1 to 14, and the method for detecting the pin parameters of the SOT-based chip based on the rollback tree in the present embodiment includes:
the method comprises the following steps: acquiring a gray level image of a pin of an SOT type chip;
step two: setting a segmentation threshold value, and segmenting the gray level image of the chip pin to obtain a chip pin binaryzation image;
step three: carrying out 8 connected domain analysis on the chip pin binary image to obtain a chip pin image containing a digital mark;
step four: designing a constraint condition of a rollback tree according to the fact that upper pins and lower pins of the SOT type chip are parallel and the number of roots and feet are the same; according to the constraint condition, dividing the pins represented by the numerical marks into an upper group of feet, a root group of feet and a lower group of feet by using a backspacing algorithm; the upper group of feet, the root group of feet and the lower group of feet are distinguished according to the positions of the chip pins relative to the chip body.
Step five: calculating according to the central position of each foot in a chip pin binary image corresponding to the digital mark to obtain a rough rotation angle of the chip, carrying out one-to-one correspondence between the root pin of the digital mark and all the foot pins by using the rough rotation angle to obtain a plurality of pin pairs comprising one foot and one corresponding root, and solving a minimum external rectangle for each pair of pin pairs to obtain the length and the width of each pin pair.
In the embodiment, the machine learning method is applied to the grouping of chip pins and the parameter detection; grayscale images of the SOT type chip pins can be acquired by a single channel black and white camera, as shown in FIG. 2. The gray level image consists of pixel values of 0-255, the segmentation threshold value can be selected according to experience or actual conditions, the pixel values of the gray level image are divided into two types, and a chip pin binaryzation image is obtained; as shown in fig. 3. In the chip pin binary image, the chip pin is made of soldering tin, so that the brightness is high, and the chip pin is more prominent than the background in the picture.
The connected component analysis technique in step three is a technique for linking together the same pixel values in a picture according to a specific rule. The 8 connected component analysis means that all regions with the same pixel value in 3 × 3 grids around the pixel can be divided into the same region. And (4) carrying out 8 connected domain analysis on the binary image to obtain a chip pin image containing the mark, as shown in fig. 4.
The rollback tree is a method for searching a proper solution in a solution space, pruning conditions can eliminate the solution space which does not meet the conditions, and the constraint conditions in the embodiment are designed according to the rule that the upper pins and the lower pins of the SOT type chip are parallel and the number of roots and feet are the same.
Further, as shown in fig. 1 and fig. 2, the present embodiment further includes:
step six: and determining the accurate rotation angle of the chip based on the position relationship among the upper group of feet, the lower group of feet and the lower group of feet by taking all the root pins corresponding to the upper group of feet in the root group as the upper group of roots and taking all the root pins corresponding to the lower group of feet as the lower group of roots.
Still further, as shown in fig. 8 to 10, the rollback tree constraint condition includes: the pin group fit straight line angle constraint is shown in fig. 8, the pin group fit straight line range constraint is shown in fig. 9, the pin group fit straight line residual constraint is shown in fig. 10, and the pin number constraint.
In the present embodiment, according to a chip pin image containing a digital mark, in the SOT type chip pin grouping problem, a certain constraint condition is designed as a "pruning" condition of a rollback tree algorithm according to chip characteristics, which is specifically as follows:
still further, as shown in fig. 8 to 10, the fitting of the included angle of the straight line by the pin group includes:
the included angle between the straight line formed by all the pins in the upper group of feet and the horizontal direction of the image is less than 30 degrees; and the included angle between the straight line formed by all the pins in the lower group of feet and the horizontal direction of the image is less than 30 degrees;
the chip is fed by a boomerang in the mounting process, the boomerang is strictly vertical to the chip mounter, and theoretical analysis and actual tests show that the rotation angle of the chip is less than 30 degrees. Therefore, the included angles between the straight line of the upper group of feet and the horizontal direction of the picture and the included angles between the straight line of the lower group of feet and the horizontal direction of the picture are all smaller than 30 degrees. In FIG. 9, the angle between the straight lines of the lower group of feet is greater than 30 degrees, which is not satisfactory, and therefore, the foot is rejected.
The pin group fitting straight line range constraints include: all the root pins are positioned between the straight line formed by the upper group of feet and the straight line formed by the lower group of feet;
the SOT type chip is a square double-row pin, so that the pins at the root part of the chip are all positioned between the straight line formed by the upper group of feet and the straight line formed by the lower group of feet. When the upper group or the lower group does not contain all the upper group feet or the lower group feet, the linear distance between other feet and the upper and lower groups of feet is smaller in consideration of the influence of image segmentation and illumination. By comparing whether the pins other than the upper and lower feet are positioned between the resulting upper and lower sets of straight lines, the result of non-compliance can be removed, resulting in "pruning", as shown in fig. 13.
The pin group fitting straight line residual error constraint comprises:
the sum of the residual errors of all the pins in the upper group of feet and the straight lines of the upper group of feet and the residual errors of all the pins in the lower group of feet and the straight lines of the lower group of feet is less than a parallel threshold value;
as can be seen from the physical structure of the SOT type chip, the upper and lower groups of pins are distributed in parallel. The sum of the residual errors of the upper and lower groups of pins and the fitting straight line is less than a certain value DIS. DIS is called parallel threshold and can be used as threshold for algorithm detection whether the chip meets the requirement. By setting the parallelism threshold, the degree of constraint of the constraint on the pin grouping can be controlled. There are two thresholds, which are the sum of the upper group of straight line residuals and the sum of the lower group of straight line residuals, respectively, as shown in fig. 10.
DIS=|r1|+|r2|+|r3|;
In the formula r1Is the minimum distance, r, of pin 1 to the fitted line2Is the minimum distance, r, from pin 2 to the fitted line3The minimum distance from pin 3 to the fitted line;
the pin number constraints include: the sum of the number of all pins in the upper group of feet and the number of all pins in the lower group of feet is equal to the number of the root pins.
Still further, referring to fig. 5, the specific method for dividing the pins represented by the numerical labels into an upper group of feet, a root group and a lower group of feet in step four includes: obtaining a first pin in the upper group of feet and a first pin in the lower group of feet by using an ergodic searching method according to the position of the pin in the chip pin binaryzation image and the extreme value of the pin position in the image; on the basis, a backspacing tree algorithm is adopted according to backspacing tree constraint conditions, and all pins are divided into an upper group of feet, a root group, a lower group of feet and an unknown group; and then, the pins in the unknown group are searched downwards one by one according to the constraint condition of the rollback tree until all the pins in the unknown group are classified into an upper group foot, a root group or a lower group foot.
In this embodiment, the pins are grouped using a fallback tree. The labels of the individual pins of the chip are obtained in step three, as well as the locations. As shown in fig. 2, the upper group of feet refers to the feet of the pins above the image, the lower group of feet refers to the feet of the pins below the image, and the roots refer to the pins near the chip body. First, initializing chip pin grouping, as shown in fig. 6, obtaining a first upper and lower group of pins of the chip by using an extreme value of a pin position in a picture, then randomly taking one of the remaining pins, adding the remaining pin into the upper foot pin, if the pin meets the requirement of a constraint condition, continuing to traverse downwards, otherwise, discarding all solutions under the branch. It was then added to the lower foot and root pins for continued testing. Until the final appropriate pin grouping is found, fig. 5 is an algorithm flow.
And step four, obtaining the grouping condition and the specific position of the pins, and obtaining the parameters of the pins by using the minimum circumscribed rectangle of each pin area.
The chip pin after the SOT type chip binaryzation can be divided into an upper group of feet, a lower group of feet and a root group. The chip is connected with the PCB board through the foot part in the mounting process, so that the pin information of the foot part is only required to be acquired. After the grouping information of the pins is obtained, the rough rotation angle information of the chip can be obtained by using the pin positions, and after the rough rotation angle information is known, the corresponding feet and the roots can be found by comparing the projection information of the pin information on the chip in the rotation direction and the orthogonal direction of the chip.
First, according to the position information of the chip pins in the picture, a first upper group foot and a first lower group foot of the chip pins can be obtained by using a traversal search method, as shown in fig. 7. After the first upper and lower feet are obtained, a rollback tree algorithm is adopted on the basis of the first upper and lower feet. The chip pins are divided into an upper group of feet, a lower group of feet, a root group, an unknown group and four parts. As shown in fig. 5, after initialization, the upper group of feet, the lower group of feet and the unknown group can be obtained by grouping. And taking out the first pin A from the unknown group, and then assuming that the first pin A is an upper group foot, deleting the first element of the unknown group to obtain a new upper group foot, a new lower group foot, a new root group and an unknown group. The new packet is passed as a parameter to a recursively called back-off tree function, which searches down. Judging whether the new grouping information meets the judgment condition or not according to the new grouping information: if the judgment condition is met, continuously taking out the first element from the unknown group for the next recursion; and if the judgment condition is not met, returning the rollback tree to the previous node to avoid searching according to the grouping. Assuming that the pin A is a lower group of feet, the unknown group deletes the first element to obtain a new upper group of feet, a new lower group of feet, a new root group and a new unknown group. And the new packet is used as a parameter and is transmitted to a recursively called rollback tree function, and downward search is carried out until a correct solution meeting the requirement can be obtained after traversal is completed.
Still further, the specific method for obtaining the length and width of the pin pair in the step five includes:
firstly, obtaining the central position of a chip by using the average value of the central positions of pins of the foot of the chip obtained by analyzing a connected domain; calculating the rough rotation angle of the chip by using the grouping information of the upper group of feet, the root group and the lower group of feet; the rough rotation angle is the average value of the included angle between the straight line of the upper group of feet and the horizontal direction of the image and the included angle between the straight line of the lower group of feet and the horizontal direction of the image; projecting all pins in the linear direction of the rough rotation angle and the orthogonal direction thereof, comparing the projection values in the two directions, further establishing the specific corresponding relation between the roots and the feet, obtaining the root corresponding to each foot, and determining the pin pairs; the length and the width of the minimum external rectangle are the length and the width of the corresponding pin pair, and the area of the minimum external rectangle is the area of the corresponding pin pair.
Still further, the method for obtaining the center position of the chip comprises the following steps:
setting n foot pins on the chip, wherein the coordinates of the n upper foot pins in a plane rectangular coordinate system are (x)1,y1)…(xn,yn) The number of the lower foot pins is m, and the coordinates of the m lower foot pins in the rectangular plane coordinate system are (x'1,y′1)…(x′m,y′m) The chip center position coordinate (x)center,ycenter) Comprises the following steps:
Figure BDA0002443209880000081
still further, the method for calculating the rough rotation angle of the chip comprises the following steps:
setting the included angle between the least square fitting straight line of the assembled foot part on the chip and the horizontal direction of the image as thetaupThe angle formed by the lower foot part is thetadownThen the chip roughly rotates by an angle thetaoriComprises the following steps:
Figure BDA0002443209880000082
still further, referring to fig. 11, the method for one-to-one correspondence between the numerically labeled root pins and all the foot pins in step five includes:
establishing a chip pixel coordinate system S according to the original direction of a chip pin binary imagepixelThe chip pixel coordinate system SpixelRotating theta along the pixel origin in the direction of the chip rotation angleoriObtaining a chip position coordinate system Sposition(ii) a Position coordinate system S of each pixel in chip pin binary imagepositionThe position in (2) is obtained by a picture matrix; chip pixel coordinate system SpixelPixel position (x, y) in chip position coordinate system SpositionThe position in (A) is (x)1,y1) Then (x)1,y1) And (x, y) are in the following transformation relationship:
Figure BDA0002443209880000091
still further, the method for obtaining the precise rotation angle of the chip in the sixth step comprises the following steps:
setting the included angle between the straight line of the upper group of feet and the horizontal edge of the image as theta1The included angle between the straight line formed by the roots of the upper group and the horizontal edge of the image is theta2The angle between the straight line of the lower group of feet and the horizontal edge of the image is theta3The included angle between the straight line of the lower group root and the horizontal edge of the image is theta4,θ1、θ2、θ3And theta4The included angle between the least square fitting straight line and the image horizontal edge is obtained by using the position of a chip pin; the precise rotation angle θ of the chip is:
Figure BDA0002443209880000092
taking the processing procedure of a typical chip SOT23 as an example, after connected domain analysis, the pin areas labeled 0-9 are obtained. After the initial grouping, the pin No. 0 is an upper foot part, the pin No. 9 is a lower foot part, the root part is empty, and the unknown group is 1-8. The pin packet is discarded. Placing pin number 1 in the upper foot section satisfies the constraints, and the remaining unknown pins continue to be grouped until all unknown pins are successfully grouped.
Although the invention herein has been described with reference to particular embodiments, it is to be understood that these embodiments are merely illustrative of the principles and applications of the present invention. It is therefore to be understood that numerous modifications may be made to the illustrative embodiments and that other arrangements may be devised without departing from the spirit and scope of the present invention as defined by the appended claims. It should be understood that features described in different dependent claims and herein may be combined in ways different from those described in the original claims. It is also to be understood that features described in connection with individual embodiments may be used in other described embodiments.

Claims (10)

1. A method for detecting SOT type chip pin parameters based on a rollback tree is characterized by comprising the following steps:
the method comprises the following steps: acquiring a gray level image of a pin of an SOT type chip;
step two: setting a segmentation threshold value, and segmenting the gray level image of the chip pin to obtain a chip pin binaryzation image;
step three: carrying out 8 connected domain analysis on the chip pin binary image to obtain a chip pin image containing a digital mark;
step four: designing a constraint condition of a rollback tree according to the fact that upper pins and lower pins of the SOT type chip are parallel and the number of roots and feet are the same; according to the constraint condition, dividing the pins represented by the numerical marks into an upper group of feet, a root group of feet and a lower group of feet by using a backspacing algorithm;
step five: calculating according to the central position of each foot in a chip pin binary image corresponding to the digital mark to obtain a rough rotation angle of the chip, carrying out one-to-one correspondence between the root pin of the digital mark and all the foot pins by using the rough rotation angle to obtain a plurality of pin pairs comprising one foot and one corresponding root, and solving a minimum external rectangle for each pair of pin pairs to obtain the length and the width of each pin pair.
2. The method of claim 1, further comprising:
step six: and determining the accurate rotation angle of the chip based on the position relationship among the upper group of feet, the lower group of feet and the lower group of feet by taking all the root pins corresponding to the upper group of feet in the root group as the upper group of roots and taking all the root pins corresponding to the lower group of feet as the lower group of roots.
3. The method for detecting SOT type chip pin parameters based on the rollback tree according to claim 1 or 2,
the rollback tree constraints include: the method comprises the following steps of pin group fitting straight line included angle constraint, pin group fitting straight line range constraint, pin group fitting straight line residual error constraint and pin number constraint.
4. The method of claim 3, wherein the SOT type chip pin parameter detection based on the rollback tree is characterized in that,
the pin group fitting straight line included angle constraint comprises:
the included angle between the straight line formed by all the pins in the upper group of feet and the horizontal direction of the image is less than 30 degrees; and the included angle between the straight line formed by all the pins in the lower group of feet and the horizontal direction of the image is less than 30 degrees;
the pin group fitting straight line range constraints include: all the root pins are positioned between the straight line formed by the upper group of feet and the straight line formed by the lower group of feet;
the pin group fitting straight line residual error constraint comprises:
the sum of the residual errors of all the pins in the upper group of feet and the straight lines of the upper group of feet and the residual errors of all the pins in the lower group of feet and the straight lines of the lower group of feet is less than a parallel threshold value;
the pin number constraints include: the sum of the number of all pins in the upper group of feet and the number of all pins in the lower group of feet is equal to the number of the root pins.
5. The method of claim 4, wherein the back-off tree based SOT type chip pin parameter detection method,
in the fourth step, the specific method for dividing the pins represented by the numerical marks into an upper group of feet, a root group and a lower group of feet comprises the following steps: obtaining a first pin in the upper group of feet and a first pin in the lower group of feet by using an ergodic searching method according to the position of the pin in the chip pin binaryzation image and the extreme value of the pin position in the image; on the basis, a backspacing tree algorithm is adopted according to backspacing tree constraint conditions, and all pins are divided into an upper group of feet, a root group, a lower group of feet and an unknown group; and then, the pins in the unknown group are searched downwards one by one according to the constraint condition of the rollback tree until all the pins in the unknown group are classified into an upper group foot, a root group or a lower group foot.
6. The method for detecting the pin parameters of the SOT type chip based on the rollback tree as claimed in claim 5, wherein the specific method for obtaining the length and width of the pin pair in the step five comprises:
firstly, obtaining the central position of a chip by using the average value of the central positions of pins of the foot of the chip obtained by analyzing a connected domain; calculating the rough rotation angle of the chip by using the grouping information of the upper group of feet, the root group and the lower group of feet; the rough rotation angle is the average value of the included angle between the straight line of the upper group of feet and the horizontal direction of the image and the included angle between the straight line of the lower group of feet and the horizontal direction of the image; projecting all pins by using the linear direction of the rough rotation angle and the orthogonal direction thereof to obtain the root corresponding to each foot, and determining a pin pair; the length and the width of the minimum external rectangle are the length and the width of the corresponding pin pair, and the area of the minimum external rectangle is the area of the corresponding pin pair.
7. The method of claim 6, wherein the SOT type chip pin parameter detection based on the rollback tree is characterized in that,
the method for obtaining the center position of the chip comprises the following steps:
setting n foot pins on the chip, wherein the coordinates of the n upper foot pins in a plane rectangular coordinate system are (x)1,y1)…(xn,yn) The number of the lower foot pins is m, and the coordinates of the m lower foot pins in the rectangular plane coordinate system are (x'1,y′1)…(x′m,y′m) The chip center position coordinate (x)center,ycenter) Comprises the following steps:
Figure FDA0002443209870000021
8. the method of claim 7, wherein the method for calculating the rough rotation angle of the chip comprises:
set the minimum of the foot on the chipThe included angle formed by the quadratic fit straight line and the horizontal direction of the image is thetaupThe angle formed by the lower foot part is thetadownThen the chip roughly rotates by an angle thetaoriComprises the following steps:
Figure FDA0002443209870000031
9. the method of claim 8, wherein the SOT type chip pin parameter detection based on the rollback tree is further characterized in that,
in the fifth step, the method for one-to-one correspondence of the root pins of the digital marks and all the foot pins comprises the following steps:
establishing a chip pixel coordinate system S according to the original direction of a chip pin binary imagepixelThe chip pixel coordinate system SpixelRotating theta along the pixel origin in the direction of the chip rotation angleoriObtaining a chip position coordinate system Sposition(ii) a Position coordinate system S of each pixel in chip pin binary imagepositionThe position in (2) is obtained by a picture matrix; chip pixel coordinate system SpixelPixel position (x, y) in chip position coordinate system SpositionThe position in (A) is (x)1,y1) Then (x)1,y1) And (x, y) are in the following transformation relationship:
Figure FDA0002443209870000032
10. the method for detecting the pin parameters of the SOT type chip based on the rollback tree as claimed in claim 9, wherein the obtaining method of the precise rotation angle of the chip in the sixth step comprises:
setting the included angle between the straight line of the upper group of feet and the horizontal edge of the image as theta1The included angle between the straight line formed by the roots of the upper group and the horizontal edge of the image is theta2The angle between the straight line of the lower group of feet and the horizontal edge of the image is theta3The lower set of roots being in line with the horizontal edge of the imageAngle of theta4,θ1、θ2、θ3And theta4The included angle between the least square fitting straight line and the image horizontal edge is obtained by using the position of a chip pin; the precise rotation angle θ of the chip is:
Figure FDA0002443209870000033
CN202010271193.XA 2020-04-08 2020-04-08 SOT type chip pin parameter detection method based on rollback tree Active CN111553885B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010271193.XA CN111553885B (en) 2020-04-08 2020-04-08 SOT type chip pin parameter detection method based on rollback tree

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010271193.XA CN111553885B (en) 2020-04-08 2020-04-08 SOT type chip pin parameter detection method based on rollback tree

Publications (2)

Publication Number Publication Date
CN111553885A true CN111553885A (en) 2020-08-18
CN111553885B CN111553885B (en) 2021-07-06

Family

ID=72003868

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010271193.XA Active CN111553885B (en) 2020-04-08 2020-04-08 SOT type chip pin parameter detection method based on rollback tree

Country Status (1)

Country Link
CN (1) CN111553885B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117523577A (en) * 2023-11-22 2024-02-06 粤港澳大湾区(广东)国创中心 Pin name upper scribing detection method and equipment based on longest horizontal straight line

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104359402A (en) * 2014-11-17 2015-02-18 南京工业大学 Detection method for rectangular pin component visual positioning
CN104915963A (en) * 2015-06-25 2015-09-16 哈尔滨工业大学 Detection and positioning method for PLCC component
CN104990926A (en) * 2015-06-25 2015-10-21 哈尔滨工业大学 TR element locating and defect detecting method based on vision

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104359402A (en) * 2014-11-17 2015-02-18 南京工业大学 Detection method for rectangular pin component visual positioning
CN104915963A (en) * 2015-06-25 2015-09-16 哈尔滨工业大学 Detection and positioning method for PLCC component
CN104990926A (en) * 2015-06-25 2015-10-21 哈尔滨工业大学 TR element locating and defect detecting method based on vision

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
BOXUAN HAN等: "A Template Matching Based Method for Surface-", 《2018 EIGHTH INTERNATIONAL CONFERENCE ON INSTRUMENTATION AND MEASUREMENT, COMPUTER, COMMUNICATION AND》 *
ROBERTO J等: "An optimal backtrack algorithm for tree-structured constraint satisfaction problem", 《ARTIFICIAL INTELLIGENCE》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117523577A (en) * 2023-11-22 2024-02-06 粤港澳大湾区(广东)国创中心 Pin name upper scribing detection method and equipment based on longest horizontal straight line

Also Published As

Publication number Publication date
CN111553885B (en) 2021-07-06

Similar Documents

Publication Publication Date Title
US9965847B2 (en) Multi-type BGA chip visual recognition method using line based clustering
US6396942B1 (en) Method and apparatus for locating ball grid array packages from two-dimensional image data
CN109839385B (en) Self-adaptive PCB defect visual positioning detection and classification system
CN105184770B (en) A kind of soldered ball positioning and its parameter identification method for ball grid array pin chip
CN103745475A (en) Detection and positioning method used for spherical pin element
CN112489002B (en) Defect detection method, device, equipment and storage medium
CN109325381B (en) QR code positioning and correcting method
CN114152627B (en) Chip circuit defect detection method and device, electronic equipment and storage medium
CN104990926A (en) TR element locating and defect detecting method based on vision
CN107909613A (en) A kind of rectangular pins element localization method based on vertex
US10416578B2 (en) Substrate pre-alignment method
CN110738216A (en) Medicine identification method based on improved SURF algorithm
CN111695373B (en) Zebra stripes positioning method, system, medium and equipment
CN111553885B (en) SOT type chip pin parameter detection method based on rollback tree
Liu et al. A novel industrial chip parameters identification method based on cascaded region segmentation for surface-mount equipment
CN110415296A (en) A kind of localization method having rectangular-shaped electrical part under shade illumination
CN115775246A (en) Method for detecting defects of PCB (printed circuit board) components
CN109785324B (en) Large-format PCB positioning method
CN112419225A (en) SOP type chip detection method and system based on pin segmentation
CN110765993B (en) SEM graph measuring method based on AI algorithm
US20030185432A1 (en) Method and system for image registration based on hierarchical object modeling
CN113128247A (en) Image positioning identification verification method and server
CN111814619A (en) Method for acquiring scale value of house type graph
CN107527843B (en) Method and system for realizing wafer laser identification process based on computer aided design
CN117392211B (en) BGA element rapid identification positioning method and system and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant