CN112750102A - Welding spot positioning method and system based on image processing - Google Patents

Welding spot positioning method and system based on image processing Download PDF

Info

Publication number
CN112750102A
CN112750102A CN202011484512.1A CN202011484512A CN112750102A CN 112750102 A CN112750102 A CN 112750102A CN 202011484512 A CN202011484512 A CN 202011484512A CN 112750102 A CN112750102 A CN 112750102A
Authority
CN
China
Prior art keywords
welding
image
camera
welding spot
spot
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
CN202011484512.1A
Other languages
Chinese (zh)
Other versions
CN112750102B (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.)
South China University of Technology SCUT
Original Assignee
South China University of Technology SCUT
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 South China University of Technology SCUT filed Critical South China University of Technology SCUT
Priority to CN202011484512.1A priority Critical patent/CN112750102B/en
Publication of CN112750102A publication Critical patent/CN112750102A/en
Application granted granted Critical
Publication of CN112750102B publication Critical patent/CN112750102B/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
    • 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
    • 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
    • B23K37/02Carriages for supporting the welding or cutting element
    • B23K37/0252Steering means
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J11/00Manipulators not otherwise provided for
    • B25J11/005Manipulators for mechanical processing tasks
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J18/00Arms
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1679Programme controls characterised by the tasks executed
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1694Programme controls characterised by use of sensors other than normal servo-feedback from position, speed or acceleration sensors, perception control, multi-sensor controlled systems, sensor fusion
    • B25J9/1697Vision controlled systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • 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
    • 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/10004Still image; Photographic image
    • 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/30152Solder

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Mechanical Engineering (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Robotics (AREA)
  • Optics & Photonics (AREA)
  • Quality & Reliability (AREA)
  • Geometry (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The invention belongs to the technical field of welding spot positioning, and relates to a welding spot positioning method based on image processing, which comprises the following steps: s1 design file from welding spotReading the estimated coordinates (x) of the first welding spotc,yc,zc) Wherein: x is the number ofcIs an estimated abscissa, y, of the center of the first spotcIs an estimated ordinate, z, of the center of the first spotcShooting height for the camera; s2, moving the camera to the pre-estimated coordinates; s3, carrying out automatic focusing based on the image definition; s4, after a clear image of the workpiece is obtained, calculating the coordinates of the center position of the welding spot workpiece, and replacing the calculated coordinate values with the design coordinate values of the welding spot to complete the positioning of the welding spot coordinates; and S5, judging whether all welding points finish coordinate positioning, if so, finishing the program, otherwise, reading the estimated coordinates of the next welding point, and returning to the step S2. The invention can improve the efficiency and accuracy of the coordinate positioning of the welding spot. The invention also provides a welding spot positioning system based on image processing.

Description

Welding spot positioning method and system based on image processing
Technical Field
The invention belongs to the technical field of welding spot positioning, and relates to a welding spot positioning method and system based on image processing.
Background
During the welding production process, the position of the welding gun has a great influence on the welding quality. Generally, the welding process is the final process of connecting the parts into a component or a product, so before welding, the parts are assembled together and put into the tire membrane of the positioning component for welding. Ultrasonic welding is generally applied to soluble materials such as plastics, and parts have certain elasticity after being formed. Although each welding point has a size in a scattered part figure, once the welding point is assembled, the assembly size of the welding point is inconsistent with the design size due to various reasons such as deformation of parts, loose fit during assembly and unfixed parts, and if the position of the welding point after assembly is guided according to the design size, the welding quality is possibly seriously influenced, so that the accurate position determination of the welding point of the part after assembly is an indispensable work before welding. At present, manual guidance is still carried out on a welding station by depending on an operator to determine the welding spot position of a welding gun, specifically, the operator carries out manual judgment, moves the welding gun on a mechanical arm to the welding spot, manually guides and adjusts the welding spot of the welding gun, records the position of the welding spot to form a welding spot position diagram, and then programs a welding path to enable the welding gun to automatically weld according to the size on the position diagram. The manual guiding is used for determining whether the position of the welding point is accurate or not, the manual guiding depends on the visual inspection experience of an operator, and the manual guiding is very time-consuming work, particularly when the number of welding points of a part to be welded is large and the types of welding products are various, the manual guiding is hard and easy to make mistakes, and once the position of the welding point is wrong, the welded part is scrapped to cause direct economic loss.
Disclosure of Invention
In order to overcome the defects and shortcomings of the prior art, the invention provides a welding spot positioning method based on image processing, which realizes automatic positioning of welding spot coordinates and improves efficiency and accuracy of welding spot coordinate positioning.
The invention also provides a welding spot positioning system based on image processing.
The invention is realized by adopting the following technical scheme:
a welding spot positioning method based on image processing comprises the following steps:
s1, reading the estimated coordinates (x) of the first welding point from the welding point design filec,yc,zc) Wherein: x is the number ofcIs an estimated abscissa, y, of the center of the first spotcIs an estimated ordinate, z, of the center of the first spotcShooting height for the camera;
s2, moving the camera to the pre-estimated coordinates;
s3, carrying out automatic focusing based on the image definition;
s4, after a clear image of the workpiece is obtained, calculating the coordinates of the center position of the welding spot workpiece, and replacing the calculated coordinate values with the design coordinate values of the welding spot to complete the positioning of the welding spot coordinates;
and S5, judging whether all welding points finish coordinate positioning, if so, finishing the program, otherwise, reading the estimated coordinates of the next welding point, and returning to the step S2.
Preferably, step S3 includes:
s3-1, shooting welding spot image I at current position1
S3-2, defining a definition index q of the image, wherein the larger the q value is, the clearer the image is; computing an image I1Size of sharpness index q1
S3-3, vertically moving the camera by a distance T; when T takes a positive value, the camera moves downwards; when T takes a negative value, the camera moves upwards;
s3-4, shooting a welding spot image I at the current position2
S3-5, calculating a welding spot image I2Size of sharpness index q2
S3-6, q is2Greater than q1Then let q be1=q2And returning to the step 3-3, otherwise, if the current position is not the optimal focal distance position, needing to call back the camera, and then executing the step 3-7;
s3-7, if the distance T is larger than the first threshold th1If T is-0.6 XT, q1=q2And returning to the step S3-3, otherwise, executing the step S3-8;
s3-8, calling back the camera: and (5) moving the camera by a distance of-T, wherein the camera position is the optimal focal length position, and the automatic focusing is finished.
Preferably, the sharpness index q of the image is calculated as follows:
Figure BDA0002838974710000031
wherein: x represents the abscissa of a pixel point in the image I; y represents the vertical coordinate of the pixel point in the image I; and I (x, y) represents the gray value of the pixel point (x, y) corresponding to the image I.
Preferably, the first threshold th10.3 mm.
Preferably, step S4 includes:
s4-1, shooting welding spot image I at current positiony
S4-2, calculating welding point image IyCenter coordinate (x) of center point of weldingI,yI) Radius of welding spot RIThe unit is the number of pixels;
s4-3, moving the camera to the left by a distance xy=(xI-x0)/RI×R0In the formula x0The standard center horizontal coordinate is provided, and the unit is the number of pixels; r0The actual radius of the welding spot is in millimeters; if xyNegative, the camera actually moves to the right;
s4-4, moving the camera backwards by a distance yy=(yI-y0)/RI×R0In the formula y0Is a standard central vertical coordinate, and the unit is the number of pixels; fruit of Ruoguo yyNegative, then the camera actually moves forward;
s4-5, if xyAnd yyAre all less than the second threshold th2Then the camera coordinates (x) at that time are savedj,yj,zj) Wherein: (x)j,yj) As the actual coordinate position of the welding spot, zj-F0Is the height of the welding spot; otherwise, the process returns to step S4-1.
Preferably, the second threshold th20.1 mm.
Preferably, S4-2 finds the solder point image IyCenter coordinate (x) of center point of weldingI,yI) Radius of welding spot RIThe method comprises the following steps:
s4-2-1 Butt-welding point image IyCanny edge detection is carried out to obtain an edge image Ic
S4-2-2, edge image I with 20 × 20 rectangular structurecPerforming a close operation to obtain an image IF
S4-2-3, finding out image IFAll connected domains;
s4-2-4, removing the length or width greater than the third threshold th3A connected domain of (c);
s4-2-5, finding the connected domain with the largest area in the rest connected domains, and solving the minimum convex hull curve B of the connected domain with the largest area;
s4-2-6, removing the point of the minimum convex hull curve B at the image boundary;
s4-2-7, performing circle fitting on the remaining points of the minimum convex hull curve B by using a least square method to obtain the horizontal coordinate (x) of the center of the welding spotI,yI) Radius of welding spot RI
Preferably, the weld spot location is located at the isocenter (x)0,y0) Optimum working distance F from camera0The method is obtained by shooting standard welding spots, and comprises the following steps:
(1) one height is GbThe welding point cylinder is placed at the horizontal coordinate (x)b,yb) At least one of (1) and (b);
(2) moving the camera to coordinates (x)b,yb,Gb+Fg) A process, wherein: fgEstimating the working distance;
(3) carrying out automatic focusing;
(4) recording the current camera z coordinate zj,zj-GbI.e. the optimum working distance F of the camera0
(5) Shooting welding spot image I at current positiony
(6) Finding an image IyCenter coordinate (x) of center point of weldingI,yI) Namely the standard center (x)0,y0)。
Preferably, the third threshold th31400 pixels.
A welding spot positioning system based on image processing is used for realizing the welding spot positioning method, and comprises an upper computer, a mechanical arm control device, a six-axis robot and a camera module, wherein:
the upper computer is used for sending control instructions to the mechanical arm control device and the camera module;
the mechanical arm control device is used for controlling the movement of the six-axis robot mechanical arm and adjusting the motion mode, speed, direction and angle of the mechanical arm; the upper computer is connected with the mechanical arm control device through a connecting line, and the upper computer controls the movement of the mechanical arm of the six-axis robot by sending a specific instruction to the mechanical arm control device;
the camera module is used for acquiring high-definition images of welding spots, the camera module is fixed on a mechanical arm of the six-axis robot, and the distance from the camera to the welding spots is adjusted by controlling the mechanical arm; the camera module is connected with the upper computer through a connecting line, and the camera module transmits an instruction and a collected high-definition image through the connecting line.
Compared with the prior art, the invention has the following advantages and beneficial effects:
(1) the invention innovatively provides that on the premise of obtaining the assembly design size, the correct welding point position coordinates are automatically obtained by measuring and correcting the original design size according to the actual assembly condition of a product based on an image processing technology, so that the welding gun completes the welding of each welding point under the guidance of the measured coordinates.
(2) The invention realizes the automatic positioning work of the position coordinates of the welding point and improves the production efficiency.
(3) The invention has stronger positioning capability, and can complete the positioning work even if the estimated position is greatly different from the actual position and the welding spot cannot be completely shot.
(4) The invention has less limitation, the color, height and size of the welding spot can not influence the performance of the algorithm, and in addition, the positioning precision can not be influenced by the shielding of a small amount of sundries or the existence of a small amount of defects at the welding spot.
Drawings
FIG. 1 is a flow chart of a method for positioning solder joints in an embodiment of the present invention.
FIG. 2 is a flow chart of auto-focusing according to an embodiment of the present invention.
FIG. 3 is a flow chart of coordinate locating according to an embodiment of the present invention.
FIG. 4 is an image of the edge detection result in one embodiment of the present invention.
FIG. 5 is a close operation result image according to an embodiment of the present invention.
FIG. 6 is an image of a weld spot found in one embodiment of the present invention.
FIG. 7 is a diagram of a solder joint positioning system in accordance with an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to examples, but the present invention is not limited thereto.
The principle of the invention is that through the acquired assembly design size, namely the position coordinate of a welding spot on an assembly drawing, a mechanical arm which is provided with an industrial camera and is connected with a computer is moved to a welding spot coordinate, a workpiece image on the position is shot, after a clear workpiece image is obtained through automatic focusing operation, the central position coordinate of the welding spot workpiece is calculated, and the calculated coordinate value replaces the design coordinate value of the spot, namely the positioning of the welding spot position coordinate is completed. And moving the mechanical arm to the design coordinates of the next welding point, and repeating the operation and the calculation until the position coordinates of all the welding points are determined.
A method for positioning welding spots based on image processing, as shown in FIG. 1, includes the steps of:
s1, reading the estimated coordinates (x) of the first welding point from the welding point design filec,yc,zc) Wherein x iscIs the estimated abscissa of the center of the first weld point, and is the displacement, y, required for the camera to move from the origin of coordinates to the center of the first weld point to the rightcIs the estimated ordinate of the first spot center, which is also the displacement required for the camera to move forward from the origin of coordinates to the first spot center, zcThe shooting height of the camera is equal to the estimated height of the first welding point plus the optimal working distance F of the camera0. Wherein: the origin of coordinates is the (0, 0, 0) coordinate position read from the weld design file, which is also the initial position of the robot arm.
And S2, moving the camera to the estimated coordinates.
And S3, carrying out automatic focusing.
The auto-focusing process is shown in fig. 2, and includes the following specific steps:
s3-1, shooting welding spot image I at current position1
S3-2, defining the definition index q of the image, wherein the formula is as follows:
Figure BDA0002838974710000061
wherein: x represents the abscissa of a pixel point in the image I; y represents the vertical coordinate of the pixel point in the image I; and I (x, y) represents the gray value of the pixel point (x, y) corresponding to the image I. The larger the q value is, the clearer the image is. Calculating the image I according to the above formula1Size of sharpness index q1
And S3-3, vertically moving the camera by a distance T. When T takes a positive value, the camera moves downwards; when T takes a negative value, the camera moves up. In this example, the initial value of T is 1000 microns.
S3-4, shooting a welding spot image I at the current position2
S3-5, calculating the welding spot image I according to the method of the step S3-22Has large definition indexSmall q2
S3-6, q is2Greater than q1Then let q be1=q2And returning to the step 3-3, otherwise, explaining that the current position is not the optimal focal distance position, needing to call back the camera, and then executing the step 3-7.
S3-7, if the distance T is larger than the first threshold th1If T is-0.6 XT, q1=q2And returns to step S3-3, otherwise, step S3-8 is performed. In this embodiment, th10.3 mm.
S3-8, calling back the camera. And (5) moving the camera by a distance of-T, wherein the camera position is the optimal focal length position, and the automatic focusing is finished.
And S4, carrying out coordinate positioning.
The coordinate positioning process is shown in fig. 3, and includes the steps of:
s4-1, shooting welding spot image I at current positiony
S4-2, calculating welding point image IyCenter coordinate (x) of center point of weldingI,yI) Radius of welding spot RIThe unit is the number of pixels.
Finding a solder joint image IyCenter coordinate (x) of center point of weldingI,yI) Radius of welding spot RIThe method comprises the following steps:
s4-2-1 Butt-welding point image IyCanny edge detection is carried out to obtain an edge image IcAs shown in fig. 4.
S4-2-2, edge image I with 20 × 20 rectangular structurecPerforming a close operation to obtain an image IFAs shown in fig. 6.
S4-2-3, finding out image IFAll connected domains.
S4-2-4, removing the length or width greater than the third threshold th3I.e. the area contained by the outer ring of the black ring in fig. 5. Th in this example31400 pixels.
S4-2-5, finding the connected domain with the largest area in the rest connected domains, namely obtaining the white region contained in the inner ring of the black ring in the figure 5, and solving the minimum convex hull curve B of the white region.
S4-2-6, the points where the curve B lies at the image boundary are removed.
S4-2-7, performing circle fitting on the rest points of the curve B by using a least square method to obtain a horizontal coordinate (x) of the center of the welding spotI,yI) Radius of welding spot RI. FIG. 6 shows the effect of finding solder joints.
S4-3, moving the camera to the left by a distance xy=(xI-x0)/RI×R0. In the formula x0The standard center horizontal coordinate is provided, and the unit is the number of pixels; r0Is the actual radius of the weld spot in millimeters. If xyNegative, the camera is actually moving to the right.
S4-4, moving the camera backwards by a distance yy=(yI-y0)/RI×R0. In the formula y0Is the vertical coordinate of the standard center, and the unit is the number of pixels. Fruit of Ruoguo yyNegative, the camera actually moves forward.
S4-5, if xyAnd yyAre all less than the second threshold th2Then the camera coordinates (x) at that time are savedj,yj,zj) Wherein: (x)j,yj) As the actual coordinate position of the welding spot, zj-F0Is the height of the welding spot; otherwise, the process returns to step S4-1. Th in this example20.1 mm.
Center of reference (x) in the solder joint position0,y0) Optimum working distance F from camera0Can be obtained by shooting standard welding spots, and comprises the following steps:
(1) one height is GbThe welding point cylinder is placed at the horizontal coordinate (x)b,yb) To (3).
(2) Moving the camera to coordinates (x)b,yb,Gb+Fg) A process, wherein: fgTo estimate the working distance.
(3) The auto focus is performed in the same manner as the step S3.
(4) Recording the current camera z coordinate zj,zj-GbI.e. the optimum working distance F of the camera0
(5) Shooting welding spot image I at current positiony
(6) Finding an image IyCenter coordinate (x) of center point of weldingI,yI) Namely the standard center (x)0,y0) The method is the same as the step S4.
And S5, judging whether all welding points are positioned, if so, finishing the program, otherwise, reading the estimated coordinates of the next welding point, and returning to the step S2.
A welding spot positioning system based on image processing is shown in figure 7 and comprises an upper computer 1, a mechanical arm control device 2, a six-axis robot 3 and a camera module 4.
The upper computer is used for sending control instructions to the mechanical arm control device and the camera module, and comprises but is not limited to a desktop computer. The upper computer further comprises user input equipment and display equipment, wherein the input equipment comprises a mouse and a keyboard, and the display equipment comprises a computer display screen, a liquid crystal display screen and the like.
The mechanical arm control device is used for controlling the movement of the six-axis robot mechanical arm and can adjust the movement mode, speed, direction and angle of the mechanical arm. The upper computer is connected with the mechanical arm control device through a connecting line, and the upper computer controls the movement of the mechanical arm of the six-axis robot by sending specific instructions to the mechanical arm control device.
The camera module is used for collecting high-definition images of welding spots, is fixed on the mechanical arm of the six-axis robot, and can be used for adjusting the distance from the camera to the welding spots by controlling the mechanical arm so as to achieve the purpose of collecting clear images. The camera module is connected with the upper computer through a connecting line, and the camera module transmits an instruction and a collected high-definition image through the connecting line.
The above embodiments are preferred embodiments of the present invention, but the present invention is not limited to the above embodiments, and any other changes, modifications, substitutions, combinations, and simplifications which do not depart from the spirit and principle of the present invention should be construed as equivalents thereof, and all such changes, modifications, substitutions, combinations, and simplifications are intended to be included in the scope of the present invention.

Claims (10)

1. A welding spot positioning method based on image processing is characterized by comprising the following steps:
s1, reading the estimated coordinates (x) of the first welding point from the welding point design filec,yc,zc) Wherein: x is the number ofcIs an estimated abscissa, y, of the center of the first spotcIs an estimated ordinate, z, of the center of the first spotcShooting height for the camera;
s2, moving the camera to the pre-estimated coordinates;
s3, carrying out automatic focusing based on the image definition;
s4, after a clear image of the workpiece is obtained, calculating the coordinates of the center position of the welding spot workpiece, and replacing the calculated coordinate values with the design coordinate values of the welding spot to complete the positioning of the welding spot coordinates;
and S5, judging whether all welding points finish coordinate positioning, if so, finishing the program, otherwise, reading the estimated coordinates of the next welding point, and returning to the step S2.
2. The solder joint positioning method according to claim 1, wherein the step S3 includes:
s3-1, shooting welding spot image I at current position1
S3-2, defining a definition index q of the image, wherein the larger the q value is, the clearer the image is; computing an image I1Size of sharpness index q1
S3-3, vertically moving the camera by a distance T; when T takes a positive value, the camera moves downwards; when T takes a negative value, the camera moves upwards;
s3-4, shooting a welding spot image I at the current position2
S3-5, calculating a welding spot image I2Size of sharpness index q2
S3-6, q is2Greater than q1Then let q be1=q2And returning to the step 3-3, otherwise, if the current position is not the optimal focal distance position, needing to call back the camera, and then executing the step 3-7;
s3-7, if the distance T is larger than the first threshold th1If T is-0.6 XT, q1=q2And is combined withReturning to the step S3-3, otherwise, executing a step S3-8;
s3-8, calling back the camera: and (5) moving the camera by a distance of-T, wherein the camera position is the optimal focal length position, and the automatic focusing is finished.
3. The solder joint positioning method according to claim 2, wherein the sharpness index q of the image is calculated as follows:
Figure FDA0002838974700000021
wherein: x represents the abscissa of a pixel point in the image I; y represents the vertical coordinate of the pixel point in the image I; and I (x, y) represents the gray value of the pixel point (x, y) corresponding to the image I.
4. Solder joint positioning method according to claim 2, characterized in that the first threshold th10.3 mm.
5. The solder joint positioning method according to claim 1, wherein the step S4 includes:
s4-1, shooting welding spot image I at current positiony
S4-2, calculating welding point image IyCenter coordinate (x) of center point of weldingI,yI) Radius of welding spot RIThe unit is the number of pixels;
s4-3, moving the camera to the left by a distance xy=(xI-x0)/RI×R0In the formula x0The standard center horizontal coordinate is provided, and the unit is the number of pixels; r0The actual radius of the welding spot is in millimeters; if xyNegative, the camera actually moves to the right;
s4-4, moving the camera backwards by a distance yy=(yI-y0)/RI×R0In the formula y0Is a standard central vertical coordinate, and the unit is the number of pixels; fruit of Ruoguo yyNegative, then the camera actually moves forward;
S4-5, xyAnd yyAre all less than the second threshold th2Then the camera coordinates (x) at that time are savedj,yj,zj) Wherein: (x)j,yj) As the actual coordinate position of the welding spot, zj-F0Is the height of the welding spot; otherwise, the process returns to step S4-1.
6. Solder joint positioning method according to claim 4, characterized in that the second threshold th20.1 mm.
7. Weld spot positioning method according to claim 4, characterized in that S4-2 finds the weld spot image IyCenter coordinate (x) of center point of weldingI,yI) Radius of welding spot RIThe method comprises the following steps:
s4-2-1 Butt-welding point image IyCanny edge detection is carried out to obtain an edge image Ic
S4-2-2, edge image I with 20 × 20 rectangular structurecPerforming a close operation to obtain an image IF
S4-2-3, finding out image IFAll connected domains;
s4-2-4, removing the length or width greater than the third threshold th3A connected domain of (c);
s4-2-5, finding the connected domain with the largest area in the rest connected domains, and solving the minimum convex hull curve B of the connected domain with the largest area;
s4-2-6, removing the point of the minimum convex hull curve B at the image boundary;
s4-2-7, performing circle fitting on the remaining points of the minimum convex hull curve B by using a least square method to obtain the horizontal coordinate (x) of the center of the welding spotI,yI) Radius of welding spot RI
8. Solder joint positioning method according to claim 7, characterized in that in the solder joint position positioning, the isocenter (x) is0,y0) Optimum working distance F from camera0The method is obtained by shooting standard welding spots, and comprises the following steps:
(1) will be a heightIs GbThe welding point cylinder is placed at the horizontal coordinate (x)b,yb) At least one of (1) and (b);
(2) moving the camera to coordinates (x)b,yb,Gb+Fg) A process, wherein: fgEstimating the working distance;
(3) carrying out automatic focusing;
(4) recording the current camera z coordinate zj,zj-GbI.e. the optimum working distance F of the camera0
(5) Shooting welding spot image I at current positiony
(6) Finding an image IyCenter coordinate (x) of center point of weldingI,yI) Namely the standard center (x)0,y0)。
9. Solder joint positioning method according to claim 7, characterized in that the third threshold th31400 pixels.
10. A welding spot positioning system based on image processing is characterized in that the welding spot positioning system is used for realizing the welding spot positioning method of any one of the claims 1 to 9, and comprises an upper computer, a mechanical arm control device, a six-axis robot and a camera module, wherein:
the upper computer is used for sending control instructions to the mechanical arm control device and the camera module;
the mechanical arm control device is used for controlling the movement of the six-axis robot mechanical arm and adjusting the motion mode, speed, direction and angle of the mechanical arm; the upper computer is connected with the mechanical arm control device through a connecting line, and the upper computer controls the movement of the mechanical arm of the six-axis robot by sending a specific instruction to the mechanical arm control device;
the camera module is used for acquiring high-definition images of welding spots, the camera module is fixed on a mechanical arm of the six-axis robot, and the distance from the camera to the welding spots is adjusted by controlling the mechanical arm; the camera module is connected with the upper computer through a connecting line, and the camera module transmits an instruction and a collected high-definition image through the connecting line.
CN202011484512.1A 2020-12-16 2020-12-16 Welding spot positioning method and system based on image processing Active CN112750102B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011484512.1A CN112750102B (en) 2020-12-16 2020-12-16 Welding spot positioning method and system based on image processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011484512.1A CN112750102B (en) 2020-12-16 2020-12-16 Welding spot positioning method and system based on image processing

Publications (2)

Publication Number Publication Date
CN112750102A true CN112750102A (en) 2021-05-04
CN112750102B CN112750102B (en) 2023-03-24

Family

ID=75647930

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011484512.1A Active CN112750102B (en) 2020-12-16 2020-12-16 Welding spot positioning method and system based on image processing

Country Status (1)

Country Link
CN (1) CN112750102B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113313759A (en) * 2021-05-31 2021-08-27 华南理工大学 Welding spot positioning method, system, device, equipment and medium based on binocular vision
CN114549530A (en) * 2022-04-26 2022-05-27 海门裕隆光电科技有限公司 PCB welding quality evaluation method based on image processing
CN115014205A (en) * 2022-08-04 2022-09-06 江苏塔帝思智能科技有限公司 Visual detection method and detection system for tower tray and automatic welding guiding system thereof

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007122705A (en) * 2005-09-30 2007-05-17 Nachi Fujikoshi Corp Welding teaching point correction system and calibration method
CN106529368A (en) * 2016-09-29 2017-03-22 上海正雅齿科科技有限公司 Method for localizing recognition region of two-dimensional code
WO2018000731A1 (en) * 2016-06-28 2018-01-04 华南理工大学 Method for automatically detecting curved surface defect and device thereof
US20190170694A1 (en) * 2017-12-01 2019-06-06 Shanghai Evertec Robot Technology Co., Ltd. Automatic car body welding spot inspection system and its control method
CN111815580A (en) * 2020-06-25 2020-10-23 北京航天新立科技有限公司 Image edge identification method and small module gear module detection method
CN111830060A (en) * 2020-07-15 2020-10-27 上汽通用五菱汽车股份有限公司 White car body welding spot 3D calibration method, system and medium based on template matching

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007122705A (en) * 2005-09-30 2007-05-17 Nachi Fujikoshi Corp Welding teaching point correction system and calibration method
WO2018000731A1 (en) * 2016-06-28 2018-01-04 华南理工大学 Method for automatically detecting curved surface defect and device thereof
CN106529368A (en) * 2016-09-29 2017-03-22 上海正雅齿科科技有限公司 Method for localizing recognition region of two-dimensional code
US20190170694A1 (en) * 2017-12-01 2019-06-06 Shanghai Evertec Robot Technology Co., Ltd. Automatic car body welding spot inspection system and its control method
CN111815580A (en) * 2020-06-25 2020-10-23 北京航天新立科技有限公司 Image edge identification method and small module gear module detection method
CN111830060A (en) * 2020-07-15 2020-10-27 上汽通用五菱汽车股份有限公司 White car body welding spot 3D calibration method, system and medium based on template matching

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
罗超群 等: "焊缝检测区域的分段线性阈值增强算法", 《现代电子技术》 *
黄茜 等: "基于多因子复杂度的结构误检区域排除算法", 《科学技术与工程》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113313759A (en) * 2021-05-31 2021-08-27 华南理工大学 Welding spot positioning method, system, device, equipment and medium based on binocular vision
CN113313759B (en) * 2021-05-31 2023-02-14 华南理工大学 Welding spot positioning method, system, device, equipment and medium based on binocular vision
CN114549530A (en) * 2022-04-26 2022-05-27 海门裕隆光电科技有限公司 PCB welding quality evaluation method based on image processing
CN114549530B (en) * 2022-04-26 2022-06-24 海门裕隆光电科技有限公司 PCB welding quality evaluation method based on image processing
CN115014205A (en) * 2022-08-04 2022-09-06 江苏塔帝思智能科技有限公司 Visual detection method and detection system for tower tray and automatic welding guiding system thereof

Also Published As

Publication number Publication date
CN112750102B (en) 2023-03-24

Similar Documents

Publication Publication Date Title
CN112750102B (en) Welding spot positioning method and system based on image processing
WO2021213223A1 (en) Weld quality inspection method, apparatus and system, and electronic device
CN112122840B (en) Visual positioning welding system and welding method based on robot welding
Shah et al. Butt welding joints recognition and location identification by using local thresholding
CN111192307B (en) Self-adaptive deviation rectifying method based on laser cutting of three-dimensional part
CN108344693B (en) Automatic welding-oriented visual measurement method for misalignment of sheet welding seam
CN108907526A (en) A kind of weld image characteristic recognition method with high robust
CN112238304B (en) Method for automatically welding small-batch customized special-shaped bridge steel templates by mechanical arm based on image visual recognition of welding seams
CN111127402A (en) Visual detection method for welding quality of robot
Chen et al. A robust visual servo control system for narrow seam double head welding robot
CN203791808U (en) Intelligent welding robot based on machine vision
Hou et al. A teaching-free welding method based on laser visual sensing system in robotic GMAW
CN114211168A (en) Method for correcting plane welding seam track based on image subtraction
CN106378514A (en) Stainless steel non-uniform tiny multi-weld-joint visual inspection system and method based on machine vision
CN114769988A (en) Welding control method and system, welding equipment and storage medium
CN114654465A (en) Welding seam tracking and extracting method based on line laser structure optical vision sensing
CN109671059B (en) Battery box image processing method and system based on OpenCV
CN110773842A (en) Welding positioning method and device
CN107843602B (en) Image-based weld quality detection method
CN107451991A (en) A kind of vertical position welding welding track computational methods and system
CN111178296B (en) Multi-workpiece visual positioning and identifying method
CN116912165A (en) Aluminum alloy sheet welding defect detection method based on improved YOLOv5
Zhang et al. A study on seam tracking in robotic GMA welding process
CN115770988A (en) Intelligent welding robot teaching method based on point cloud environment understanding
CN112129774B (en) Welding unfused defect online detection method

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