CN107160063B - A kind of dual threshold automatic welding machine pad detection method - Google Patents

A kind of dual threshold automatic welding machine pad detection method Download PDF

Info

Publication number
CN107160063B
CN107160063B CN201710433289.XA CN201710433289A CN107160063B CN 107160063 B CN107160063 B CN 107160063B CN 201710433289 A CN201710433289 A CN 201710433289A CN 107160063 B CN107160063 B CN 107160063B
Authority
CN
China
Prior art keywords
pad
conducting wire
centroid
high2
high1
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.)
Active
Application number
CN201710433289.XA
Other languages
Chinese (zh)
Other versions
CN107160063A (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.)
Qinghai Ao Yue Electronic Technology Co Ltd
Original Assignee
Qinghai Ao Yue Electronic Technology Co Ltd
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 Qinghai Ao Yue Electronic Technology Co Ltd filed Critical Qinghai Ao Yue Electronic Technology Co Ltd
Priority to CN201710433289.XA priority Critical patent/CN107160063B/en
Publication of CN107160063A publication Critical patent/CN107160063A/en
Application granted granted Critical
Publication of CN107160063B publication Critical patent/CN107160063B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B23MACHINE TOOLS; METAL-WORKING NOT OTHERWISE PROVIDED FOR
    • B23KSOLDERING OR UNSOLDERING; WELDING; CLADDING OR PLATING BY SOLDERING OR WELDING; CUTTING BY APPLYING HEAT LOCALLY, e.g. FLAME CUTTING; WORKING BY LASER BEAM
    • B23K37/00Auxiliary devices or processes, not specially adapted to a procedure covered by only one of the preceding main groups
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • 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
    • G06T7/0006Industrial image inspection using a design-rule based approach
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • G06T2207/20032Median filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20036Morphological image processing

Abstract

The present invention discloses a kind of dual threshold automatic welding machine pad detection method, comprising: step 1: making for original RGB image to be transformed into HSV chrominance space;Detect the pad center upper bound and pad center lower bound;Step 2: the determining pad upper bound and pad lower bound;Step 3: determining the left boundary of pad and the right boundary of pad;Step 4: finding border circular areas and pad centroid;Step 5: using pad centroid as the center of circle, R is to determine whether lead location is correct in the border circular areas of radius;Step 6: when correct, the centroid of conducting wire in border circular areas is calculated, in welding, using conducting wire centroid as pad.The present invention quickly positions pad locations using 2 sets of threshold values using HSV chrominance space;Then color characteristic positions lead location, then by conducting wire welding disking area proportion determine conducting wire whether correct placement;This method is adaptable to varying environment, and speed is fast, and accuracy rate is high.

Description

A kind of dual threshold automatic welding machine pad detection method
Technical field
The present invention relates to technical field of image detection, in particular to a kind of automatic welding machine pad detection method is suitable for Automatically it detects tiny copper wire and whether pad is put correctly.
Background technique
In recent years, the spot welding robot of view-based access control model is more and more.Spot welding robot can substitute most of pad, enamel-cover The human weld of line etc. works.Spot welding robot can work long hours, and work quality is good, at low cost, be easily managed.
But the pad detection algorithm for being currently based on the spot welding robot of vision is simple, cannot adapt to very well because illumination, The problem of pad locations variation, change in shape are brought.And Detection accuracy and speed are still to be improved.
Summary of the invention
The purpose of the present invention is to provide a kind of dual threshold automatic welding machine pad detection methods, to solve to pad locations Be properly positioned, copper conductor is properly positioned, and the problem of whether copper conductor is placed into the correct position of pad judged.This Invention proposes to utilize HSV (Hue, Saturation, Value: tone, saturation degree, brightness) chrominance space, using two sets of threshold values, Quickly pad locations are positioned;Then color characteristic positions lead location, then by conducting wire in welding disking area Proportion determine conducting wire whether correct placement.This method is adaptable to varying environment, and speed is fast, and accuracy rate is high.
To achieve the goals above, the present invention adopts the following technical scheme:
A kind of automatic welding machine pad detection method of dual threshold, comprising the following steps:
Step 1: shooting spot welding robot's pad locations to be welded using industrial camera, obtain original RGB image to be detected; Original RGB image is transformed into HSV chrominance space;Successively each row of image is detected from top to bottom using sets of threshold values 1;Threshold Value group 1 includes: H_low1, H_high1, S_low1, S_high1, V_low1, V_high1;As H, S, V tri- of a certain pixel Channel meets condition 1:H_low1≤H≤H_high1, S_low1≤S≤S_high1, V_low1≤V≤V_high1, then to this Linage-counter Xnum adds 1;After the completion of a line image detection, if Xnum is greater than parameter preset MINXnum, retain the row of the row Value;After having detected entire image, minimum value and maximum value in the row value of reservation are referred to as in the pad center upper bound and pad Heart lower bound;
Step 2: being originated with the pad center upper bound and pad center lower bound, using sets of threshold values 2 respectively up and down to figure As each row is detected;Sets of threshold values 2 includes: H_low2, H_high2, S_low2, S_high2, V_low2, V_high2;When Continuous two row, which detects, meets condition 2:H_low2≤H≤H_high2, S_low2≤S≤S_high2, V_low2≤V≤V_ The pixel number of high2 is 0, and detection stops;Line number when stopping is finally determining the pad upper bound and pad lower bound;
Step 3: within the scope of the pad upper bound and pad lower bound, using the from left to right scan image of sets of threshold values 2, determining pad Left boundary and the right boundary of pad;
Step 4: within the scope of the upper bound of each pad, lower bound, Zuo Jie and right boundary, the part for meeting the condition of satisfaction 2 is found, And its centroid is calculated, as pad centroid;
Step 5: using pad centroid as the center of circle, R is to be unsatisfactory for the pixel of condition 2 in the border circular areas of radius, it is believed that It is conducting wire;Area ratio shared by conducting wire is calculated, when this ratio is more than threshold value, assert that conducting wire is placed in correctly on pad Position, otherwise, it is determined that conducting wire placement location is unqualified;
Step 6: the centroid of conducting wire in border circular areas is calculated, in welding, using conducting wire centroid as pad.
Further, H_low1=19 in step 1, H_high1=25, S_low1=100, S_high1=150, V_ Low1=220, V_high1=155.
Further, MINXnum=40.
Further, H_low2=19, H_high2=25, S_low2=100, S_high2=150, V_low2=180, V_high2=155.
Further, step 3 specifically: within the scope of the pad upper bound and pad lower bound, from left to right swept using sets of threshold values 2 Trace designs picture, and when continuous two column detect the pixel of the condition of satisfaction 2, previous columns is the left boundary of pad, when continuous two column detection To the pixel number for meeting condition 2 be 0 when, current columns be the right boundary of pad.
Further, R=25.
Further, step 6 specifically: assert that conducting wire when being placed in correct position on pad, calculates in border circular areas The centroid of conducting wire: it is determined as that the abscissa of all pixels point of conducting wire is added the number divided by border circular areas all pixels point, knot Fruit is centroid abscissa;The ordinate of all pixels point is added the number divided by border circular areas all pixels point, and result is centroid Ordinate is welded in welding using conducting wire centroid as pad.
Further, in step 1, step 2 and step 3, using the method for interval detection.
Further, there are two kinds of interference in step 3: (1) meeting the part of threshold value outside pad;(2) because conducting wire is parallel In y-axis, and run through entire pad, pad is separated, two independent regions are become;For interference (1), using morphologic filtering Or the method for median filtering rejects the outer interference sections of pad;For interference (2), by judging that gap size picks this interference It removes, successively each column available point is counted from left to right, the few columns of number of effective points is less than threshold value, then it is dry to regard as conducting wire It disturbs, the few columns of number of effective points is greater than threshold value, regards as normal pad interval.
Compared with the existing technology, the invention has the following advantages:
(1) pad detection being carried out using two sets of threshold values and conducting wire detecting, Detection accuracy is high.
(2) centroid of conducting wire on pad is calculated, using conducting wire centroid as pad, welding effect is good.
Detailed description of the invention
Fig. 1 is definition of the present invention to image coordinate system;
Fig. 2 is the flow chart of detection method;
Fig. 3 is the determining pad center upper bound, pad center lower bound, the pad upper bound, pad lower bound, weldering in calculating process It faces left the schematic diagram on boundary, the right boundary of pad.
Specific embodiment
Explanation and specific embodiment elaborate to the present invention with reference to the accompanying drawing.
Referring to Fig.1, spot welding robot's pad locations to be welded are shot using industrial camera, obtains original RGB figure to be detected Picture, image to be detected are two-dimensional image, establish two-dimensional Cartesian coordinate system (x, y) on this plane, take 1 pixel as coordinate Unit length, it is to the right x positive direction that taking top left corner pixel point, which is origin (0,0), is downwards y positive direction.
Referring to Fig. 2, a kind of dual threshold automatic welding machine pad detection method of the present invention includes the following steps:
Step 1: original RGB image to be detected is transformed into HSV chrominance space.It is successively right from top to bottom using sets of threshold values 1 The each row of image is detected;Sets of threshold values 1 includes: H_low1, H_high1, S_low1, S_high1, V_low1, V_high1; In the present embodiment, H_low1=19, H_high1=25, S_low1=100, S_high1 ,=150, V_low1 ,=220, V_ High1=155.When H, S, V triple channel of a certain pixel meet condition 1:H_low1≤H≤H_high1, S_low1≤S≤ S_high1, V_low1≤V≤V_high1 then add 1 to linage-counter Xnum.After the completion of a line image detection, if Xnum Greater than parameter preset MINXnum, MINXnum=40, then retain the row value of the row.After having detected entire image, the row value of reservation In minimum value and maximum value be referred to as the pad center upper bound and pad center lower bound.
Step 2: being originated with the pad center upper bound and pad center lower bound, using sets of threshold values 2 respectively up and down to figure As each row is detected;Sets of threshold values 2 includes: H_low2, H_high2, S_low2, S_high2, V_low2, V_high2.H_ Low2=19, H_high2=25, S_low2=100, S_high2=150, V_low2=180, V_high2=155.When continuous What two rows detected meets condition 2:H_low2≤H≤H_high2, S_low2≤S≤S_high2, V_low2≤V≤V_ The pixel number of high2 is 0, and detection stops.The pad upper bound and pad lower bound that line number when stopping as finally determines.
Step 3: within the scope of the pad upper bound and pad lower bound, using the from left to right scan image of sets of threshold values 2, when continuous two For column when detecting the pixel of the condition of satisfaction 2, previous columns is the left boundary of pad, when what continuous two column detected meets condition 2 When pixel number is 0, current columns is the right boundary of pad.
Referring to Fig. 3, the pad center upper bound, pad center lower bound, the pad upper bound, pad lower bound, the left boundary of pad, the right boundary of pad Position under image coordinate system.
Step 4: within the scope of the upper bound of each pad, lower bound, Zuo Jie and right boundary, finding the whole for meeting the condition of satisfaction 2 Pixel, and its centroid is calculated, as pad centroid.
Step 5: using pad centroid as the center of circle, R is to be unsatisfactory for the pixel of condition 2 in the border circular areas of radius (R=25) Point, it is believed that it is conducting wire.Calculate area ratio shared by conducting wire: wire glass is accounted for using pad centroid as the center of circle, and R is the circle of radius The ratio in shape region assert that conducting wire is placed in correct position on pad, otherwise, it is determined that leading when this ratio is more than threshold value Line placement location is unqualified.When unqualified, determine conducting wire placement location mistake, mark the conducting wire and pad.
Step 6: assert that conducting wire when being placed in correct position on pad, calculates the centroid of conducting wire in border circular areas: determining It is added the number divided by border circular areas all pixels point for the abscissa of all pixels point of conducting wire, result is centroid abscissa; The ordinate of all pixels point is added the number divided by border circular areas all pixels point, and result is centroid ordinate, in welding, It is welded using conducting wire centroid as pad.
It further, is raising calculating speed, in step 1, step 2 and step 3, using the method for interval detection.
Further, it in step 2, has interference region and is connect with pad, in order not to make the excessive influence boundary of interference region It determines, two parameters of the boundary upper limit and boundary lower limit is set.
Further, there are two kinds of interference in step 3: (1) meeting the part of threshold value outside pad;(2) because conducting wire is parallel In y-axis, and run through entire pad, pad is separated, two independent regions are become.For interference (1), using morphologic filtering Or the method for median filtering rejects the outer interference sections of pad.For interference (2), by judging that gap size picks this interference It removes, successively each column available point is counted from left to right, the few columns of number of effective points is less than threshold value, then it is dry to regard as conducting wire It disturbs, the few columns of number of effective points is greater than threshold value, regards as normal pad interval.Removal interference (1) and (2) finally obtains each weldering The Zuo Jie and You Jie of disk.

Claims (9)

1. a kind of automatic welding machine pad detection method of dual threshold, which comprises the following steps:
Step 1: shooting spot welding robot's pad locations to be welded using industrial camera, obtain original RGB image to be detected;It will be former Beginning RGB image is transformed into HSV chrominance space;Successively each row of image is detected from top to bottom using sets of threshold values 1;Sets of threshold values 1 includes: H_low1, H_high1, S_low1, S_high1, V_low1, V_high1;When H, S, V triple channel of a certain pixel Meet condition 1:H_low1≤H≤H_high1, S_low1≤S≤S_high1, V_low1≤V≤V_high1, then to the row meter Number device Xnum adds 1;After the completion of a line image detection, if Xnum is greater than parameter preset MINXnum, retain the row value of the row; After having detected entire image, minimum value and maximum value in the row value of reservation are referred to as under the pad center upper bound and pad center Boundary;
Step 2: it is originated with the pad center upper bound and pad center lower bound, it is every to image up and down respectively using sets of threshold values 2 A line is detected;Sets of threshold values 2 includes: H_low2, H_high2, S_low2, S_high2, V_low2, V_high2;When continuous Two rows, which detect, meets condition 2:H_low2≤H≤H_high2, S_low2≤S≤S_high2, V_low2≤V≤V_high2 Pixel number be 0, detection stop;Line number when stopping is finally determining the pad upper bound and pad lower bound;
Step 3: within the scope of the pad upper bound and pad lower bound, using the from left to right scan image of sets of threshold values 2, determining the left boundary of pad With the right boundary of pad;
Step 4: within the scope of the upper bound of each pad, lower bound, Zuo Jie and right boundary, finding the part for meeting the condition of satisfaction 2, and count Its centroid is calculated, as pad centroid;
Step 5: using pad centroid as the center of circle, R is to be unsatisfactory for the pixel of condition 2, it is believed that it is in the border circular areas of radius Conducting wire;Area ratio shared by conducting wire is calculated, when this ratio is more than threshold value, assert that conducting wire is placed in correct position on pad It sets, otherwise, it is determined that conducting wire placement location is unqualified;
Step 6: the centroid of conducting wire in border circular areas is calculated, in welding, using conducting wire centroid as pad.
2. a kind of automatic welding machine pad detection method of dual threshold according to claim 1, which is characterized in that step 1 Middle H_low1=19, H_high1=25, S_low1=100, S_high1=150, V_low1=220, V_high1=155.
3. a kind of automatic welding machine pad detection method of dual threshold according to claim 1, which is characterized in that MINXnum=40.
4. a kind of automatic welding machine pad detection method of dual threshold according to claim 1, which is characterized in that H_low2 =19, H_high2=25, S_low2=100, S_high2=150, V_low2=180, V_high2=155.
5. a kind of automatic welding machine pad detection method of dual threshold according to claim 1, which is characterized in that step 3 Specifically: within the scope of the pad upper bound and pad lower bound, using the from left to right scan image of sets of threshold values 2, when continuous two column detection To the condition that meets 2 pixel when, previous columns is the left boundary of pad, when the continuous pixel for meeting condition 2 that detects of two column When number is 0, current columns is the right boundary of pad.
6. a kind of automatic welding machine pad detection method of dual threshold according to claim 1, which is characterized in that R=25.
7. a kind of automatic welding machine pad detection method of dual threshold according to claim 1, which is characterized in that step 6 Specifically: assert that conducting wire when being placed in correct position on pad, calculates the centroid of conducting wire in border circular areas: being determined as conducting wire The abscissa of all pixels point is added the number divided by border circular areas all pixels point, and result is centroid abscissa;All pixels The ordinate of point is added the number divided by border circular areas all pixels point, and result is centroid ordinate, in welding, with conducting wire shape The heart is that pad is welded.
8. a kind of automatic welding machine pad detection method of dual threshold according to claim 1, which is characterized in that step 1, In step 2 and step 3, using the method for interval detection.
9. a kind of automatic welding machine pad detection method of dual threshold according to claim 1, which is characterized in that step 3 Middle there are two kinds of interference: (1) meeting the part of threshold value outside pad;(2) because conducting wire is parallel to y-axis, and run through entire pad, it will Pad partition, becomes two independent regions;For interference (1), is rejected and welded using the method for morphologic filtering or median filtering The outer interference sections of disk;For interference (2), by judging that gap size rejects this interference, from left to right successively to often showing Effect point is counted, and the few columns of number of effective points is less than threshold value, then regards as conducting wire interference, and the few columns of number of effective points is greater than threshold Value, regards as normal pad interval.
CN201710433289.XA 2017-06-09 2017-06-09 A kind of dual threshold automatic welding machine pad detection method Active CN107160063B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710433289.XA CN107160063B (en) 2017-06-09 2017-06-09 A kind of dual threshold automatic welding machine pad detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710433289.XA CN107160063B (en) 2017-06-09 2017-06-09 A kind of dual threshold automatic welding machine pad detection method

Publications (2)

Publication Number Publication Date
CN107160063A CN107160063A (en) 2017-09-15
CN107160063B true CN107160063B (en) 2019-02-01

Family

ID=59824961

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710433289.XA Active CN107160063B (en) 2017-06-09 2017-06-09 A kind of dual threshold automatic welding machine pad detection method

Country Status (1)

Country Link
CN (1) CN107160063B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190137549A1 (en) * 2017-11-03 2019-05-09 Velodyne Lidar, Inc. Systems and methods for multi-tier centroid calculation
CN109410236B (en) * 2018-06-12 2021-11-30 佛山市顺德区中山大学研究院 Method and system for identifying and redefining reflecting points of fluorescence staining images

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4830501B2 (en) * 2005-02-21 2011-12-07 オムロン株式会社 Substrate inspection method and apparatus, and inspection logic setting method and apparatus thereof
KR100885880B1 (en) * 2007-03-06 2009-02-27 엠텍비젼 주식회사 Device and Method of Realtime Image Processing
CN101793843A (en) * 2010-03-12 2010-08-04 华东理工大学 Connection table based automatic optical detection algorithm of printed circuit board
CN101840572A (en) * 2010-04-13 2010-09-22 河海大学常州校区 QFP element position error visual inspection method based on region segmentation
CN104899871B (en) * 2015-05-15 2017-08-29 广东工业大学 A kind of IC elements solder joint missing solder detection method
CN105824907A (en) * 2016-03-15 2016-08-03 西安建筑科技大学 Method and system for analyzing digital information of ancient frescoes

Also Published As

Publication number Publication date
CN107160063A (en) 2017-09-15

Similar Documents

Publication Publication Date Title
EP2779147B1 (en) Re-interpolation with edge detection for extracting an aging pattern for AMOLED displays
CN105430367B (en) A kind of method and apparatus of AWB
CN105046198B (en) A kind of lane detection method
CN105744268A (en) Camera shielding detection method and device
CN107160063B (en) A kind of dual threshold automatic welding machine pad detection method
CN111261079B (en) Method for detecting abnormal phenomena of bright and dark spots
CN112785545B (en) Abnormal lamp bead positioning method and device and storage medium
CN106210712A (en) A kind of dead pixel points of images detection and processing method
CN104994374B (en) Method for automatically detecting three-dimensional format of video
TWI500904B (en) Stereo camera and automatic range finding method for measuring a distance between stereo camera and reference plane
WO2017050082A1 (en) Method for determining terminal position and terminal equipment
CN106157286A (en) Image processing method and screen light leak test method
CN105205437A (en) Side face detecting method and device based on head profile authentication
CN106934792B (en) 3D effect detection method, device and system of display module
CN104732197A (en) Target line detection device and method
CN108419015A (en) A kind of focus method and device
CN112801947A (en) Visual detection method for dead pixel of LED display terminal
CN106412575A (en) Method and device for detecting display
CN112102762A (en) Method and device for identifying abnormal light points of LED screen
CN102401800A (en) Online detection device for detecting welding quality of high voltage ceramic capacitor based on visual sense of device
CN114745510A (en) Automatic LED light source calibration method and system for target image acquisition
CN103176668A (en) Shot image correction method for camera locating touch system
CN106989681A (en) The dimension measurement method and measuring apparatus of a kind of via
CN111970501A (en) Pure color scene AE color processing method and device, electronic equipment and storage medium
CN104427210A (en) A method and device for detecting a random abnormal blinking dot

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