[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN109949328B - Method for calculating gray level of rectangular domain on straight line edge in laser welding workpiece image - Google Patents

Method for calculating gray level of rectangular domain on straight line edge in laser welding workpiece image Download PDF

Info

Publication number
CN109949328B
CN109949328B CN201910222879.7A CN201910222879A CN109949328B CN 109949328 B CN109949328 B CN 109949328B CN 201910222879 A CN201910222879 A CN 201910222879A CN 109949328 B CN109949328 B CN 109949328B
Authority
CN
China
Prior art keywords
line
straight line
edge
pixel
rectangular
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
CN201910222879.7A
Other languages
Chinese (zh)
Other versions
CN109949328A (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.)
Dalian University
Original Assignee
Dalian University
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 Dalian University filed Critical Dalian University
Priority to CN201910222879.7A priority Critical patent/CN109949328B/en
Publication of CN109949328A publication Critical patent/CN109949328A/en
Application granted granted Critical
Publication of CN109949328B publication Critical patent/CN109949328B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The invention discloses a method for calculating the gray level of a rectangular domain on the edge of a straight line in an image of a workpiece to be welded by laser welding, which specifically comprises the following steps: to (i)k,jk) The center of (2) is a coordinate origin, the horizontal direction is taken as an x axis, and the vertical direction is taken as a y axis to establish a coordinate system Oxy. To (i)k,jk) Is a pixel within a rectangular region of the gamma 7 of the center in the image to be welded. Pixel-level edge points in the 7 gamma 7 rectangular region are fitted with straight lines, and the fitted straight lines are represented by l; drawing a straight line l' perpendicular to l through the origin of coordinates O, the intersection point P0(ii) a Then, rotating the rectangular area until l is in the vertical direction and l' is in the horizontal direction; l' on P0Respectively fitting a quadratic curve to the coordinates and the gray values of the pixels on the two sides; and finally, calculating the gray value in the rectangular area according to the change curve of the pixels on two sides of the straight line l in the horizontal direction in a pixel position-pixel gray level coordinate system. And sequentially selecting each pixel level edge point, and repeating the steps to obtain the gray value of the rectangular area taking each pixel level edge point as the center. The method has the advantages of strong image interference noise resistance, stable calculation process and the like.

Description

Method for calculating gray level of rectangular domain on straight line edge in laser welding workpiece image
Technical Field
The invention belongs to the field of visual detection, and particularly relates to a method for calculating the gray level of a rectangular domain on the edge of a straight line in an image of a to-be-welded part for laser welding.
Background
Laser welding is a non-contact processing method using high-energy laser beams to act on workpieces, and is widely applied to the fields of aerospace, petrochemical equipment, machine tool equipment, automobile, ship manufacturing and the like. Before welding, a clamp or other methods are generally needed to fix the piece to be welded on a welding station. And during laser welding, a laser welding head arranged on an arm of the multi-freedom-degree welding robot or a numerical control machine tool moves according to a set track to realize welding. In order to eliminate the deviation between the preset welding track and the welding seam, a feasible method is to apply a visual method to detect the position of the welding seam and plan the welding track after the workpiece to be welded is fixed on a welding station by a clamp and the like. The detection of the sub-pixel edge of the part to be welded is a necessary step for visually detecting the weld joint, and the calculation of the gray value in a certain area in the image is sometimes needed for calculating the sub-pixel edge of the part to be welded. The method is mainly used for researching a method for calculating the gray value of the rectangular area on the edge of the straight line in the image of the to-be-welded part in the laser tailor-welding process, and provides technical support for planning the welding track of the to-be-welded part.
Disclosure of Invention
Aiming at the problem of detecting the linear weld joint of the to-be-welded part in laser tailor-welding, the application provides a method for calculating the gray level of the rectangular domain on the linear edge in the image of the to-be-welded part in laser welding.
In order to achieve the purpose, the technical scheme of the application is as follows: a method for calculating the gray level of a rectangular domain on the edge of a straight line in an image of a workpiece to be welded by laser welding specifically comprises the following steps: first, a pixel-level edge point (i) is takenk,jk) To (i) withk,jk) The center of (2) is a coordinate origin, the horizontal direction is taken as an x axis, and the vertical direction is taken as a y axis to establish a coordinate system Oxy. To (i)k,jk) Is a pixel within a rectangular region of the gamma 7 of the center in the image to be welded. Pixel-level edge points in the 7 gamma 7 rectangular region are fitted with straight lines, and the fitted straight lines are represented by l; drawing a straight line l' perpendicular to l through the origin of coordinates, the intersection point P0(ii) a Then, rotating the rectangular area until l is in the vertical direction and l' is in the horizontal direction; l' on P0Respectively fitting a quadratic curve to the coordinates and the gray values of the pixels on the two sides; and finally, calculating the gray value in the rectangular area according to the change curve of the pixels on two sides of the straight line l in the horizontal direction in a pixel position-pixel gray level coordinate system. And sequentially selecting each pixel level edge point, and repeating the steps to obtain the gray value of the rectangular area taking each pixel level edge point as the center.
Further, the rectangular area edge lines are respectively represented by t1、t2、t3And t4Representing, angular points, respectively, by P1、P2、P3And P4Represents; l is used as a boundary line to divide the taken rectangular area into two parts; drawing a straight line l' perpendicular to the line l through the origin O, wherein the intersection point of the two straight lines is P0
Rotating the rectangular area by taking O as a center to enable l to be in a vertical direction and l 'to be in a horizontal direction, and establishing a coordinate system Ox' y 'by taking O as a coordinate origin and taking a straight line l' as a horizontal coordinate; on the abscissa, by P0Is a demarcation point divided into a straight line l 'of'LAnd l'RTwo sections;
line segment lLAnd lRIs composed of pixel points. Taking O as a seatOrigin of the mark inLAnd lRThe pixel position is an abscissa, and a pixel position-pixel gray scale coordinate system is established by taking the pixel gray scale as an ordinate. L 'in a "pixel position-pixel grayscale" coordinate system'LAnd l'RFitting the coordinates and gray values of the upper pixel points to obtain a secondary curve l'LhAnd l'RhThe fitted curve is expressed as:
l'Lh:y=a1+b1x+c1x2
l'Rh:y=a2+b2x+c2x2
l 'can be obtained by curve fitting'LhAnd l'RhCoefficient (a) of1,b1,c1) And (a)2,b2,c2) In the coordinate system Ox 'y' created after the rectangular region is rotated, the change rule of the pixels passing through the horizontal lines on the left and right sides of the straight line l in the "pixel position-pixel gray level" coordinate system and the fitting curve l 'are determined by taking the straight line l as a boundary'LhAnd l'RhThe same is true.
Further, the vertical line l in the coordinate system Ox 'y' and the edge line t of the selected 7 × 7 region1、t2、t3And t4There are four positional relationships, and the vertical line in each of the four cases is represented by l1、l2、l3And l4And (4) showing.
Further, 1) vertical line l1And a rectangular edge line t1And t4Intersecting: vertical line is l1Then, a coordinate system Ox is established by taking O as a coordinate origin1y1(ii) a Vertical line l1And the edge line t1Cross point Pt1Vertical line l1And the edge line t4Cross point Pt4Respectively passing through point Pt1And Pt4Drawing perpendicular to l1The straight line drawn and the edge line t2And t3Cross point Pt2And Pt3(ii) a Respectively passing through the corner points P of the rectangle1And P3Drawing perpendicular to l1The straight line of (a), the drawn straight line and1meet at point P1l1And P3l1
Straight line Pt1Pt2、Pt3Pt4、P1P1l1、l1Dividing the rectangular area into six parts, the areas of which are respectively K11、K12、K13、K14、K15、K16Represents; by m11、m12、m13、m14、m15And m16Respectively represent an area of K11、K12、K13、K14、K15And K16The gray value in the region is calculated according to the following formula:
Figure BDA0002004189640000031
Figure BDA0002004189640000032
Figure BDA0002004189640000033
Figure BDA0002004189640000034
Figure BDA0002004189640000035
Figure BDA0002004189640000036
gray scale value m in rectangular area1And then:
m1=m11+m12+m13+m14+m15+m16
further, a vertical line l2And a rectangular edge line t1And t3Intersecting: vertical line is l2Then, a coordinate system Ox is established by taking O as a coordinate origin2y2(ii) a Vertical line l2And the edge line t1And t3Cross point Pt1And Pt3(ii) a Respectively passing through point Pt1And Pt3Drawing perpendicular to l2The straight line drawn and the edge line t2And t4Cross point Pt2And Pt4(ii) a Respectively passing through the corner points P of the rectangle1And P3Drawing perpendicular to l2The straight line of (a), the drawn straight line and2meet at point P1l2And P3l2
Straight line Pt1Pt2、Pt3Pt4、P1P1l2、P3P3l2、l2Dividing the rectangular area into six parts, the areas of which are respectively K21、K22、K23、K24、K25、K26Represents; by m21、m22、m23、m24、m25And m26Respectively represent an area of K21、K22、K23、K24、K25And K26The gray value in the region is calculated according to the following formula:
Figure BDA0002004189640000041
Figure BDA0002004189640000042
Figure BDA0002004189640000043
Figure BDA0002004189640000044
Figure BDA0002004189640000045
Figure BDA0002004189640000046
gray scale value m in rectangular area2And then:
m2=m21+m22+m23+m24+m25+m26
further, a vertical line l3And a rectangular edge line t2And t4Intersecting: vertical line is l3Then, a coordinate system Ox is established by taking O as a coordinate origin3y3(ii) a Vertical line l3And the edge line t2And t4Cross point Pt2And Pt4(ii) a Respectively passing through point Pt2And Pt4Drawing perpendicular to l3The straight line drawn and the edge line t1And t3Cross point Pt1And Pt3(ii) a Respectively passing through the corner points P of the rectangle1And P3Drawing perpendicular to l3The straight line of (a), the drawn straight line and3meet at point P1l3And P3l3
Straight line Pt1Pt2、Pt3Pt4、P1P1l3、P3P3l3、l3Dividing the rectangular area into six parts, the areas of which are respectively K31、K32、K33、K34、K35、K36Represents; by m31、m32、m33、m34、m35And m36Respectively represent an area of K31、K32、K33、K34、K35And K36The gray value in the region is calculated according to the following formula:
Figure BDA0002004189640000051
Figure BDA0002004189640000052
Figure BDA0002004189640000053
Figure BDA0002004189640000054
Figure BDA0002004189640000055
Figure BDA0002004189640000056
gray scale value m in rectangular area3And then:
m3=m31+m32+m33+m34+m35+m36
further, a vertical line l4And a rectangular edge line t2And t3Intersect with a vertical line of l4Then, a coordinate system Ox is established by taking O as a coordinate origin4y4(ii) a Vertical line l4And the edge line t2And t3Cross point Pt2And Pt3(ii) a Respectively passing through point Pt2And Pt3Drawing perpendicular to l4The straight line drawn and the edge line t1And t4Cross point Pt1And Pt4(ii) a Respectively passing through the corner points P of the rectangle1And P3Drawing perpendicular to l4The straight line of (a), the drawn straight line and4meet at point P1l4And P3l4
Straight line Pt1Pt2、Pt3Pt4、P1P1l4、P3P3l4、l4Will be rectangularThe area is divided into six parts, the areas of which are respectively K41、K42、K43、K44、K45、K46Represents; by m41、m42、m43、m44、m45And m46Respectively represent an area of K41、K42、K43、K44、K45And K46The gray value in the region is calculated according to the following formula:
Figure BDA0002004189640000061
Figure BDA0002004189640000062
Figure BDA0002004189640000063
Figure BDA0002004189640000064
Figure BDA0002004189640000065
Figure BDA0002004189640000066
gray scale value m in rectangular area4And then:
m4=m41+m42+m43+m44+m45+m46
due to the adoption of the technical scheme, the invention can obtain the following technical effects: and converting the calculation of the gray value in the rectangular area into the calculation of the gray value in the rectangular area after the pixel gray value fitting curve in the rectangular area is integrated. In a rectangular area with the selected pixel-level edge point as the center, a straight line which is fit by all the pixel-level edge points divides the rectangular area into two parts, a straight line which passes through the center of the rectangle and is perpendicular to the fit straight line is divided into two parts, curves are respectively fit by the coordinates and the gray levels of pixels which are passed by the two parts of straight lines in the rectangular area, and the gray values of the rectangular area are obtained after the two fit curves are respectively integrated in the area. The method has the advantages of strong image interference noise resistance, stable calculation process and the like.
Drawings
FIG. 1 is a schematic diagram of a rectangular region centered on a pixel level edge point;
FIG. 2(a) is a pixel level edge point fitting straight line l; (b) rotating the fitting straight line l to the vertical direction;
FIG. 3 is a curve fitted by pixels on both sides of a straight line l' in a "pixel position-pixel gray level" coordinate system;
FIG. 4 is a vertical line l1And a rectangular edge line t1And t4An intersection schematic;
FIG. 5 is a vertical line l2And the edge line t of the rectangular region1And t3An intersection schematic;
FIG. 6 is a vertical line l3And the edge line t of the rectangular region2And t4An intersection schematic;
FIG. 7 is a vertical line l4And the edge line t of the rectangular region2And t3An intersection schematic;
fig. 8 is a flowchart of calculating the gray-level value of the rectangular region.
Detailed Description
The invention is described in further detail below with reference to the following figures and specific examples: the present application is further described by taking this as an example.
Example 1
The embodiment provides a method for calculating the gray level of a rectangular domain on a straight line edge in an image of a laser welding workpiece, which is characterized in that a Canny edge detection algorithm is utilized to obtain a pixel-level edge point (i) of the straight line edge of the workpiece to be welded in the imagek,jk) K is 1,2, … n (n is a pixel level edge)The number of edge points). Computing a pixel-level edge point (i)k,jk) The specific implementation steps of the gray value of the central rectangular area are as follows:
the first step is as follows: determining pixel level edge points and fitting a straight line
Taking a pixel level edge point (i)k,jk) To (i) withk,jk) The center of (2) is a coordinate origin, the horizontal direction is taken as an x axis, and the vertical direction is taken as a y axis to establish a coordinate system Oxy. To (i)k,jk) Is a pixel within a rectangular region of the x 7 of the image to be welded, as shown in fig. 1. In fig. 1, the numbers are the numbers of the pixels, and the number of the pixels is 49.
Pixel-level edge points within the 7 x 7 rectangular region are fitted to a straight line, denoted by l, as shown in FIG. 2 (a). l as a boundary line divides the taken rectangular area into two parts. The rectangular region edge lines are respectively represented by t1、t2、t3And t4Representing, angular points, respectively, by P1、P2、P3、P4And P4And (4) showing. Drawing a straight line l' perpendicular to the line l through the origin O, wherein the intersection point of the two straight lines is P0
As shown in fig. 2(b), a coordinate system Ox ' y ' is established by rotating the rectangular area with O as the center and the straight lines l to l as the vertical direction, and with O as the origin of coordinates and the straight line l ' as the abscissa; on the y' axis, with P0Is a demarcation point divided into a straight line l 'of'LAnd l'RTwo parts.
Line segment lLAnd lRIs composed of pixel points. Using O as the origin of coordinates and lLAnd lRThe pixel position is an abscissa, and a pixel position-pixel gray scale coordinate system is established by taking the pixel gray scale as an ordinate. L 'in a "pixel position-pixel grayscale" coordinate system'LAnd l'RFitting the coordinates and gray values of the upper pixel points to obtain a secondary curve l'LhAnd l'RhAs shown in fig. 3. The fitted curve is represented as: l'Lh:y=a1+b1x+c1x2;l'Rh:y=a2+b2x+c2x2
Rectangular area is revolvedIn the coordinate system Ox 'y' established after the conversion, taking the straight line l as a boundary, the change rule of the pixels passing through the horizontal lines on the left and right sides of the straight line l in the coordinate system of 'pixel position-pixel gray scale' and the fitting curve l 'are'LhAnd l'RhAs shown in fig. 3.
The second step is that: calculation of the grey values of rectangular areas
The selected 7 x 7 range region is rotated with O as the origin of coordinates, and l after the rotation is the vertical line. Vertical line and selected 7 x 7 zone edge line t1、t2、t3And t4There are four positional relationships, and the vertical line in each of the four cases is represented by l1、l2、l3And l4And (4) showing. In four cases, the gray-level value calculation method for the rectangular region is as follows:
1) vertical line l1And a rectangular edge line t1And t4At the time of intersection
As shown in fig. 4, the vertical line is l1Then, a coordinate system Ox is established by taking O as a coordinate origin1y1. The edge lines and the corner points of the rotated rectangular area still use t1、t2、t3、t4And P1、P2、P3、P4、P4And (4) showing. Vertical line l1And the edge line t1And t4Cross point Pt1And Pt4. Respectively passing through point Pt1And Pt4Drawing perpendicular to l1The straight line drawn and the edge line t2And t3Cross point Pt2And Pt3. Respectively passing through the corner points P of the rectangle1And P3Drawing perpendicular to l1The straight line of (a), the drawn straight line and1meet at point P1l1And P3l1
Straight line Pt1Pt2、Pt3Pt4、P1P1l1、l1Dividing the rectangular area into six parts, the areas of which are respectively K11、K12、K13、K14、K15、K16And (4) showing. By m11、m12、m13、m14、m15And m16Respectively represent an area of K11、K12、K13、K14、K15And K16The gray-value in the area is,
Figure BDA0002004189640000091
Figure BDA0002004189640000092
gray scale value m in rectangular area1And then: m is1=m11+m12+m13+m14+m15+m16
2) Vertical line l2And a rectangular edge line t1And t3At the time of intersection
As shown in fig. 5, the vertical line is l2Then, a coordinate system Ox is established by taking O as a coordinate origin2y2. The edge lines and the corner points of the rotated rectangular area still use t1、t2、t3、t4And P1、P2、P3、P4、P4And (4) showing. Vertical line l2And the edge line t1And t3Cross point Pt1And Pt3. Respectively passing through point Pt1And Pt3Drawing perpendicular to l2The straight line drawn and the edge line t2And t4Cross point Pt2And Pt4. Respectively passing through the corner points P of the rectangle1And P3Drawing perpendicular to l2The straight line of (a), the drawn straight line and2meet at point P1l2And P3l2
Straight line Pt1Pt2、Pt3Pt4、P1P1l2、P3P3l2、l2Dividing the rectangular area into six parts, the areas of which are respectively K21、K22、K23、K24、K25、K26And (4) showing. By m21、m22、m23、m24、m25And m26Respectively represent an area of K21、K22、K23、K24、K25And K26The gray-value in the area is,
Figure BDA0002004189640000093
Figure BDA0002004189640000094
gray scale value m in rectangular area2And then: m is2=m21+m22+m23+m24+m25+m26
3) Vertical line l3And a rectangular edge line t2And t4At the time of intersection
As shown in fig. 6, the vertical line is l3Then, a coordinate system Ox is established by taking O as a coordinate origin3y3. The edge lines and the corner points of the rotated rectangular area still use t1、t2、t3、t4And P1、P2、P3、P4、P4And (4) showing. Vertical line l3And the edge line t2And t4Cross point Pt2And Pt4. Respectively passing through point Pt2And Pt4Drawing perpendicular to l3The straight line drawn and the edge line t1And t3Cross point Pt1And Pt3. Respectively passing through the corner points P of the rectangle1And P3Drawing perpendicular to l3The straight line of (a), the drawn straight line and3meet at point P1l3And P3l3
Straight line Pt1Pt2、Pt3Pt4、P1P1l3、P3P3l3、l3Dividing the rectangular area into six parts, the areas of which are respectively K31、K32、K33、K34、K35、K36And (4) showing. By m31、m32、m33、m34、m35And m36Respectively represent an area of K31、K32、K33、K34、K35And K36The gray-value in the area is,
Figure BDA0002004189640000101
Figure BDA0002004189640000102
gray scale value m in rectangular area3And then: m is3=m31+m32+m33+m34+m35+m36
4) Vertical line l4And a rectangular edge line t2And t3At the time of intersection
As shown in fig. 7, the vertical line is l4Then, a coordinate system Ox is established by taking O as a coordinate origin4y4. The edge lines and the corner points of the rotated rectangular area still use t1、t2、t3、t4And P1、P2、P3、P4、P4And (4) showing. Vertical line l4And the edge line t2And t3Cross point Pt2And Pt3. Respectively passing through point Pt2And Pt3Drawing perpendicular to l4The straight line drawn and the edge line t1And t4Cross point Pt1And Pt4. Respectively passing through the corner points P of the rectangle1And P3Drawing perpendicular to l4The straight line of (a), the drawn straight line and4meet at point P1l4And P3l4
Straight line Pt1Pt2、Pt3Pt4、P1P1l4、P3P3l4、l4Dividing the rectangular area into six parts, the areas of which are respectively K41、K42、K43、K44、K45、K46And (4) showing. By m41、m42、m43、m44、m45And m46Respectively represent an area of K41、K42、K43、K44、K45And K46The gray-value in the area is,
Figure BDA0002004189640000111
Figure BDA0002004189640000112
gray scale value m in rectangular area4And then: m is4=m41+m42+m43+m44+m45+m46
The flowchart of calculating the gray scale value of the rectangular region is shown in fig. 8.
And sequentially selecting the edge points of each pixel level, and repeating the steps to obtain the gray value of the rectangular area taking the edge points of each pixel level as the center.
The above description is only for the purpose of creating a preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can substitute or change the technical solution and the inventive concept of the present invention within the technical scope of the present invention.

Claims (4)

1. A method for calculating the gray level of a rectangular domain on the edge of a straight line in an image of a workpiece to be welded by laser welding is characterized by specifically comprising the following steps: first, a pixel-level edge point (i) is takenk,jk) To (i) withk,jk) The center of the coordinate system is taken as a coordinate origin, the horizontal direction is taken as an x axis, and the vertical direction is taken as a y axis to establish a coordinate system Oxy; to (i)k,jk) Taking pixels in a rectangular region of 7 gamma 7 in an image to be welded; pixel-level edge points in the 7 gamma 7 rectangular region are fitted with straight lines, and the fitted straight lines are represented by l; drawing a straight line l' perpendicular to l through the origin of coordinates O, the intersection point P0(ii) a Then, rotating the rectangular area until l is in the vertical direction and l' is in the horizontal direction; l' on P0Respectively fitting a quadratic curve to the coordinates and the gray values of the pixels on the two sides; finally, calculating the gray value in the rectangular area according to the change curve of the pixels on two sides of the straight line l in the horizontal direction in a pixel position-pixel gray level coordinate system; sequentially selecting each pixel level edge point, and repeating the steps to obtain a rectangular area gray value taking each pixel level edge point as a center;
the rectangular region edge lines are respectively represented by t1、t2、t3And t4Representing, angular points, respectively, by P1、P2、P3And P4Represents; l is used as a boundary line to divide the taken rectangular area into two parts; drawing a straight line l' perpendicular to the line l through the origin O, wherein the intersection point of the two straight lines is P0
Rotating the rectangular area and the l to the vertical direction and the l 'to the horizontal direction simultaneously by taking O as a center, and establishing a coordinate system Ox' y 'by taking O as a coordinate origin and taking a straight line l' as a horizontal coordinate; on the horizontal axis, in P0Is a demarcation point divided into a straight line l 'of'LAnd l'RTwo sections;
line segment lLAnd lRIs composed of pixel points; using O as the origin of coordinates and lLAnd lRThe pixel position is an abscissa, and a pixel position-pixel gray scale coordinate system is established by taking the pixel gray scale as an ordinate; from P in the "pixel position-pixel grey" coordinate systemLAnd PRFitting coordinates and gray values of intermediate pixel points to obtain a secondary curve l'LhAnd l'RhThe fitted curve is expressed as:
l'Lh:y=a1+b1x+c1x2
l'Rh:y=a2+b2x+c2x2
l 'can be obtained by curve fitting'LhAnd l'RhCoefficient (a) of1,b1,c1) And (a)2,b2,c2) In the coordinate system Ox 'y' created after the rectangular region is rotated, the change rule of the pixels passing through the horizontal lines on the left and right sides of the straight line l in the "pixel position-pixel gray level" coordinate system and the fitting curve l 'are determined by taking the straight line l as a boundary'LhAnd l'RhAre identical to each other;
Vertical line l and selected 7 x 7 zone edge line t in coordinate system Ox' y1、t2、t3And t4There are four positional relationships, and the vertical line in each of the four cases is represented by l1、l2、l3And l4Represents;
vertical line l1And a rectangular edge line t1And t4Intersecting: vertical line is l1Then, a coordinate system Ox is established by taking O as a coordinate origin1y1(ii) a Vertical line l1And the edge line t1Cross point Pt1Vertical line l1And the edge line t4Cross point Pt4Respectively passing through point Pt1And Pt4Drawing perpendicular to l1The straight line drawn and the edge line t2And t3Cross point Pt2And Pt3(ii) a Respectively passing through the corner points P of the rectangle1And P3Drawing perpendicular to l1The straight line of (a), the drawn straight line and1meet at point P1l1And P3l1
Straight line Pt1Pt2、Pt3Pt4、P1P1l1、l1Dividing the rectangular area into six parts, the areas of which are respectively K11、K12、K13、K14、K15、K16Represents; by m11、m12、m13、m14、m15And m16Respectively represent an area of K11、K12、K13、K14、K15And K16The gray value in the region is calculated according to the following formula:
Figure FDA0002911917620000021
Figure FDA0002911917620000022
Figure FDA0002911917620000023
Figure FDA0002911917620000024
Figure FDA0002911917620000025
Figure FDA0002911917620000026
gray scale value m in rectangular area1And then:
m1=m11+m12+m13+m14+m15+m16
2. the method for calculating the gray scale of the rectangular area on the edge of the straight line in the image of the workpiece to be welded by laser welding according to claim 1, wherein the vertical line l2And a rectangular edge line t1And t3Intersecting: vertical line is l2Then, a coordinate system Ox is established by taking O as a coordinate origin2y2(ii) a Vertical line l2And the edge line t1And t3Cross point Pt1And Pt3(ii) a Respectively passing through point Pt1And Pt3Drawing perpendicular to l2The straight line drawn and the edge line t2And t4Cross point Pt2And Pt4(ii) a Respectively passing through the corner points P of the rectangle1And P3Drawing perpendicular to l2The straight line of (a), the drawn straight line and2meet at point P1l2And P3l2
Straight line Pt1Pt2、Pt3Pt4、P1P1l2、P3P3l2、l2Divide the rectangular area into six partsRespectively, its area is K21、K22、K23、K24、K25、K26Represents; by m21、m22、m23、m24、m25And m26Respectively represent an area of K21、K22、K23、K24、K25And K26The gray value in the region is calculated according to the following formula:
Figure FDA0002911917620000031
Figure FDA0002911917620000032
Figure FDA0002911917620000033
Figure FDA0002911917620000034
Figure FDA0002911917620000035
Figure FDA0002911917620000036
gray scale value m in rectangular area2And then:
m2=m21+m22+m23+m24+m25+m26
3. laser welding of an image of a workpiece to be welded according to claim 1The method for calculating the gray level of the rectangular domain on the edge of the straight line is characterized in that the vertical line l3And a rectangular edge line t2And t4Intersecting: vertical line is l3Then, a coordinate system Ox is established by taking O as a coordinate origin3y3(ii) a Vertical line l3And the edge line t2And t4Cross point Pt2And Pt4(ii) a Respectively passing through point Pt2And Pt4Drawing perpendicular to l3The straight line drawn and the edge line t1And t3Cross point Pt1And Pt3(ii) a Respectively passing through the corner points P of the rectangle1And P3Drawing perpendicular to l3The straight line of (a), the drawn straight line and3meet at point P1l3And P3l3
Straight line Pt1Pt2、Pt3Pt4、P1P1l3、P3P3l3、l3Dividing the rectangular area into six parts, the areas of which are respectively K31、K32、K33、K34、K35、K36Represents; by m31、m32、m33、m34、m35And m36Respectively represent an area of K31、K32、K33、K34、K35And K36The gray value in the region is calculated according to the following formula:
Figure FDA0002911917620000041
Figure FDA0002911917620000042
Figure FDA0002911917620000043
Figure FDA0002911917620000044
Figure FDA0002911917620000045
Figure FDA0002911917620000046
gray scale value m in rectangular area3And then:
m3=m31+m32+m33+m34+m35+m36
4. the method for calculating the gray scale of the rectangular area on the edge of the straight line in the image of the workpiece to be welded by laser welding according to claim 1, wherein the vertical line l4And a rectangular edge line t2And t3Intersect with a vertical line of l4Then, a coordinate system Ox is established by taking O as a coordinate origin4y4Vertical line l4And the edge line t2And t3Cross point Pt2And Pt3(ii) a Respectively passing through point Pt2And Pt3Drawing perpendicular to l4The straight line drawn and the edge line t1And t4Cross point Pt1And Pt4(ii) a Respectively passing through the corner points P of the rectangle1And P3Drawing perpendicular to l4The straight line of (a), the drawn straight line and4meet at point P1l4And P3l4
Straight line Pt1Pt2、Pt3Pt4、P1P1l4、P3P3l4、l4Dividing the rectangular area into six parts, the areas of which are respectively K41、K42、K43、K44、K45、K46Represents; by m41、m42、m43、m44、m45And m46Respectively represent an area ofK41、K42、K43、K44、K45And K46The gray value in the region is calculated according to the following formula:
Figure FDA0002911917620000051
Figure FDA0002911917620000052
Figure FDA0002911917620000053
Figure FDA0002911917620000054
Figure FDA0002911917620000055
Figure FDA0002911917620000056
gray scale value m in rectangular area4And then:
m4=m41+m42+m43+m44+m45+m46
CN201910222879.7A 2019-03-22 2019-03-22 Method for calculating gray level of rectangular domain on straight line edge in laser welding workpiece image Active CN109949328B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910222879.7A CN109949328B (en) 2019-03-22 2019-03-22 Method for calculating gray level of rectangular domain on straight line edge in laser welding workpiece image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910222879.7A CN109949328B (en) 2019-03-22 2019-03-22 Method for calculating gray level of rectangular domain on straight line edge in laser welding workpiece image

Publications (2)

Publication Number Publication Date
CN109949328A CN109949328A (en) 2019-06-28
CN109949328B true CN109949328B (en) 2021-04-02

Family

ID=67010552

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910222879.7A Active CN109949328B (en) 2019-03-22 2019-03-22 Method for calculating gray level of rectangular domain on straight line edge in laser welding workpiece image

Country Status (1)

Country Link
CN (1) CN109949328B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6408109B1 (en) * 1996-10-07 2002-06-18 Cognex Corporation Apparatus and method for detecting and sub-pixel location of edges in a digital image
CN101137003A (en) * 2007-10-15 2008-03-05 北京航空航天大学 Gray associated analysis based sub-pixel fringe extracting method
CN102107374A (en) * 2011-02-01 2011-06-29 吉林大学 On-line detection method for diameter size of shaft disc type part
CN102737377A (en) * 2012-05-14 2012-10-17 上海瑞伯德智能系统科技有限公司 Improved method for extracting sub-pixel edge
CN104715491A (en) * 2015-04-09 2015-06-17 大连理工大学 Subpixel edge detection method based on one-dimensional gray moment
CN107328371A (en) * 2017-05-22 2017-11-07 四川大学 Sub-pix contours extract based on Gaussian and the optimization using Softmax recurrence in the case where metal plate detects scene

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8139886B2 (en) * 2008-06-23 2012-03-20 Microsoft Corporation Blur estimation
CN103759648B (en) * 2014-01-28 2016-05-25 华南理工大学 A kind of complicated angle welding method for detecting position based on Binocular stereo vision with laser
CN104668739B (en) * 2015-03-10 2016-10-05 华南理工大学 A kind of gas metal-arc welding weld seam recognition vision sensor

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6408109B1 (en) * 1996-10-07 2002-06-18 Cognex Corporation Apparatus and method for detecting and sub-pixel location of edges in a digital image
US6690842B1 (en) * 1996-10-07 2004-02-10 Cognex Corporation Apparatus and method for detection and sub-pixel location of edges in a digital image
CN101137003A (en) * 2007-10-15 2008-03-05 北京航空航天大学 Gray associated analysis based sub-pixel fringe extracting method
CN102107374A (en) * 2011-02-01 2011-06-29 吉林大学 On-line detection method for diameter size of shaft disc type part
CN102737377A (en) * 2012-05-14 2012-10-17 上海瑞伯德智能系统科技有限公司 Improved method for extracting sub-pixel edge
CN104715491A (en) * 2015-04-09 2015-06-17 大连理工大学 Subpixel edge detection method based on one-dimensional gray moment
CN107328371A (en) * 2017-05-22 2017-11-07 四川大学 Sub-pix contours extract based on Gaussian and the optimization using Softmax recurrence in the case where metal plate detects scene

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
工件图像亚像素边缘检测方法的研究;陈阳;《中国优秀硕士学位论文全文数据库 信息利技辑》;20120715;正文第2-5章 *

Also Published As

Publication number Publication date
CN109949328A (en) 2019-06-28

Similar Documents

Publication Publication Date Title
CN109903279B (en) Automatic teaching method and device for welding seam movement track
US11072078B2 (en) Method for measuring pose of robotic end tool
Chang et al. A new seam-tracking algorithm through characteristic-point detection for a portable welding robot
US8706300B2 (en) Method of controlling a robotic tool
CN105855668B (en) The online welding seam tracking method of straight line of arc welding robot welding
CN104552341B (en) Mobile industrial robot single-point various visual angles pocket watch position and attitude error detection method
CN108907526A (en) A kind of weld image characteristic recognition method with high robust
CN109732255A (en) A kind of welding method and welding robot
EP3630404B1 (en) An apparatus and a method for automated seam welding of a work piece comprising a base plate with a pattern of upstanding profiles
CN114905507A (en) Welding robot precision control method based on environment vision analysis
CN112847353A (en) Multi-segment welding seam track correction method based on offline programming software
Liu et al. Welding seam recognition and tracking for a novel mobile welding robot based on multi-layer sensing strategy
CN113660473A (en) Auxiliary positioning method based on projector
CN109949328B (en) Method for calculating gray level of rectangular domain on straight line edge in laser welding workpiece image
CN110153582B (en) Welding scheme generation method and device and welding system
KR102634601B1 (en) Method for welding members using 3D depth sensor
MacMillan et al. Planar image-space trajectory planning algorithm for contour following in robotic machining
Li et al. Narrow weld joint recognition method based on laser profile sensor
CN109949327B (en) Method for calculating gray level of circular domain on straight line edge in image of to-be-welded part in laser tailor-welding
CN109934820B (en) Method for detecting linear edge sub-pixels in laser tailor-welded workpiece image
CN109934819B (en) Method for detecting curve edge sub-pixel in laser tailor-welded workpiece image
CN109978853B (en) Method for calculating deviation between welding position and welding seam in linear welding seam laser tailor-welding
CN116604228A (en) Three-way intelligent welding method
DE19829661A1 (en) Computer-aided robot control sequence generation method
CN111151932A (en) Welding control method of thick plate welding robot

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
OL01 Intention to license declared
OL01 Intention to license declared