CN104915963A - Detection and positioning method for PLCC component - Google Patents

Detection and positioning method for PLCC component Download PDF

Info

Publication number
CN104915963A
CN104915963A CN201510358047.XA CN201510358047A CN104915963A CN 104915963 A CN104915963 A CN 104915963A CN 201510358047 A CN201510358047 A CN 201510358047A CN 104915963 A CN104915963 A CN 104915963A
Authority
CN
China
Prior art keywords
pin
profile
rotation
anglec
rectangle
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
CN201510358047.XA
Other languages
Chinese (zh)
Other versions
CN104915963B (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.)
Ningbo Intelligent Equipment Research Institute Co., Ltd.
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 CN201510358047.XA priority Critical patent/CN104915963B/en
Publication of CN104915963A publication Critical patent/CN104915963A/en
Application granted granted Critical
Publication of CN104915963B publication Critical patent/CN104915963B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10052Images from lightfield camera
    • 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)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to a detection and positioning method for a PLCC component, which solves a problem that the positioning precision of a component is seriously affected by the accuracy in acquiring pin regions through carrying out rotation correction and segmentation on an image and acquiring the center of each pin region because an algorithm at present is poor in precision and robustness. The detection and positioning method comprises the steps of acquiring a component image; carrying out threshold segmentation, judging whether the number of non-zero pixel points reaches corresponding multiple of the total number of pixels or not; acquiring an adaptive binarization image; extracting all outlines; filtering interference outlines; acquiring a least square ellipse of the pin outlines; acquiring the moment of the pin outlines; dividing the pin outlines into four categories of pin outlines; corresponding the four categories of pin outlines to actual pin groups respectively; calculating an average value of center coordinates of the four pin groups; judging whether the pin outlines in the pin groups at the opposite sides are identical in number or not; acquiring a minimum enclosing rectangle of the pin outlines; and fitting a rectangle according to a mass center of each pin outline. The detection and positioning method provided by the invention is applied to the field of visual detection.

Description

A kind of detection & localization method for PLCC element
Technical field
The present invention relates to a kind of detection & localization method for PLCC element.
Background technology
Machine Vision Detection is more and more ripe in the application of surface mounting technology (SMT), and in attachment process, the accurate location of element and integrity degree detect the efficiency that govern whole piece SMT production line.
PLCC is a kind of four side pin flat package, its pin is drawn from four sides of element, in T-shaped, when accepting forward illumination, in image, the geometric shape feature of component body and its pin portions shows as comparatively complete rectangle, and the target of detection algorithm is extract to describe the rectangle of element pose and the little rectangle of each pinout information from part drawing picture.Current existing algorithm, mainly rotation correction is carried out to element and then segmentation obtains each pin field, adopt least square fitting to go out after obtaining the center of pin field location that four straight lines realize element, recycling normal data carries out feature detection to pin.This arithmetic accuracy and robustness poor, need to rely on the detection that prior imformation could realize pinout information, accurately can not correspond to the call number of defect pin, image rotation be corrected and splits the positioning precision that the accuracy obtaining pin field and obtain pin field center can have a strong impact on element.
Summary of the invention
The present invention be in order to solve current arithmetic accuracy and robustness poor, need to rely on prior imformation and could realize the detection of pinout information, accuracy that segmentation obtains pin field and obtain pin field center is corrected to image rotation and can have a strong impact on the positioning precision of element and a kind of detection & localization method for PLCC element of proposing.
For a detection & localization method for PLCC element, realize according to the following steps:
Step one: adopt optical lighting system to obtain PLCC part drawing picture;
Step 2: select fixed threshold to carry out Threshold segmentation to the PLCC part drawing picture that step one obtains, obtains the pretreated image of binaryzation and the number of non-zero pixels point in image after calculating binaryzation pre-service;
Step 3: whether the number of the non-zero pixels point that determining step two obtains reaches 0.1 ~ 0.9 times of PLCC element total number of image pixels, if so, continues to perform step 4, otherwise terminates this element testing process, return corresponding error code;
Step 4: adopt maximum variance between clusters to obtain self-adaption binaryzation image to the PLCC part drawing picture of step one, adopt again size be 5 × 5 rectangle in check self-adaption binaryzation image and carry out morphology and open operation, noise spot set less in filtering self-adaption binaryzation image, the morphology obtained opens application drawing picture; Wherein, it is first carry out etching operation to self-adaption binaryzation image with the rectangle kernel that size is 5 × 5 that described morphology opens operation, then by size be 5 × 5 rectangle in check the image after corrosion and carry out expansive working;
Step 5: the morphology obtained step 4 is opened application drawing picture and adopted connected component labeling algorithm to extract all profiles, obtains the minimum enclosed rectangle that each profile is corresponding, calculates the area of each profile and minimum enclosed rectangle thereof;
Step 6: the interference profile in filtering non-pinned region;
Step 7: the least square ellipse obtaining pin profile; Wherein, the anglec of rotation of described least square ellipse is the angle of transverse and Y-axis, and wherein coordinate system presses image procossing convention, with the image upper left corner for initial point, is to the right X-axis positive dirction, is Y-axis positive dirction downwards; There is following relational expression in the anglec of rotation of pin and the anglec of rotation of least square ellipse:
θ=90°-ψ
Wherein θ is the anglec of rotation of pin profile, and ψ is the anglec of rotation of least square ellipse, obtains the anglec of rotation of pin profile according to upper formula;
Step 8: the square calculating pin profile, the profile center-of-mass coordinate obtained according to first moment is as the centre coordinate of pin profile; For two-dimensional digital image, f (x, y) is pixel corresponding to (x, y) some place, wherein (p+q) rank square m p,qbe defined as:
m p , q = Σ x Σ y x p y q f ( x , y )
This two-dimensional digital image barycenter (x 0, y 0) computing formula be:
Wherein m p,qrepresent (p+q) rank square of image, (x 0, y 0) be the centre coordinate of pin profile;
Step 9: adopt clustering algorithm PLCC component pin to be divided into four class pin profiles, correspond to four, upper and lower, left and right pin set respectively, and check that whether cluster result is correct, if, continue to perform step 10, otherwise terminate this element testing process, return corresponding error code;
Step 10: four class pin profiles step 9 obtained correspond in actual pin set respectively, first the pin set defined on the right side of PLCC element is the first pin set, counterclockwise definition the second pin set, the 3rd pin set and the 4th pin set; Angle according to the opposite side two class pin profile line of centres and X-axis judges, with X-axis angle little be the first pin set and the 3rd pin set, judge according to the centre coordinate X value size of this two classes pin profile again, X value the greater is the first pin set, X value smaller is the 3rd pin set, in like manner judges the second pin set and the 4th pin set;
Step 11: calculate the mean value of four pin set centre coordinates as rough element central coordinate, in each pin set, according to the line angular dimension of pin profile center and rough element central, pin profile in each pin set is sorted, obtain call number index [i] [j] of each pin profile in element, represent a jth pin profile of i-th group;
Step 12: judge that whether the number of pin profile in opposite side pin set is identical, if so, continues to perform next step, otherwise terminates this element testing process, return corresponding error code;
Step 13: obtain the minimum enclosed rectangle that the rear each pin profile of sequence is corresponding, its length and width correspond to length and the width of component pin respectively, calculate its mean value as examination criteria value, be i-th spacing between pin and (i+1) individual pin, wherein (x i+1, y i+1) be the centre coordinate of the i-th+1 pin minimum enclosed rectangle, (x i, y i) be the centre coordinate of i-th pin minimum enclosed rectangle, calculate its mean value as examination criteria value, judge the length of each pin, width and spacing whether in standard value range of allowable error, if, continue to perform step 14, otherwise terminate this element testing process, return corresponding error code;
Step 14: according to barycenter matching rectangle of each pin profile after sequence, realize the accurate location of PLCC element, export center and the anglec of rotation of this rectangle, correspond to center and the anglec of rotation of element respectively, detection & localization process terminates.
Invention effect
The present invention does not rely on the detection & localization that prior imformation can realize PLCC element; The pin profile obtained connected component labeling carries out multistep screening can guarantee filtering interfering profile, improves the accuracy of cluster, guarantees the reliability of cluster result; The anglec of rotation of least square ellipse is adopted to obtain the anglec of rotation of pin profile and adopt pin profile barycenter as cluster standard, the pin set of twice cluster to four limits is classified, again the pin in each pin set is sorted, and define the first pin set, accurately can detect that mistake appears in which pin, adds the accuracy of detection.Adopt the least square method improved according to the pin profile barycenter fitting a straight line in each pin set, more accurately simulate the rectangle representing position of components according to the relation between four straight lines, realize the accurate location to element, make the precision of algorithm bring up to 90%.
Accompanying drawing explanation
Fig. 1 is process flow diagram of the present invention;
Fig. 2 is PLCC element original image;
Fig. 3 is the image in embodiment one after maximum variance between clusters binaryzation;
Fig. 4 is that in embodiment one, morphology opens the binary image after operation;
Fig. 5 is the pin contour images that in embodiment one, connected component labeling method obtains;
Fig. 6 is the least square ellipse image of pin profile in embodiment one;
Fig. 7 is the minimum enclosed rectangle image of pin profile after each pin set sequence in embodiment one;
Fig. 8 is the rectangular image that in embodiment one, pin profile barycenter simulates.
Embodiment
Embodiment one: a kind of detection & localization method for PLCC element of present embodiment, realizes: step one according to the following steps: adopt optical lighting system to obtain PLCC part drawing picture;
Step 2: select fixed threshold to carry out Threshold segmentation to the PLCC part drawing picture that step one obtains, obtains the pretreated image of binaryzation and the number of non-zero pixels point in image after calculating binaryzation pre-service;
Step 3: whether the number of the non-zero pixels point that determining step two obtains reaches 0.1 ~ 0.9 times of PLCC element total number of image pixels, if so, continues to perform step 4, otherwise terminates this element testing process, return corresponding error code;
Step 4: adopt maximum variance between clusters to obtain self-adaption binaryzation image to the PLCC part drawing picture of step one, adopt again size be 5 × 5 rectangle in check self-adaption binaryzation image and carry out morphology and open operation, noise spot set less in filtering self-adaption binaryzation image, the morphology obtained opens application drawing picture; Wherein, it is first carry out etching operation to self-adaption binaryzation image with the rectangle kernel that size is 5 × 5 that described morphology opens operation, then by size be 5 × 5 rectangle in check the image after corrosion and carry out expansive working;
Step 5: the morphology obtained step 4 is opened application drawing picture and adopted connected component labeling algorithm to extract all profiles, obtains the minimum enclosed rectangle that each profile is corresponding, calculates the area of each profile and minimum enclosed rectangle thereof;
Step 6: adopt the method for cluster to distinguish component pin group, the interference profile in filtering non-pinned region before cluster operation must be guaranteed;
Step 7: the least square ellipse obtaining pin profile; Wherein, the anglec of rotation of described least square ellipse is the angle of transverse and Y-axis, and wherein coordinate system presses image procossing convention, with the image upper left corner for initial point, is to the right X-axis positive dirction, is Y-axis positive dirction downwards; There is following relational expression in the anglec of rotation of pin and the anglec of rotation of least square ellipse:
θ=90°-ψ
Wherein θ is the anglec of rotation of pin profile, and ψ is the anglec of rotation of least square ellipse, obtains the anglec of rotation of pin profile according to upper formula;
Step 8: the square calculating pin profile, the profile center-of-mass coordinate obtained according to first moment is as the centre coordinate of pin profile; For two-dimensional digital image, f (x, y) is pixel corresponding to (x, y) some place, wherein (p+q) rank square m p,qbe defined as:
m p , q = Σ x Σ y x p y q f ( x , y )
This two-dimensional digital image barycenter (x 0, y 0) computing formula be:
Wherein m p,qrepresent (p+q) rank square of image, (x 0, y 0) be the centre coordinate of pin profile;
Step 9: adopt clustering algorithm PLCC component pin to be divided into four class pin profiles, correspond to four, upper and lower, left and right pin set respectively, and check that whether cluster result is correct, if, continue to perform step 10, otherwise terminate this element testing process, return corresponding error code;
Step 10: four class pin profiles step 9 obtained correspond in actual pin set respectively, first the pin set defined on the right side of PLCC element is the first pin set, counterclockwise definition the second pin set, the 3rd pin set and the 4th pin set; Angle according to the opposite side two class pin profile line of centres and X-axis judges, with X-axis angle little be the first pin set and the 3rd pin set, judge according to the centre coordinate X value size of this two classes pin profile again, X value the greater is the first pin set, X value smaller is the 3rd pin set, in like manner judges the second pin set and the 4th pin set;
Step 11: calculate the mean value of four pin set centre coordinates as rough element central coordinate, in each pin set, according to the line angular dimension of pin profile center and rough element central, pin profile in each pin set is sorted, obtain call number index [i] [j] of each pin profile in element, represent a jth pin profile of i-th group;
Step 12: judge that whether the number of pin profile in opposite side pin set is identical, if so, continues to perform next step, otherwise terminates this element testing process, return corresponding error code;
Step 13: obtain the minimum enclosed rectangle that the rear each pin profile of sequence is corresponding, its length and width correspond to length and the width of component pin respectively, calculate its mean value as examination criteria value, be i-th spacing between pin and (i+1) individual pin, wherein (x i+1, y i+1) be the centre coordinate of the i-th+1 pin minimum enclosed rectangle, (x i, y i) be the centre coordinate of i-th pin minimum enclosed rectangle, calculate its mean value as examination criteria value, judge the length of each pin, width and spacing whether in standard value range of allowable error, if, continue to perform step 14, otherwise terminate this element testing process, return corresponding error code;
Step 14: according to barycenter matching rectangle of each pin profile after sequence, realize the accurate location of PLCC element, export center and the anglec of rotation of this rectangle, correspond to center and the anglec of rotation of element respectively, detection & localization process terminates.Embodiment two: present embodiment and embodiment one are unlike the interference profile in step 6 filtering non-pinned region, and detailed process is as follows:
(1) carry out first time screening according to the rectangular degree of profile: judge whether the ratio of contour area and its minimum enclosed rectangle area is greater than 0.5, if so, then retain this profile and corresponding minimum enclosed rectangle, otherwise delete;
(2) programmed screening is carried out according to the Aspect Ratio of minimum enclosed rectangle: the mean value calculating the minimum enclosed rectangle Aspect Ratio that previous step retains, judge that whether the Aspect Ratio of the minimum enclosed rectangle that first time screening rear profile is corresponding is at [0.6 of mean value, 1.4] times, if, then retain the profile that this minimum enclosed rectangle is corresponding, otherwise delete;
(3) third time screening is carried out according to the area of profile: the area average calculating the profile that previous step retains, after judging programmed screening, whether the area of each profile is at [0.8 of mean profile area, 1.2] times, if, then delete this profile, otherwise retain as pin profile.
Other step and parameter identical with embodiment one.
Embodiment three: present embodiment and embodiment one or two unlike: step 9 concrete steps are as follows:
(1) rotation angle range of pin profile is [-90 °, 90 °], wherein-90 ° represent identical sense of rotation with 90 °, the anglec of rotation of pin profile and the difference of the first pin profile anglec of rotation is adopted to input as first time cluster sample, similar according to the anglec of rotation of opposite side pin set, nearly 90 ° of the anglec of rotation difference of adjacent leads group, pin profile is divided into two classes, obtain the average anglec of rotation of each class and average centre coordinate, judge that whether the absolute value of the average anglec of rotation difference of classification one and classification two is at [85 °, 95 °] in, if, then judge whether the mean center coordinate of classification one and classification two differs and be less than ten small pixel, , if, continue to perform next step, otherwise terminate this element testing process, return corresponding error code,
(2) according to the position at pin profile center, two subclasses are further subdivided into each class profile that previous step cluster obtains: the profile first dividing classification one correspondence, a unique straight line is determined by the average anglec of rotation of classification two and average centre coordinate, the centre coordinate of profile in classification one is substituted into this straight-line equation, and computing method are as follows:
Wherein (x 0, i, y 0, i) be the centre coordinate of i-th profile in classification one, θ 0for the average anglec of rotation of profile in classification one, (x 1, y 1) be the mean center coordinate of profile in classification two, θ 1for the average anglec of rotation of profile in classification two, profile in classification one is divided into two subclasses by the positive negativity obtaining △ according to above computing method, correspond to call number index0, index2 or index1, index3 respectively, the algorithm principle dividing classification two is identical with upper, pin profile is divided into four class index0, index2 and index1, index3 the most at last, as four pin set of element;
(3) calculate the centre coordinate that previous step obtains four class pin profiles respectively, calculate σ according to following formula:
σ = a r c c o s ( ( x 0 - x 2 ) ( x 3 - x 1 ) + ( y 0 - y 2 ) ( y 3 - y 1 ) ( x 0 - x 2 ) 2 + ( y 0 - y 2 ) 2 ( x 3 - x 1 ) 2 + ( y 3 - y 1 ) 2 )
Wherein (x 0, y 0) be the centre coordinate of the i-th ndex0 class pin profile, (x 1, y 1) be the centre coordinate of the i-th ndex1 class pin profile, (x 2, y 2) be the centre coordinate of the i-th ndex2 class pin profile, (x 3, y 3) be the centre coordinate of the i-th ndex3 class pin profile, uniquely straight line is determined by the i-th ndex0 class pin profile center, the i-th ndex2 class pin profile center, another straight line is uniquely determined by the i-th ndex1 class pin profile center, the i-th ndex3 class pin profile center, judge that whether the absolute value σ of two included angle of straight line is at [85 °, 95 °] in scope, if so, continue to perform next step, otherwise terminate this element testing process, return corresponding error code.
Other step and parameter identical with embodiment one or two.
Embodiment four: one of present embodiment and embodiment one to three unlike: the detailed process of step 14 rectangle fitting is as follows:
(1) traditional least squares line fitting method is improved, simulates straight line equation according to the barycenter of pin profile in each pin set:
c + n 1 x + n 2 y = 0 , n 1 2 + n 2 2 = 1
Wherein (n 1, n 2) be unit orthogonal vector, c is any one constant;
Match point coordinate is substituted into this straight-line equation:
r=c+n 1x ij+n 2y ij
Wherein (x ij, y ij) be the center-of-mass coordinate of a jth pin profile in rear i-th pin set of sequence;
Then | r| represents the distance of pin profile barycenter to this fitting a straight line, calculates satisfied straight line parameter is as best straight line matching;
(2) be a rectangle due to what finally need matching, according to the characteristic that the parallel adjacent side of the opposite side of rectangle is orthogonal, simulate four following straight-line equations:
c 1+n 1x+n 2y=0
c 2+n 2x+n1y=0
c 3+n 1x+n 2y=0
c 4-n 2x+n 1y=0
n 1 2 + n 2 2 = 1
Calculate satisfied after the pin profile barycenter of each pin set is substituted into above formula straight line parameter, a closed rectangle can be surrounded by these four straight lines, realize the accurate location to element; Wherein, described c 1c 2c 3c 4represent four constants, (n 1, n 2) be unit orthogonal vector.
Other step and parameter identical with one of embodiment one to three.

Claims (4)

1., for a detection & localization method for PLCC element, it is characterized in that realizing according to the following steps:
Step one: adopt optical lighting system to obtain PLCC part drawing picture;
Step 2: select fixed threshold to carry out Threshold segmentation to the PLCC part drawing picture that step one obtains, obtains the pretreated image of binaryzation and the number of non-zero pixels point in image after calculating binaryzation pre-service;
Step 3: whether the number of the non-zero pixels point that determining step two obtains reaches 0.1 ~ 0.9 times of PLCC element total number of image pixels, if so, continues to perform step 4, otherwise terminates this element testing process, return corresponding error code;
Step 4: adopt maximum variance between clusters to obtain self-adaption binaryzation image to the PLCC part drawing picture of step one, adopt again size be 5 × 5 rectangle in check self-adaption binaryzation image and carry out morphology and open operation, noise spot set less in filtering self-adaption binaryzation image, the morphology obtained opens application drawing picture; Wherein, it is first carry out etching operation to self-adaption binaryzation image with the rectangle kernel that size is 5 × 5 that described morphology opens operation, then by size be 5 × 5 rectangle in check the image after corrosion and carry out expansive working;
Step 5: the morphology obtained step 4 is opened application drawing picture and adopted connected component labeling algorithm to extract all profiles, obtains the minimum enclosed rectangle that each profile is corresponding, calculates the area of each profile and minimum enclosed rectangle thereof;
Step 6: the interference profile in filtering non-pinned region;
Step 7: the least square ellipse obtaining pin profile; Wherein, the anglec of rotation of described least square ellipse is the angle of transverse and Y-axis, and wherein coordinate system presses image procossing convention, with the image upper left corner for initial point, is to the right X-axis positive dirction, is Y-axis positive dirction downwards; There is following relational expression in the anglec of rotation of pin and the anglec of rotation of least square ellipse:
θ=90°-ψ
Wherein θ is the anglec of rotation of pin profile, and ψ is the anglec of rotation of least square ellipse, obtains the anglec of rotation of pin profile according to upper formula;
Step 8: the square calculating pin profile, the profile center-of-mass coordinate obtained according to first moment is as the centre coordinate of pin profile; For two-dimensional digital image, f (x, y) is pixel corresponding to (x, y) some place, wherein (p+q) rank square m p,qbe defined as:
m p , q = Σ x Σ y x p y q f ( x , y )
This two-dimensional digital image barycenter (x 0, y 0) computing formula be:
Wherein m p,qrepresent (p+q) rank square of image, (x 0, y 0) be the centre coordinate of pin profile;
Step 9: adopt clustering algorithm PLCC component pin to be divided into four class pin profiles, correspond to four, upper and lower, left and right pin set respectively, and check that whether cluster result is correct, if, continue to perform step 10, otherwise terminate this element testing process, return corresponding error code;
Step 10: four class pin profiles step 9 obtained correspond in actual pin set respectively, first the pin set defined on the right side of PLCC element is the first pin set, counterclockwise definition the second pin set, the 3rd pin set and the 4th pin set; Angle according to the opposite side two class pin profile line of centres and X-axis judges, with X-axis angle little be the first pin set and the 3rd pin set, judge according to the centre coordinate X value size of this two classes pin profile again, X value the greater is the first pin set, X value smaller is the 3rd pin set, in like manner judges the second pin set and the 4th pin set;
Step 11: calculate the mean value of four pin set centre coordinates as rough element central coordinate, in each pin set, according to the line angular dimension of pin profile center and rough element central, pin profile in each pin set is sorted, obtain call number index [i] [j] of each pin profile in element, represent a jth pin profile of i-th group;
Step 12: judge that whether the number of pin profile in opposite side pin set is identical, if so, continues to perform next step, otherwise terminates this element testing process, return corresponding error code;
Step 13: obtain the minimum enclosed rectangle that the rear each pin profile of sequence is corresponding, its length and width correspond to length and the width of component pin respectively, calculate its mean value as examination criteria value, be i-th spacing between pin and (i+1) individual pin, wherein (x i+1, y i+1) be the centre coordinate of the i-th+1 pin minimum enclosed rectangle, (x i, y i) be the centre coordinate of i-th pin minimum enclosed rectangle, calculate its mean value as examination criteria value, judge the length of each pin, width and spacing whether in standard value range of allowable error, if, continue to perform step 14, otherwise terminate this element testing process, return corresponding error code;
Step 14: according to barycenter matching rectangle of each pin profile after sequence, realize the accurate location of PLCC element, export center and the anglec of rotation of this rectangle, correspond to center and the anglec of rotation of element respectively, detection & localization process terminates.
2. a kind of detection & localization method for PLCC element according to claim 1, it is characterized in that the interference profile in step 6 filtering non-pinned region, detailed process is as follows:
(1) carry out first time screening according to the rectangular degree of profile: judge whether the ratio of contour area and its minimum enclosed rectangle area is greater than 0.5, if so, then retain this profile and corresponding minimum enclosed rectangle, otherwise delete;
(2) programmed screening is carried out according to the Aspect Ratio of minimum enclosed rectangle: the mean value calculating the minimum enclosed rectangle Aspect Ratio that previous step retains, judge that whether the Aspect Ratio of the minimum enclosed rectangle that first time screening rear profile is corresponding is at [0.6 of mean value, 1.4] times, if, then retain the profile that this minimum enclosed rectangle is corresponding, otherwise delete;
(3) third time screening is carried out according to the area of profile: the area average calculating the profile that previous step retains, after judging programmed screening, whether the area of each profile is at [0.8 of mean profile area, 1.2] times, if, then delete this profile, otherwise retain as pin profile.
3. a kind of detection & localization method for PLCC element according to claim 2, is characterized in that step 9 concrete steps are as follows:
(1) rotation angle range of pin profile is [-90 °, 90 °], wherein-90 ° represent identical sense of rotation with 90 °, the anglec of rotation of pin profile and the difference of the first pin profile anglec of rotation is adopted to input as first time cluster sample, similar according to the anglec of rotation of opposite side pin set, nearly 90 ° of the anglec of rotation difference of adjacent leads group, pin profile is divided into two classes, obtain the average anglec of rotation of each class and average centre coordinate, judge that whether the absolute value of the average anglec of rotation difference of classification one and classification two is at [85 °, 95 °] in, if, then judge whether the mean center coordinate of classification one and classification two differs and be less than ten small pixel, , if, continue to perform next step, otherwise terminate this element testing process, return corresponding error code,
(2) according to the position at pin profile center, two subclasses are further subdivided into each class profile that previous step cluster obtains: the profile first dividing classification one correspondence, a unique straight line is determined by the average anglec of rotation of classification two and average centre coordinate, the centre coordinate of profile in classification one is substituted into this straight-line equation, and computing method are as follows:
Wherein (x 0, i, y 0, i) be the centre coordinate of i-th profile in classification one, θ 0for the average anglec of rotation of profile in classification one, (x 1, y 1) be the mean center coordinate of profile in classification two, θ 1for the average anglec of rotation of profile in classification two, profile in classification one is divided into two subclasses by the positive negativity obtaining △ according to above computing method, correspond to call number index0, index2 or index1, index3 respectively, the algorithm principle dividing classification two is identical with upper, pin profile is divided into four class index0, index2 and index1, index3 the most at last, as four pin set of element;
(3) calculate the centre coordinate that previous step obtains four class pin profiles respectively, calculate σ according to following formula:
σ = a r c c o s ( ( x 0 - x 2 ) ( x 3 - x 1 ) + ( y 0 - y 2 ) ( y 3 - y 1 ) ( x 0 - x 2 ) 2 + ( y 0 - y 2 ) 2 ( x 3 - x 1 ) 2 + ( y 3 - y 1 ) 2 )
Wherein (x 0, y 0) be the centre coordinate of the i-th ndex0 class pin profile, (x 1, y 1) be the centre coordinate of the i-th ndex1 class pin profile, (x 2, y 2) be the centre coordinate of the i-th ndex2 class pin profile, (x 3, y 3) be the centre coordinate of the i-th ndex3 class pin profile, uniquely straight line is determined by the i-th ndex0 class pin profile center, the i-th ndex2 class pin profile center, another straight line is uniquely determined by the i-th ndex1 class pin profile center, the i-th ndex3 class pin profile center, judge that whether the absolute value σ of two included angle of straight line is at [85 °, 95 °] in scope, if so, continue to perform next step, otherwise terminate this element testing process, return corresponding error code.
4. a kind of detection & localization method for PLCC element according to claim 3, is characterized in that the detailed process of step 14 rectangle fitting is as follows:
(1) traditional least squares line fitting method is improved, simulates straight line equation according to the barycenter of pin profile in each pin set:
c+n 1x+n 2y=0,
Wherein (n 1, n 2) be unit orthogonal vector, c is any one constant;
Match point coordinate is substituted into this straight-line equation:
r=c+n 1x ij+n 2y ij
Wherein (x ij, y ij) be the center-of-mass coordinate of a jth pin profile in rear i-th pin set of sequence;
Then | r| represents the distance of pin profile barycenter to this fitting a straight line, calculates satisfied straight line parameter is as best straight line matching;
(2) be a rectangle due to what finally need matching, according to the characteristic that the parallel adjacent side of the opposite side of rectangle is orthogonal, simulate four following straight-line equations:
c 1+n 1x+n 2y=0
c 2+n 2x+n 1y=0
c 3+n 1x+n 2y=0
c 4-n 2x+n 1y=0
n 1 2 + n 2 2 = 1
Calculate satisfied after the pin profile barycenter of each pin set is substituted into above formula | r | | = Σ j = 1 n r j 2 = m i n Straight line parameter, a closed rectangle can be surrounded by these four straight lines, realize the accurate location to element; Wherein, described c 1c 2c 3c 4represent four constants, (n 1, n 2) be unit orthogonal vector.
CN201510358047.XA 2015-06-25 2015-06-25 A kind of detection and localization method for PLCC elements Active CN104915963B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510358047.XA CN104915963B (en) 2015-06-25 2015-06-25 A kind of detection and localization method for PLCC elements

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510358047.XA CN104915963B (en) 2015-06-25 2015-06-25 A kind of detection and localization method for PLCC elements

Publications (2)

Publication Number Publication Date
CN104915963A true CN104915963A (en) 2015-09-16
CN104915963B CN104915963B (en) 2017-11-03

Family

ID=54085001

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510358047.XA Active CN104915963B (en) 2015-06-25 2015-06-25 A kind of detection and localization method for PLCC elements

Country Status (1)

Country Link
CN (1) CN104915963B (en)

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107220938A (en) * 2016-03-21 2017-09-29 深圳市燕麦科技股份有限公司 The computational methods and device of a kind of image block anglec of rotation
CN107314742A (en) * 2017-05-31 2017-11-03 合肥工业大学 A kind of rotary optical chromatographic imaging system and imaging method
CN107478152A (en) * 2017-08-11 2017-12-15 哈尔滨工业大学 TR chip positionings method and detection method
CN109712137A (en) * 2018-12-29 2019-05-03 英特尔产品(成都)有限公司 Chip test base detection based on image procossing
CN110110697A (en) * 2019-05-17 2019-08-09 山东省计算中心(国家超级计算济南中心) More fingerprint segmentation extracting methods, system, equipment and medium based on direction correction
CN110544276A (en) * 2019-08-19 2019-12-06 西安交通大学 Least square method ellipse fitting piston skirt maximum point size measurement method
CN111095296A (en) * 2017-09-14 2020-05-01 雪佛龙美国公司 Classifying character strings using machine learning
CN111445511A (en) * 2020-03-24 2020-07-24 杭州东信北邮信息技术有限公司 Method for detecting circle in image
CN111553885A (en) * 2020-04-08 2020-08-18 哈尔滨工业大学 SOT type chip pin parameter detection method based on rollback tree
CN112307136A (en) * 2020-11-25 2021-02-02 上海望友信息科技有限公司 Component and package query method and computer readable storage medium
CN112419224A (en) * 2020-07-17 2021-02-26 宁波智能装备研究院有限公司 Spherical pin chip positioning method and system
CN112580663A (en) * 2020-12-09 2021-03-30 山东志盈医学科技有限公司 Method and apparatus for coverslip boundary removal in digital slide scanner
CN113096123A (en) * 2021-05-07 2021-07-09 湘潭大学 Multi-fuzzy reasoning cascaded primer side defect classification and damage degree analysis method
CN114152200A (en) * 2022-02-07 2022-03-08 北京航空航天大学杭州创新研究院 Chip pin measuring method and device
CN114266748A (en) * 2021-12-22 2022-04-01 四川艾德瑞电气有限公司 Method and device for judging integrity of surface of process plate in rail transit maintenance field
CN114372984A (en) * 2022-03-22 2022-04-19 南京熊猫电子制造有限公司 Super-resolution component angle identification device and method
CN114943710A (en) * 2022-05-27 2022-08-26 华南理工大学 Method for positioning circle center of thin-wall circular tube part by using improved least square fitting
CN115019024A (en) * 2022-04-29 2022-09-06 苏州市路远智能装备有限公司 Visual identification method of QFP (quad Flat Package)
CN116412779A (en) * 2023-06-12 2023-07-11 南京中旭电子科技有限公司 Processing method and device for Hall sensor package

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003058515A1 (en) * 2001-12-28 2003-07-17 Electro Scientific Industries, Inc. Method for automatically defining a part model
CN102829735A (en) * 2012-08-31 2012-12-19 哈尔滨工业大学 Machine vision based detection method of defect of geometrical shape of back surface of E type magnet
CN103729655A (en) * 2014-01-22 2014-04-16 哈尔滨工业大学 Detection method for sheet element visual positioning
CN103745475A (en) * 2014-01-22 2014-04-23 哈尔滨工业大学 Detection and positioning method used for spherical pin element
CN103761534A (en) * 2014-01-22 2014-04-30 哈尔滨工业大学 Method for detecting vision localization of QFP element

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003058515A1 (en) * 2001-12-28 2003-07-17 Electro Scientific Industries, Inc. Method for automatically defining a part model
CN102829735A (en) * 2012-08-31 2012-12-19 哈尔滨工业大学 Machine vision based detection method of defect of geometrical shape of back surface of E type magnet
CN103729655A (en) * 2014-01-22 2014-04-16 哈尔滨工业大学 Detection method for sheet element visual positioning
CN103745475A (en) * 2014-01-22 2014-04-23 哈尔滨工业大学 Detection and positioning method used for spherical pin element
CN103761534A (en) * 2014-01-22 2014-04-30 哈尔滨工业大学 Method for detecting vision localization of QFP element

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
王祖进等: "基于Harris 角点特征的贴片元件视觉定位算法", 《江苏大学学报(自然科学版)》 *
黄紫青等: "基于机器视觉的芯片引脚识别与中心定位算法研究", 《软件导刊》 *

Cited By (30)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107220938A (en) * 2016-03-21 2017-09-29 深圳市燕麦科技股份有限公司 The computational methods and device of a kind of image block anglec of rotation
CN107314742A (en) * 2017-05-31 2017-11-03 合肥工业大学 A kind of rotary optical chromatographic imaging system and imaging method
CN107314742B (en) * 2017-05-31 2019-08-23 合肥工业大学 A kind of rotary optical chromatographic imaging system and imaging method
CN107478152A (en) * 2017-08-11 2017-12-15 哈尔滨工业大学 TR chip positionings method and detection method
CN111095296A (en) * 2017-09-14 2020-05-01 雪佛龙美国公司 Classifying character strings using machine learning
CN111095296B (en) * 2017-09-14 2024-07-02 雪佛龙美国公司 Classifying character strings using machine learning
CN109712137A (en) * 2018-12-29 2019-05-03 英特尔产品(成都)有限公司 Chip test base detection based on image procossing
CN110110697B (en) * 2019-05-17 2021-03-12 山东省计算中心(国家超级计算济南中心) Multi-fingerprint segmentation extraction method, system, device and medium based on direction correction
CN110110697A (en) * 2019-05-17 2019-08-09 山东省计算中心(国家超级计算济南中心) More fingerprint segmentation extracting methods, system, equipment and medium based on direction correction
CN110544276A (en) * 2019-08-19 2019-12-06 西安交通大学 Least square method ellipse fitting piston skirt maximum point size measurement method
CN111445511A (en) * 2020-03-24 2020-07-24 杭州东信北邮信息技术有限公司 Method for detecting circle in image
CN111445511B (en) * 2020-03-24 2022-08-05 杭州东信北邮信息技术有限公司 Method for detecting circle in image
CN111553885B (en) * 2020-04-08 2021-07-06 哈尔滨工业大学 SOT type chip pin parameter detection method based on rollback tree
CN111553885A (en) * 2020-04-08 2020-08-18 哈尔滨工业大学 SOT type chip pin parameter detection method based on rollback tree
CN112419224A (en) * 2020-07-17 2021-02-26 宁波智能装备研究院有限公司 Spherical pin chip positioning method and system
CN112419224B (en) * 2020-07-17 2021-08-27 宁波智能装备研究院有限公司 Spherical pin chip positioning method and system
CN112307136B (en) * 2020-11-25 2024-02-20 上海望友信息科技有限公司 Element and package query method and computer readable storage medium
CN112307136A (en) * 2020-11-25 2021-02-02 上海望友信息科技有限公司 Component and package query method and computer readable storage medium
CN112580663A (en) * 2020-12-09 2021-03-30 山东志盈医学科技有限公司 Method and apparatus for coverslip boundary removal in digital slide scanner
CN113096123A (en) * 2021-05-07 2021-07-09 湘潭大学 Multi-fuzzy reasoning cascaded primer side defect classification and damage degree analysis method
CN114266748A (en) * 2021-12-22 2022-04-01 四川艾德瑞电气有限公司 Method and device for judging integrity of surface of process plate in rail transit maintenance field
CN114266748B (en) * 2021-12-22 2024-04-30 四川艾德瑞电气有限公司 Method and device for judging surface integrity of process board in field of rail traffic overhaul
CN114152200A (en) * 2022-02-07 2022-03-08 北京航空航天大学杭州创新研究院 Chip pin measuring method and device
CN114372984A (en) * 2022-03-22 2022-04-19 南京熊猫电子制造有限公司 Super-resolution component angle identification device and method
CN115019024A (en) * 2022-04-29 2022-09-06 苏州市路远智能装备有限公司 Visual identification method of QFP (quad Flat Package)
CN115019024B (en) * 2022-04-29 2024-03-19 苏州市路远智能装备有限公司 Visual recognition method of QFP
CN114943710B (en) * 2022-05-27 2024-03-19 华南理工大学 Method for positioning circle center of thin-wall circular tube type part by utilizing improved least square fitting
CN114943710A (en) * 2022-05-27 2022-08-26 华南理工大学 Method for positioning circle center of thin-wall circular tube part by using improved least square fitting
CN116412779A (en) * 2023-06-12 2023-07-11 南京中旭电子科技有限公司 Processing method and device for Hall sensor package
CN116412779B (en) * 2023-06-12 2023-08-15 南京中旭电子科技有限公司 Processing method and device for Hall sensor package

Also Published As

Publication number Publication date
CN104915963B (en) 2017-11-03

Similar Documents

Publication Publication Date Title
CN104915963A (en) Detection and positioning method for PLCC component
CN103530590B (en) DPM Quick Response Code recognition system
CN103729655B (en) A kind of detection method for slice component vision localization
CN104992449B (en) Information identification and surface defect online test method based on machine vision
CN104680519B (en) Seven-piece puzzle recognition methods based on profile and color
US8305445B2 (en) Lane marker recognizing apparatus
CN106446894B (en) A method of based on outline identification ball-type target object location
CN109740606B (en) Image identification method and device
CN104933720B (en) A kind of SOP elements positioning of view-based access control model and defect inspection method
CN103439348B (en) Remote controller key defect detection method based on difference image method
CN111091544B (en) Method for detecting breakage fault of side integrated framework of railway wagon bogie
CN106650701B (en) Binocular vision-based obstacle detection method and device in indoor shadow environment
CN103400151A (en) Optical remote-sensing image, GIS automatic registration and water body extraction integrated method
CN104647893B (en) A kind of printing chromatography error detection method based on cross hairs
CN106682278B (en) Supersonic flow field prediction accuracy decision maker and method based on image procossing
CN105225226A (en) A kind of cascade deformable part model object detection method based on Iamge Segmentation
CN104217427A (en) Method for positioning lane lines in traffic surveillance videos
CN110473184A (en) A kind of pcb board defect inspection method
CN112651968A (en) Wood board deformation and pit detection method based on depth information
CN104573685A (en) Natural scene text detecting method based on extraction of linear structures
CN106340010A (en) Corner detection method based on second-order contour difference
CN102324099A (en) Step edge detection method oriented to humanoid robot
CN106845482A (en) A kind of license plate locating method
CN106529548A (en) Sub-pixel level multi-scale Harris corner detection algorithm
CN106548478A (en) Active contour image partition method based on local fit image

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20190911

Address after: 150001 No. 434, postal street, Nangang District, Heilongjiang, Harbin

Co-patentee after: Gao Hui Jun

Patentee after: Harbin Institute of Technology Asset Investment Management Co., Ltd.

Address before: 150001 Harbin, Nangang, West District, large straight street, No. 92

Patentee before: Harbin Institute of Technology

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20191018

Address after: 315200 No.189, Guangming Road, Zhuangshi street, Zhenhai District, Ningbo City, Zhejiang Province

Patentee after: Ningbo Intelligent Equipment Research Institute Co., Ltd.

Address before: 150001 No. 434, postal street, Nangang District, Heilongjiang, Harbin

Co-patentee before: Gao Hui Jun

Patentee before: Harbin Institute of Technology Asset Investment Management Co., Ltd.

TR01 Transfer of patent right