CN112767491B - Method and device for determining weld bead inflection point and computer readable storage medium - Google Patents
Method and device for determining weld bead inflection point and computer readable storage medium Download PDFInfo
- Publication number
- CN112767491B CN112767491B CN202110375007.1A CN202110375007A CN112767491B CN 112767491 B CN112767491 B CN 112767491B CN 202110375007 A CN202110375007 A CN 202110375007A CN 112767491 B CN112767491 B CN 112767491B
- Authority
- CN
- China
- Prior art keywords
- point
- initial
- determining
- inflection point
- seed
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
- G06T7/73—Determining position or orientation of objects or cameras using feature-based methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/155—Segmentation; Edge detection involving morphological operators
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20004—Adaptive image processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
- G06T2207/30152—Solder
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
Abstract
The application provides a method and a device for determining a weld bead inflection point and a computer-readable storage medium. The method comprises the following steps: acquiring an initial welding bead image; preprocessing the initial welding bead image to obtain a contour welding bead image; determining the initial position of the seed point according to the profile welding bead image; determining the position of an end point according to the initial position of the seed point; and determining the position of the final inflection point of the weld bead according to the initial position of the seed point and the position of the end point. According to the method, the position of an end point is determined according to the initial position of the seed point, and the position of a final inflection point is determined according to the position of the end point and the initial position of the seed point.
Description
Technical Field
The application relates to the field of welding beads, in particular to a method and a device for determining a welding bead inflection point, a computer-readable storage medium, a processor and a welding system.
Background
At present, a double-inflection point detection method generally adopts straight line detection, and obtains an intersection point between an edge line and a weld bead edge line, determines the intersection point as a weld inflection point, and then performs welding, however, in practical applications, when the weld bead edge line is unclear or the straightness of the edge line is inaccurate or a diffraction straight line exists in an image, as shown in fig. 1 and 2, the accuracy of the detected inflection point (a first inflection point 01 and a second inflection point 02 in fig. 1 and 2) is greatly reduced, resulting in poor welding effect. Therefore, a method for accurately obtaining the inflection point of the bead is needed to improve the welding effect.
The above information disclosed in this background section is only for enhancement of understanding of the background of the technology described herein and, therefore, certain information may be included in the background that does not form the prior art that is already known in this country to a person of ordinary skill in the art.
Disclosure of Invention
The application mainly aims to provide a method and a device for determining a weld bead inflection point, a computer-readable storage medium, a processor and a welding system, so as to solve the problem that the weld bead inflection point cannot be accurately obtained in the prior art.
According to an aspect of an embodiment of the present invention, there is provided a method of determining a bead inflection point, including: acquiring an initial welding bead image; preprocessing the initial welding bead image to obtain a contour welding bead image; determining the initial position of a seed point according to the profile welding bead image; determining the position of an end point according to the initial position of the seed point; and determining the position of a final inflection point of the weld bead according to the initial position of the seed point and the position of the end point.
Optionally, preprocessing the initial weld bead image to obtain a contour weld bead image, including: processing the initial welding bead image by adopting an image enhancement algorithm to obtain a first welding bead image; processing the first welding bead image by adopting a self-adaptive threshold segmentation algorithm to obtain a second welding bead image; processing the second welding bead image by adopting a median filtering algorithm to obtain a third welding bead image; and processing the third welding bead image by adopting a morphological algorithm to obtain the outline welding bead image.
Optionally, determining an initial position of a seed point according to the profile weld bead image includes: obtaining the position of a preset pixel point in the outline welding bead image, wherein the preset pixel point is a pixel point at one end of the welding bead and the pixel value of the preset pixel point is a first preset value; and determining the initial position of the seed point according to the position of the preset pixel point.
Optionally, obtaining the position of a predetermined pixel point in the profile weld bead image includes: acquiring the position of a first preset pixel point in the outline weld bead image, wherein the first preset pixel point is the preset pixel point at one end of the weld bead in the outline weld bead image; obtaining a position of a second predetermined pixel point in the profile weld bead image, where the second predetermined pixel point is the predetermined pixel point at the other end of the weld bead in the profile weld bead image, and determining the initial position of the seed point according to the position of the predetermined pixel point, including: determining a first initial position of a first seed point according to the position of the first preset pixel point; and determining a second initial position of the second seed point according to the position of the second preset pixel point.
Optionally, determining a first initial position of the first seed point according to the position of the first predetermined pixel point includes: determining that the position of the first predetermined pixel point is the first initial position of the first seed point under the condition that a first region exists, wherein the first region is a region including a first upper boundary line and a first lower boundary line, the first upper boundary line is a boundary line passing through one first predetermined pixel point, the first lower boundary line is a boundary line passing through another first predetermined pixel point, the first upper boundary line and the first lower boundary line are parallel, and determining a second initial position of a second seed point according to the position of the second predetermined pixel point comprises: and under the condition that a second region exists, determining that the position of the second preset pixel point is the second initial position of the second seed point, wherein the second region is a region comprising a second upper boundary line and a second lower boundary line, the second upper boundary line is a boundary line passing through one second preset pixel point, the second lower boundary line is a boundary line passing through the other second preset pixel point, and the second upper boundary line is parallel to the second lower boundary line.
Optionally, determining a position of an endpoint according to the initial position of the seed point includes: adopting a region growing algorithm to control the first seed point to grow from the first initial position and along a first preset direction, and under the condition that the pixel value of the first seed point is greater than a second preset value, determining that the current position of the first seed point is the position of a first end point, wherein the first preset direction is parallel to the direction of the length extension direction of the weld bead; and controlling the second seed point to grow from the second initial position and along a second preset direction by adopting a region growing algorithm, and determining that the current position of the second seed point is the position of a second endpoint under the condition that the pixel value of the second seed point is greater than the second preset value, wherein the second preset direction is opposite to the first preset direction.
Optionally, determining a position of a final inflection point of the weld bead according to the initial position of the seed point and the position of the end point, including: determining whether an initial inflection point exists between the initial position of the seed point and the position of the endpoint; under the condition that the initial inflection point exists, determining the position of the final inflection point according to the relation between the initial position of the seed point and the position of the endpoint; in the absence of the initial inflection point, determining the location of the endpoint as the location of the final inflection point.
Optionally, determining whether there is an initial inflection point between the initial position of the seed point and the position of the endpoint comprises: and determining that the initial inflection point exists when the seed point moves to a position where the pixel value is equal to a third predetermined value and the current position of the seed point is different from the position of the end point, and determining that the seed point of the current position is the initial inflection point.
Optionally, when the seed point includes a first seed point and a second seed point, and the endpoints include a first endpoint corresponding to the first seed point and a second endpoint corresponding to the second seed point, determining that the initial inflection point exists in a case where the seed point moves to a pixel value equal to a third predetermined value and a current position of the seed point is different from a position of the endpoint, and determining that the seed point of the current position is the initial inflection point includes: determining that a first initial inflection point exists if the first seed point moves to a position where the pixel value is equal to the third predetermined value and the current position of the first seed point is different from the position of the first endpoint, the first seed point of the current position being determined to be the first initial inflection point; determining that a second initial inflection point exists if the second seed point moves to a position where the pixel value is equal to the third predetermined value and the current position of the second seed point is different from the position of the second endpoint, the second seed point of the current position being determined to be the second initial inflection point.
Optionally, in a case where the initial inflection point exists, determining a position of the final inflection point according to a relationship between the initial position of the seed point and a position of the endpoint includes: determining whether a coordinate value of a position of the first endpoint is less than a coordinate value of a position of the first initial inflection point, in a case where the first initial inflection point exists between the initial position of the first seed point and the position of the first endpoint; determining that the position of the first endpoint is the position of a first final inflection point when it is determined that the coordinate value of the position of the first endpoint is less than the coordinate value of the position of the first initial inflection point; determining the position of the first initial inflection point as the position of the first final inflection point, in case that it is determined that the coordinate value of the position of the first endpoint is greater than the coordinate value of the position of the first initial inflection point.
Optionally, in a case where the initial inflection point exists, determining a position of the final inflection point according to a relationship between the initial position of the seed point and a position of the endpoint includes: determining whether the coordinate value of the position of the second endpoint is greater than the coordinate value of the position of the second initial inflection point, in case the second initial inflection point exists between the initial position of the second seed point and the position of the second endpoint; determining that the position of the second endpoint is the position of a second final inflection point when it is determined that the coordinate value of the position of the second endpoint is greater than the coordinate value of the position of the second initial inflection point; determining the position of the second initial inflection point as the position of the second final inflection point, in case that it is determined that the coordinate value of the position of the second endpoint is less than the coordinate value of the position of the second initial inflection point.
Optionally, in a case where the initial inflection point is not present, determining that the position of the endpoint is the position of the final inflection point includes: determining the position of the first endpoint as the position of a first final inflection point in the absence of the first initial inflection point; in the absence of the second initial inflection point, determining the location of the second endpoint as the location of a second final inflection point.
According to another aspect of the embodiments of the present invention, there is also provided an apparatus for determining a bead inflection point, including: an acquisition unit configured to acquire an initial weld bead image; the preprocessing unit is used for preprocessing the initial welding bead image to obtain a contour welding bead image; the first determining unit is used for determining the initial position of the seed point according to the outline welding bead image; a second determining unit, configured to determine a position of an endpoint according to the initial position of the seed point; and a third determining unit, configured to determine a position of a final inflection point of the weld bead according to the initial position of the seed point and the position of the end point.
According to still another aspect of embodiments of the present invention, there is also provided a computer-readable storage medium including a stored program, wherein the program executes any one of the methods.
According to still another aspect of the embodiments of the present invention, there is further provided a processor, configured to execute a program, where the program executes any one of the methods.
According to another aspect of the embodiments of the present invention, there is also provided a welding system, including: a welding device; a means for determining a point of inflection of the weld bead, communicatively coupled to the welding device, the means for determining a point of inflection of the weld bead being configured to perform any of the methods described herein.
In the embodiment of the invention, most irrelevant information in the initial welding bead image can be removed by preprocessing the acquired initial welding bead image to obtain the outline welding bead image, the accurate initial position of the seed point can be obtained according to the outline welding bead image subsequently, the position of the end point is determined according to the initial position of the seed point, and the accurate position of the final inflection point of the welding bead can be obtained according to the initial position of the seed point and the position of the end point finally. In the method, the position where the change occurs in the growth process of the seed point is not necessarily determined as the position of the inflection point, and the intersection point between the edge line and the weld bead edge line is also not necessarily determined as the inflection point, but the position of an end point is determined according to the initial position of the seed point, and then the position of the final inflection point is determined according to the position of the end point and the initial position of the seed point.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the application and, together with the description, serve to explain the application and are not intended to limit the application. In the drawings:
FIG. 1 shows a diagram of inflection points captured in the prior art;
FIG. 2 is a schematic diagram illustrating another derived inflection point in the prior art;
fig. 3 is a schematic flow chart illustrating a method for determining a bead inflection point according to an embodiment of the present application;
fig. 4 is a schematic structural diagram illustrating a device for determining a bead inflection point according to an embodiment of the present application.
Wherein the figures include the following reference numerals:
01. a first inflection point; 02. a second inflection point.
Detailed Description
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It will be understood that when an element such as a layer, film, region, or substrate is referred to as being "on" another element, it can be directly on the other element or intervening elements may also be present. Also, in the specification and claims, when an element is described as being "connected" to another element, the element may be "directly connected" to the other element or "connected" to the other element through a third element.
As described in the background, in order to solve the above problems, according to an exemplary embodiment of the present invention, a method, an apparatus, a computer-readable storage medium, a processor, and a welding system for determining a bead inflection point are provided.
According to an embodiment of the present application, a method of determining a bead inflection point is provided.
Fig. 3 is a flowchart of a method of determining a bead inflection point according to an embodiment of the present application. As shown in fig. 3, the method comprises the steps of:
step S101, acquiring an initial welding bead image;
step S102, preprocessing the initial welding bead image to obtain a contour welding bead image;
step S103, determining the initial position of the seed point according to the contour weld bead image;
step S104, determining the position of an end point according to the initial position of the seed point;
step S105 determines the position of the final inflection point of the weld bead based on the initial position of the seed point and the position of the end point.
According to the method, most irrelevant information in the initial welding bead image can be removed by preprocessing the acquired initial welding bead image, the outline welding bead image is obtained, the accurate initial position of the seed point can be obtained according to the outline welding bead image subsequently, the position of the end point is determined according to the initial position of the seed point, and the accurate position of the final inflection point of the welding bead can be obtained according to the initial position of the seed point and the position of the end point finally. In the method, the position where the change occurs in the growth process of the seed point is not necessarily determined as the position of the inflection point, and the intersection point between the edge line and the weld bead edge line is also not necessarily determined as the inflection point, but the position of an end point is determined according to the initial position of the seed point, and then the position of the final inflection point is determined according to the position of the end point and the initial position of the seed point.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
In an embodiment of the present application, the preprocessing the initial weld bead image to obtain a contour weld bead image includes: processing the initial welding bead image by adopting an image enhancement algorithm to obtain a first welding bead image; processing the first welding bead image by adopting a self-adaptive threshold segmentation algorithm to obtain a second welding bead image; processing the second welding bead image by adopting a median filtering algorithm to obtain a third welding bead image; and processing the third welding bead image by adopting a morphological algorithm to obtain the outline welding bead image. In this embodiment, the initial weld bead image is processed by an image enhancement algorithm, so that the edges in the image become clearly visible, a clearer first welding channel image can be obtained, the first welding channel image is processed through an adaptive threshold value segmentation algorithm, the second welding channel image can be obtained, the second welding channel image is a binary image, so that the image can be processed more quickly, the second welding channel image is processed through a median filtering algorithm, the noise points in the image can be reduced, most irrelevant information in the initial welding bead image can be further removed, the third welding bead image is processed through a morphological algorithm, the method can repair the discontinuous outline weld bead in the second weld bead image, can further obtain a more accurate and clear outline weld bead image, and ensures that the accuracy of the subsequent determination of the initial position of the seed point is higher.
It should be further noted that the image enhancement algorithm may be a common laplacian image enhancement algorithm, but is not limited to the laplacian image enhancement algorithm, and may also be any suitable image enhancement algorithm in the prior art, and those skilled in the art may select a suitable image enhancement algorithm to process the initial weld bead image according to the actual situation.
In another embodiment of the present application, determining an initial position of a seed point according to the above-mentioned outline bead image includes: acquiring the position of a preset pixel point in the outline welding bead image, wherein the preset pixel point is a pixel point at one end of the welding bead and the pixel value of the preset pixel point is a first preset value; and determining the initial position of the seed point according to the position of the preset pixel point. In this embodiment, the initial position of the seed point can be accurately determined by the position of the predetermined pixel point.
It should be noted that the first predetermined value may be 0, 50, or 100, and certainly, the first predetermined value is not limited to these, and a person skilled in the art may select any feasible first predetermined value according to practical situations.
In another embodiment of the present application, obtaining the position of the predetermined pixel point in the profile weld bead image includes: acquiring the position of a first preset pixel point in the outline welding bead image, wherein the first preset pixel point is the preset pixel point at one end of the welding bead in the outline welding bead image; obtaining a position of a second predetermined pixel point in the profile weld bead image, where the second predetermined pixel point is the predetermined pixel point at the other end of the weld bead in the profile weld bead image, and determining the initial position of the seed point according to the position of the predetermined pixel point, including: determining a first initial position of a first seed point according to the position of the first preset pixel point; and determining a second initial position of the second seed point according to the position of the second preset pixel point. In this embodiment, the initial positions of the two seed points can be accurately determined according to the positions of the two predetermined pixel points, and subsequently, the positions of the endpoints can be further accurately determined, so that subsequently, the position of the inflection point can be more accurately determined, and the obtained inflection point is further ensured to be more accurate.
In another embodiment of the present application, determining a first initial position of a first seed point according to a position of the first predetermined pixel point includes: in a case where there is a first area, the determining of the position of the first predetermined pixel point as the first initial position of the first seed point, the first area being an area including a first upper boundary line and a first lower boundary line, the first upper boundary line being a boundary line passing through one of the first predetermined pixel points, the first lower boundary line being a boundary line passing through another one of the first predetermined pixel points, the first upper boundary line and the first lower boundary line being parallel, the determining of the second initial position of the second seed point based on the position of the second predetermined pixel point includes: and determining the position of the second predetermined pixel point as the second initial position of the second seed point in the case where a second region is present, the second region being a region including a second upper boundary line and a second lower boundary line, the second upper boundary line being a boundary line passing through one of the second predetermined pixel points, the second lower boundary line being a boundary line passing through another one of the second predetermined pixel points, the second upper boundary line being parallel to the second lower boundary line. In the embodiment, the initial positions of the two seed points can be further accurately determined, so that the position of the endpoint can be further accurately determined subsequently, and the position of the inflection point can be further accurately determined subsequently.
In a specific embodiment of the present application, determining the position of the endpoint according to the initial position of the seed point includes: controlling the first seed point to grow from the first initial position and along a first preset direction by adopting a region growing algorithm, and determining that the current position of the first seed point is the position of a first end point when the pixel value of the first seed point is greater than a second preset value, wherein the first preset direction is parallel to the direction of the length extension direction of the weld bead; and controlling the second seed point to grow from the second initial position and along a second predetermined direction by using a region growing algorithm, and determining that the current position of the second seed point is a position of a second end point when the pixel value of the second seed point is greater than the second predetermined value, wherein the second predetermined direction is opposite to the first predetermined direction. In this embodiment, when the seed point grows until the pixel value is greater than the second predetermined value, it is characterized that the seed point has grown outside the weld bead profile at this time, the current position of the seed point is determined as the position of the end point, and the seed point stops growing.
It should be noted that the second predetermined value may be 200, 400, or 510, and certainly, the second predetermined value is not limited to these, and a person skilled in the art may select any feasible second predetermined value according to practical situations, and the second predetermined value is different from the first predetermined value.
In another embodiment of the present invention, determining a position of a final inflection point of a weld bead according to the initial position of the seed point and the position of the end point includes: determining whether an initial inflection point exists between the initial position of the seed point and the position of the end point; determining a position of the final inflection point based on a relationship between the initial position of the seed point and the position of the end point when the initial inflection point exists; and determining the position of the end point as the position of the final inflection point when the initial inflection point does not exist. In the embodiment, when the initial inflection point exists, the position of the final inflection point is determined according to the relationship between the initial position of the seed point and the position of the endpoint, so that the obtained position of the final inflection point can be further ensured to be accurate, when the initial inflection point does not exist, the position of the endpoint can be directly determined to be the position of the final inflection point without being compared with other positions, and the problem that the weld bead inflection point cannot be accurately obtained in the prior art can be further solved.
In yet another embodiment of the present application, determining whether an initial inflection point exists between the initial position of the seed point and the position of the end point includes: and determining that the initial inflection point exists when the seed point moves to a position where the pixel value is equal to a third predetermined value and the current position of the seed point is different from the end point, wherein the seed point at the current position is determined to be the initial inflection point. In this embodiment, when the pixel value is equal to the third predetermined value during the seed point moving process, and the current position of the seed point is different from the position of the end point, it is characterized that the position at which the seed point has grown outside the weld bead profile and the seed point has not grown to the end point at this time, that is, the current position is the initial inflection point. According to the scheme, whether the initial inflection point exists can be determined more accurately, and the accuracy of determining the position of the final inflection point according to the relationship between the initial position of the seed point and the position of the endpoint can be further ensured to be higher.
It should be noted that the third predetermined value may be 75, 150, or 255, and certainly, the third predetermined value is not limited to these, and a person skilled in the art may select any feasible third predetermined value according to practical situations, and the third predetermined value is different from the first predetermined value and the second predetermined value.
In another embodiment of the present application, when the seed point includes a first seed point and a second seed point, and the endpoints include a first endpoint corresponding to the first seed point and a second endpoint corresponding to the second seed point, when the seed point moves to a position where a pixel value is equal to a third predetermined value and a current position of the seed point is different from a position of the endpoints, determining that the initial inflection point exists, and determining that the seed point at the current position is the initial inflection point includes: determining that a first initial inflection point exists when the first seed point moves to a position where the pixel value is equal to the third predetermined value and the current position of the first seed point is different from the first end point, and determining that the first seed point of the current position is the first initial inflection point; and determining that a second initial inflection point exists when the second seed point moves to a position where the pixel value is equal to the third predetermined value and the current position of the second seed point is different from the second end point, wherein the second seed point of the current position is determined to be the second initial inflection point. In this embodiment, when the pixel value during the first seed point moving process is equal to the third predetermined value and the current position of the first seed point is different from the position of the first end point, it is characterized that the first seed point has grown out of the weld bead profile and the first seed point has not grown to the position of the first end point at this time, that is, the current position is the first initial inflection point, and when the pixel value during the second seed point moving process is equal to the third predetermined value and the current position of the second seed point is different from the position of the second end point, it is characterized that the second seed point has grown out of the weld bead profile and the second seed point has not grown to the position of the second end point at this time, that is, the current position is the second initial inflection point.
In a specific embodiment of the present application, in a case where the initial inflection point exists, determining a position of the final inflection point based on a relationship between the initial position of the seed point and the position of the end point includes: determining whether or not the coordinate value of the position of the first end point is smaller than the coordinate value of the position of the first initial inflection point, when the first initial inflection point exists between the initial position of the first seed point and the position of the first end point; determining that the position of the first end point is a first final inflection point when the coordinate value of the position of the first end point is determined to be smaller than the coordinate value of the position of the first initial inflection point; when the coordinate value specifying the position of the first end point is larger than the coordinate value specifying the position of the first initial inflection point, the position of the first initial inflection point is specified as the position of the first final inflection point. In this embodiment, when the first initial inflection point exists, the smaller one of the coordinate value of the position of the first endpoint and the coordinate value of the position of the first initial inflection point is taken as the position of the first final inflection point, so that the position of the first final inflection point can be accurately determined, and the problem that the weld bead inflection point cannot be accurately obtained in the prior art is further solved.
In another embodiment of the present invention, in a case where the initial inflection point exists, the determining a position of the final inflection point based on a relationship between the initial position of the seed point and the position of the end point includes: determining whether or not the coordinate value of the position of the second end point is larger than the coordinate value of the position of the second initial inflection point, in a case where the second initial inflection point exists between the initial position of the second seed point and the position of the second end point; determining the second end point as a second final inflection point when the coordinate value of the second end point is determined to be greater than the coordinate value of the second initial inflection point; and determining that the second initial inflection point is the second final inflection point when the coordinate value of the position of the second end point is smaller than the coordinate value of the position of the second initial inflection point. In this embodiment, when the second initial inflection point exists, the larger one of the coordinate value of the position of the second endpoint and the coordinate value of the position of the second initial inflection point is used as the position of the second final inflection point, so that the position of the second final inflection point can be accurately determined, and the problem that the weld bead inflection point cannot be accurately obtained in the prior art is further solved.
In another embodiment of the present application, in a case where the initial inflection point does not exist, the determining that the position of the end point is the position of the final inflection point includes: determining the position of the first endpoint as the position of a first final inflection point when the first initial inflection point does not exist; and determining the position of the second end point as the position of a second final inflection point when the second initial inflection point does not exist. In this embodiment, in the case that there is no initial inflection point, the position of the first endpoint is directly taken as the position of the first final inflection point, and the position of the second endpoint is directly taken as the position of the second final inflection point, and there is no need to compare the coordinate value of the position of the endpoint with the coordinate value of the position of the initial inflection point, so that the position of the first endpoint can be directly determined as the position of the first final inflection point, and the position of the second endpoint is the position of the second final inflection point.
The embodiment of the present application further provides a device for determining a bead inflection point, and it should be noted that the device for determining a bead inflection point of the embodiment of the present application may be used to execute the method for determining a bead inflection point provided in the embodiment of the present application. The following describes a device for determining a bead inflection point according to an embodiment of the present application.
Fig. 4 is a schematic view of a bead inflection point determination device according to an embodiment of the present application. As shown in fig. 4, the apparatus includes:
an acquisition unit 10 configured to acquire an initial weld bead image;
a preprocessing unit 20, configured to preprocess the initial weld bead image to obtain a contour weld bead image;
a first determining unit 30, configured to determine an initial position of a seed point according to the profile bead image;
a second determining unit 40, configured to determine a position of an end point according to the initial position of the seed point;
and a third determining unit 50 for determining a position of a final inflection point of the weld bead based on the initial position of the seed point and the position of the end point.
In the above apparatus, the preprocessing unit may perform preprocessing on the obtained initial weld bead image to remove most irrelevant information in the initial weld bead image to obtain the profile weld bead image, the first determining unit may obtain an accurate initial position of the seed point according to the profile weld bead image, the second determining unit determines a position of the end point according to the initial position of the seed point, and the third determining unit may obtain an accurate position of the final inflection point of the weld bead according to the initial position of the seed point and the position of the end point. In the device, the position where the change occurs in the growth process of the seed point is not necessarily determined as the position of the inflection point, and the intersection point between the edge line and the weld bead edge line is also not necessarily determined as the inflection point, but the position of an end point is determined according to the initial position of the seed point, and then the position of the final inflection point is determined according to the position of the end point and the initial position of the seed point.
In an embodiment of the present application, the preprocessing unit includes a first processing module, a second processing module, a third processing module, and a fourth processing module, where the first processing module is configured to process the initial weld bead image by using an image enhancement algorithm to obtain a first weld bead image; the second processing module is used for processing the first welding bead image by adopting a self-adaptive threshold value segmentation algorithm to obtain a second welding bead image; the third processing module is used for processing the second welding bead image by adopting a median filtering algorithm to obtain a third welding bead image; and the fourth processing module is used for processing the third welding bead image by adopting a morphological algorithm to obtain the outline welding bead image. In this embodiment, the initial weld bead image is processed by an image enhancement algorithm, so that the edges in the image become clearly visible, a clearer first welding channel image can be obtained, the first welding channel image is processed through an adaptive threshold value segmentation algorithm, the second welding channel image can be obtained, the second welding channel image is a binary image, so that the image can be processed more quickly, the second welding channel image is processed through a median filtering algorithm, the noise points in the image can be reduced, most irrelevant information in the initial welding bead image can be further removed, the third welding bead image is processed through a morphological algorithm, the method can repair the discontinuous outline weld bead in the second weld bead image, can further obtain a more accurate and clear outline weld bead image, and ensures that the accuracy of the subsequent determination of the initial position of the seed point is higher.
It should be further noted that the image enhancement algorithm may be a common laplacian image enhancement algorithm, but is not limited to the laplacian image enhancement algorithm, and may also be any suitable image enhancement algorithm in the prior art, and those skilled in the art may select a suitable image enhancement algorithm to process the initial weld bead image according to the actual situation.
In another embodiment of the present application, the first determining unit includes an obtaining module and a first determining module, where the obtaining module is configured to obtain positions of predetermined pixel points in the outline weld bead image, where the predetermined pixel points are pixel points at one end of the weld bead and have a pixel value of a first predetermined value; the first determining module is used for determining the initial position of the seed point according to the position of the preset pixel point. In this embodiment, the initial position of the seed point can be accurately determined by the position of the predetermined pixel point.
It should be noted that the first predetermined value may be 0, 50, or 100, and certainly, the first predetermined value is not limited to these, and a person skilled in the art may select any feasible first predetermined value according to practical situations.
In yet another embodiment of the present application, the obtaining module includes a first obtaining submodule and a second obtaining submodule, where the first obtaining submodule is configured to obtain a position of a first predetermined pixel point in the outline weld bead image, and the first predetermined pixel point is the predetermined pixel point at one end of the weld bead in the outline weld bead image; the second obtaining submodule is used for obtaining the position of a second preset pixel point in the outline weld bead image, the second preset pixel point is the preset pixel point at the other end of the weld bead in the outline weld bead image, the first determining submodule comprises a first determining submodule and a second determining submodule, and the first determining submodule is used for determining the first initial position of the first seed point according to the position of the first preset pixel point; the second determining submodule is used for determining a second initial position of the second seed point according to the position of the second preset pixel point. In this embodiment, the initial positions of the two seed points can be accurately determined according to the positions of the two predetermined pixel points, and subsequently, the positions of the endpoints can be further accurately determined, so that subsequently, the position of the inflection point can be more accurately determined, and the obtained inflection point is further ensured to be more accurate.
In another embodiment of the present application, the first determining submodule is further configured to determine, in a case where a first region exists, the position of the first predetermined pixel point as the first initial position of the first seed point, the first region is a region including a first upper boundary line and a first lower boundary line, the first upper boundary line is a boundary line passing through one of the first predetermined pixel points, the first lower boundary line is a boundary line passing through another one of the first predetermined pixel points, the first upper boundary line is parallel to the first lower boundary line, the second determining submodule is further configured to determine, in a case where a second region exists, the position of the second predetermined pixel point as the second initial position of the second seed point, the second region is a region including a second upper boundary line and a second lower boundary line, the second upper boundary line is a boundary line passing through one of the second predetermined pixel points, the second lower boundary line is a boundary line passing through another one of the second predetermined pixel points, and the second upper boundary line is parallel to the second lower boundary line. In the embodiment, the initial positions of the two seed points can be further accurately determined, so that the position of the endpoint can be further accurately determined subsequently, and the position of the inflection point can be further accurately determined subsequently.
In a specific embodiment of the present application, the second determining unit includes a second determining module and a third determining module, the second determining module is configured to control the first seed point to grow from the first initial position and along a first predetermined direction by using a region growing algorithm, and determine that the current position of the first seed point is a position of a first end point when a pixel value of the first seed point is greater than a second predetermined value, and the first predetermined direction is parallel to a direction of a length extending direction of the weld bead; the third determining module is configured to control the second seed point to grow from the second initial position and along a second predetermined direction by using a region growing algorithm, and determine that the current position of the second seed point is a position of a second endpoint when the pixel value of the second seed point is greater than the second predetermined value, where the second predetermined direction is opposite to the first predetermined direction. In this embodiment, when the seed point grows until the pixel value is greater than the second predetermined value, it is characterized that the seed point has grown outside the weld bead profile at this time, the current position of the seed point is determined as the position of the end point, and the seed point stops growing.
It should be noted that the second predetermined value may be 200, 400, or 510, and certainly, the second predetermined value is not limited to these, and a person skilled in the art may select any feasible second predetermined value according to practical situations, and the second predetermined value is different from the first predetermined value.
In yet another embodiment of the present application, the third determining unit includes a fourth determining module, a fifth determining module and a sixth determining module, the fourth determining module is configured to determine whether an initial inflection point exists between the initial position of the seed point and the position of the endpoint; a fifth determining module, configured to determine a position of the final inflection point according to a relationship between the initial position of the seed point and the position of the end point when the initial inflection point exists; and a sixth determining module, configured to determine that the position of the endpoint is the position of the final inflection point when the initial inflection point does not exist. In the embodiment, when the initial inflection point exists, the position of the final inflection point is determined according to the relationship between the initial position of the seed point and the position of the endpoint, so that the obtained position of the final inflection point can be further ensured to be accurate, when the initial inflection point does not exist, the position of the endpoint can be directly determined to be the position of the final inflection point without being compared with other positions, and the problem that the weld bead inflection point cannot be accurately obtained in the prior art can be further solved.
In yet another embodiment of the application, the fourth determining module includes a third determining submodule, and the third determining submodule is configured to determine that the initial inflection point exists when the seed point moves to a position where the pixel value is equal to a third predetermined value and the current position of the seed point is different from the position of the end point, and determine that the seed point at the current position is the initial inflection point. In this embodiment, when the pixel value is equal to the third predetermined value during the seed point moving process, and the current position of the seed point is different from the position of the end point, it is characterized that the position at which the seed point has grown outside the weld bead profile and the seed point has not grown to the end point at this time, that is, the current position is the initial inflection point. According to the scheme, whether the initial inflection point exists can be determined more accurately, and the accuracy of determining the position of the final inflection point according to the relationship between the initial position of the seed point and the position of the endpoint can be further ensured to be higher.
It should be noted that the third predetermined value may be 75, 150, or 255, and certainly, the third predetermined value is not limited to these, and a person skilled in the art may select any feasible third predetermined value according to practical situations, and the third predetermined value is different from the first predetermined value and the second predetermined value.
In another embodiment of the application, when the seed points include a first seed point and a second seed point, and the endpoints include a first endpoint corresponding to the first seed point and a second endpoint corresponding to the second seed point, the third determining sub-module is further configured to determine that a first initial inflection point exists when the first seed point moves to a position where a pixel value is equal to the third predetermined value and a current position of the first seed point is different from a position of the first endpoint, and determine that the first seed point at the current position is the first initial inflection point; the third determining sub-module is further configured to determine that a second initial inflection point exists when the second seed point moves to a position where the pixel value is equal to the third predetermined value and the current position of the second seed point is different from the second end point, and determine that the second seed point of the current position is the second initial inflection point. In this embodiment, when the pixel value during the first seed point moving process is equal to the third predetermined value and the current position of the first seed point is different from the position of the first end point, it is characterized that the first seed point has grown out of the weld bead profile and the first seed point has not grown to the position of the first end point at this time, that is, the current position is the first initial inflection point, and when the pixel value during the second seed point moving process is equal to the third predetermined value and the current position of the second seed point is different from the position of the second end point, it is characterized that the second seed point has grown out of the weld bead profile and the second seed point has not grown to the position of the second end point at this time, that is, the current position is the second initial inflection point.
In a specific embodiment of the present application, the fifth determining module includes a fourth determining submodule, a fifth determining submodule and a sixth determining submodule, and the fourth determining submodule is configured to determine whether the coordinate value of the position of the first endpoint is smaller than the coordinate value of the position of the first initial inflection point when the first initial inflection point exists between the initial position of the first seed point and the position of the first endpoint; a fifth determining submodule configured to determine that the position of the first endpoint is the position of the first final inflection point, when it is determined that the coordinate value of the position of the first endpoint is smaller than the coordinate value of the position of the first initial inflection point; the sixth determining submodule is configured to determine that the first initial inflection point is the first final inflection point when the coordinate value of the first end point is greater than the coordinate value of the first initial inflection point. In this embodiment, when the first initial inflection point exists, the smaller one of the coordinate value of the position of the first endpoint and the coordinate value of the position of the first initial inflection point is taken as the position of the first final inflection point, so that the position of the first final inflection point can be accurately determined, and the problem that the weld bead inflection point cannot be accurately obtained in the prior art is further solved.
In yet another embodiment of the present application, the fifth determining module includes a seventh determining submodule, an eighth determining submodule and a ninth determining submodule, wherein the seventh determining submodule is configured to determine whether the coordinate value of the position of the second endpoint is greater than the coordinate value of the position of the second initial inflection point in a case where the second initial inflection point exists between the initial position of the second seed point and the position of the second endpoint; the eighth determining submodule is configured to determine that the position of the second endpoint is the position of the second final inflection point, when it is determined that the coordinate value of the position of the second endpoint is greater than the coordinate value of the position of the second initial inflection point; the ninth determining submodule is configured to determine that the second initial inflection point is the second final inflection point when the coordinate value of the second end point is determined to be smaller than the coordinate value of the second initial inflection point. In this embodiment, when the second initial inflection point exists, the larger one of the coordinate value of the position of the second endpoint and the coordinate value of the position of the second initial inflection point is used as the position of the second final inflection point, so that the position of the second final inflection point can be accurately determined, and the problem that the weld bead inflection point cannot be accurately obtained in the prior art is further solved.
In yet another embodiment of the present application, the sixth determining module includes a tenth determining submodule and an eleventh determining submodule, and the tenth determining submodule is configured to determine, in the absence of the first initial inflection point, that the position of the first endpoint is the position of the first final inflection point; the eleventh determining submodule is configured to determine, in the absence of the second initial inflection point, that the position of the second endpoint is a position of a second final inflection point. In this embodiment, in the case that there is no initial inflection point, the position of the first endpoint is directly taken as the position of the first final inflection point, and the position of the second endpoint is directly taken as the position of the second final inflection point, and there is no need to compare the coordinate value of the position of the endpoint with the coordinate value of the position of the initial inflection point, so that the position of the first endpoint can be directly determined as the position of the first final inflection point, and the position of the second endpoint is the position of the second final inflection point.
The device for determining the weld bead inflection point comprises a processor and a memory, wherein the acquiring unit, the preprocessing unit, the first determining unit, the second determining unit, the third determining unit and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and the weld bead inflection point can be accurately obtained by adjusting the kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
An embodiment of the present invention provides a computer-readable storage medium on which a program is stored, the program implementing the above-described method for determining a bead inflection point when executed by a processor.
The embodiment of the invention provides a processor, which is used for running a program, wherein the method for determining the weld bead inflection point is executed when the program runs.
An embodiment of the present invention further provides a welding system, including: the device comprises a welding device and a device for determining the inflection point of the weld bead, wherein the device for determining the inflection point of the weld bead is in communication connection with the welding device, and the device for determining the inflection point of the weld bead is used for executing any one of the methods.
The system comprises a welding device and a device for determining a weld bead inflection point, wherein the device for determining a weld bead inflection point is in communication connection with the welding device, the device for determining a weld bead inflection point is used for executing any method for determining a weld bead inflection point, in the method for determining a weld bead inflection point, most irrelevant information in an initial weld bead image can be removed by preprocessing the obtained initial weld bead image, a contour weld bead image is obtained, an accurate initial position of a seed point can be obtained according to the contour weld bead image, a position of an end point is determined according to the initial position of the seed point, and an accurate position of a final inflection point of a weld bead can be obtained according to the initial position of the seed point and the position of the end point. In the system, the position where the change occurs in the growth process of the seed point is not necessarily determined as the position of the inflection point, or the intersection point between the edge line and the bead edge line is not necessarily determined as the inflection point, but the position of an end point is determined according to the initial position of the seed point, and then the position of the final inflection point is determined according to the position of the end point and the initial position of the seed point.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein when the processor executes the program, at least the following steps are realized:
step S101, acquiring an initial welding bead image;
step S102, preprocessing the initial welding bead image to obtain a contour welding bead image;
step S103, determining the initial position of the seed point according to the contour weld bead image;
step S104, determining the position of an end point according to the initial position of the seed point;
step S105 determines the position of the final inflection point of the weld bead based on the initial position of the seed point and the position of the end point.
The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program of initializing at least the following method steps when executed on a data processing device:
step S101, acquiring an initial welding bead image;
step S102, preprocessing the initial welding bead image to obtain a contour welding bead image;
step S103, determining the initial position of the seed point according to the contour weld bead image;
step S104, determining the position of an end point according to the initial position of the seed point;
step S105 determines the position of the final inflection point of the weld bead based on the initial position of the seed point and the position of the end point.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as a separate product. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above methods according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
From the above description, it can be seen that the above-described embodiments of the present application achieve the following technical effects:
1) according to the method for determining the weld bead inflection point, most irrelevant information in the initial weld bead image can be removed by preprocessing the obtained initial weld bead image, the outline weld bead image is obtained, the accurate initial position of the seed point can be obtained according to the outline weld bead image subsequently, the position of the end point is determined according to the initial position of the seed point, and the accurate position of the final inflection point of the weld bead can be obtained according to the initial position of the seed point and the position of the end point finally. In the method, the position where the change occurs in the growth process of the seed point is not necessarily determined as the position of the inflection point, and the intersection point between the edge line and the weld bead edge line is also not necessarily determined as the inflection point, but the position of an end point is determined according to the initial position of the seed point, and then the position of the final inflection point is determined according to the position of the end point and the initial position of the seed point.
2) According to the device for determining the weld bead inflection point, the preprocessing unit preprocesses the obtained initial weld bead image, most irrelevant information in the initial weld bead image can be removed, the outline weld bead image is obtained, the first determining unit can obtain the accurate initial position of the seed point according to the outline weld bead image, the second determining unit determines the position of the end point according to the initial position of the seed point, and the third determining unit can obtain the accurate position of the final inflection point of the weld bead according to the initial position of the seed point and the position of the end point. In the device, the position where the change occurs in the growth process of the seed point is not necessarily determined as the position of the inflection point, and the intersection point between the edge line and the weld bead edge line is also not necessarily determined as the inflection point, but the position of an end point is determined according to the initial position of the seed point, and then the position of the final inflection point is determined according to the position of the end point and the initial position of the seed point.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims (13)
1. A method for determining a bead inflection point, comprising:
acquiring an initial welding bead image;
preprocessing the initial welding bead image to obtain a contour welding bead image;
determining the initial position of a seed point according to the profile welding bead image;
determining the position of an end point according to the initial position of the seed point;
determining a position of a final inflection point of the weld bead according to the initial position of the seed point and the position of the end point,
determining a location of a final inflection point of the weld bead from the initial location of the seed point and the location of the endpoint, comprising:
determining whether an initial inflection point exists between the initial position of the seed point and the position of the endpoint;
under the condition that the initial inflection point exists, determining the position of the final inflection point according to the relation between the initial position of the seed point and the position of the endpoint;
determining, in the absence of the initial inflection point, that the location of the endpoint is the location of the final inflection point;
determining whether an initial inflection point exists between the initial position of the seed point and the position of the endpoint, comprising:
determining that the initial inflection point exists if the seed point moves to a pixel value equal to a third predetermined value and the current position of the seed point is different from the position of the endpoint, and determining that the seed point at the current position is the initial inflection point;
when the seed point includes a first seed point and a second seed point, and the endpoints include a first endpoint corresponding to the first seed point and a second endpoint corresponding to the second seed point, determining that the initial inflection point exists in a case where the seed point is moved to a position where a pixel value is equal to a third predetermined value and a current position of the seed point is different from a position of the endpoint, the determining that the seed point of the current position is the initial inflection point includes:
determining that a first initial inflection point exists if the first seed point moves to a position where the pixel value is equal to the third predetermined value and the current position of the first seed point is different from the position of the first endpoint, the first seed point of the current position being determined to be the first initial inflection point;
determining that a second initial inflection point exists if the second seed point moves to a position where the pixel value is equal to the third predetermined value and the current position of the second seed point is different from the position of the second endpoint, the second seed point of the current position being determined to be the second initial inflection point.
2. The method of claim 1, wherein preprocessing the initial weld bead image to obtain a profile weld bead image comprises:
processing the initial welding bead image by adopting an image enhancement algorithm to obtain a first welding bead image;
processing the first welding bead image by adopting a self-adaptive threshold segmentation algorithm to obtain a second welding bead image;
processing the second welding bead image by adopting a median filtering algorithm to obtain a third welding bead image;
and processing the third welding bead image by adopting a morphological algorithm to obtain the outline welding bead image.
3. The method of claim 1, wherein determining an initial position of a seed point from the profile bead image comprises:
obtaining the position of a preset pixel point in the outline welding bead image, wherein the preset pixel point is a pixel point at one end of the welding bead and the pixel value of the preset pixel point is a first preset value;
and determining the initial position of the seed point according to the position of the preset pixel point.
4. The method of claim 3,
acquiring the position of a preset pixel point in the profile weld bead image, wherein the method comprises the following steps:
acquiring the position of a first preset pixel point in the outline weld bead image, wherein the first preset pixel point is the preset pixel point at one end of the weld bead in the outline weld bead image;
acquiring the position of a second preset pixel point in the outline welding bead image, wherein the second preset pixel point is the preset pixel point at the other end of the welding bead in the outline welding bead image,
determining the initial position of the seed point according to the position of the predetermined pixel point, including:
determining a first initial position of a first seed point according to the position of the first preset pixel point;
and determining a second initial position of the second seed point according to the position of the second preset pixel point.
5. The method of claim 4,
determining a first initial position of a first seed point according to the position of the first predetermined pixel point, including:
determining the position of the first predetermined pixel point as the first initial position of the first seed point in the presence of a first region, the first region being a region including a first upper boundary line and a first lower boundary line, the first upper boundary line being a boundary line passing through one of the first predetermined pixel points, the first lower boundary line being a boundary line passing through another one of the first predetermined pixel points, the first upper boundary line and the first lower boundary line being parallel,
determining a second initial position of a second seed point according to the position of the second predetermined pixel point, including:
and under the condition that a second region exists, determining that the position of the second preset pixel point is the second initial position of the second seed point, wherein the second region is a region comprising a second upper boundary line and a second lower boundary line, the second upper boundary line is a boundary line passing through one second preset pixel point, the second lower boundary line is a boundary line passing through the other second preset pixel point, and the second upper boundary line is parallel to the second lower boundary line.
6. The method of claim 4, wherein determining the location of an endpoint from the initial location of the seed point comprises:
adopting a region growing algorithm to control the first seed point to grow from the first initial position and along a first preset direction, and under the condition that the pixel value of the first seed point is greater than a second preset value, determining that the current position of the first seed point is the position of a first end point, wherein the first preset direction is parallel to the direction of the length extension direction of the weld bead;
and controlling the second seed point to grow from the second initial position and along a second preset direction by adopting a region growing algorithm, and determining that the current position of the second seed point is the position of a second endpoint under the condition that the pixel value of the second seed point is greater than the second preset value, wherein the second preset direction is opposite to the first preset direction.
7. The method of claim 1, wherein determining the position of the final inflection point according to a relationship between the initial position of the seed point and the position of the endpoint in the presence of the initial inflection point comprises:
determining whether a coordinate value of a position of the first endpoint is less than a coordinate value of a position of the first initial inflection point, in a case where the first initial inflection point exists between the initial position of the first seed point and the position of the first endpoint;
determining that the position of the first endpoint is the position of a first final inflection point when it is determined that the coordinate value of the position of the first endpoint is less than the coordinate value of the position of the first initial inflection point;
determining the position of the first initial inflection point as the position of the first final inflection point, in case that it is determined that the coordinate value of the position of the first endpoint is greater than the coordinate value of the position of the first initial inflection point.
8. The method of claim 1, wherein determining the position of the final inflection point according to a relationship between the initial position of the seed point and the position of the endpoint in the presence of the initial inflection point comprises:
determining whether the coordinate value of the position of the second endpoint is greater than the coordinate value of the position of the second initial inflection point, in case the second initial inflection point exists between the initial position of the second seed point and the position of the second endpoint;
determining that the position of the second endpoint is the position of a second final inflection point when it is determined that the coordinate value of the position of the second endpoint is greater than the coordinate value of the position of the second initial inflection point;
determining the position of the second initial inflection point as the position of the second final inflection point, in case that it is determined that the coordinate value of the position of the second endpoint is less than the coordinate value of the position of the second initial inflection point.
9. The method of claim 1, wherein determining that the location of the endpoint is the location of the final inflection point in the absence of the initial inflection point comprises:
determining the position of the first endpoint as the position of a first final inflection point in the absence of the first initial inflection point;
in the absence of the second initial inflection point, determining the location of the second endpoint as the location of a second final inflection point.
10. A device for determining a bead inflection point, comprising:
an acquisition unit configured to acquire an initial weld bead image;
the preprocessing unit is used for preprocessing the initial welding bead image to obtain a contour welding bead image;
the first determining unit is used for determining the initial position of the seed point according to the outline welding bead image;
a second determining unit, configured to determine a position of an endpoint according to the initial position of the seed point;
a third determining unit for determining a position of a final inflection point of the weld bead according to the initial position and the position of the end point of the seed point,
the third determination unit comprises a fourth determination module, a fifth determination module and a sixth determination module, wherein the fourth determination module is used for determining whether an initial inflection point exists between the initial position of the seed point and the position of the endpoint; the fifth determining module is used for determining the position of the final inflection point according to the relationship between the position of the initial inflection point of the seed point and the position of the endpoint under the condition that the initial inflection point exists; a sixth determining module for determining the location of the endpoint as the location of the final inflection point if the initial inflection point is not present;
the fourth determination module comprises a third determination submodule for determining that the initial inflection point exists if the seed point is moved to a position where the pixel value is equal to a third predetermined value and the current position of the seed point is different from the position of the end point, and determining that the seed point at the current position is the initial inflection point;
when the seed points include a first seed point and a second seed point, and the endpoints include a first endpoint corresponding to the first seed point and a second endpoint corresponding to the second seed point, the third determining submodule is further configured to determine that a first initial inflection point exists and determine that the first seed point at the current position is the first initial inflection point when the first seed point moves to a position where the pixel value is equal to the third predetermined value and the current position of the first seed point is different from the position of the first endpoint; the third determining sub-module is further configured to determine that a second initial inflection point exists if the second seed point moves to a position where the pixel value is equal to the third predetermined value and the current position of the second seed point is different from the position of the second endpoint, and determine that the second seed point of the current position is the second initial inflection point.
11. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein the program performs the method of any one of claims 1 to 9.
12. A processor, characterized in that the processor is configured to run a program, wherein the program when running performs the method of any of claims 1 to 9.
13. A welding system, comprising:
a welding device;
a bead inflection point determiner communicatively connected to the welding device, the bead inflection point determiner configured to perform the method of any one of claims 1 to 9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110375007.1A CN112767491B (en) | 2021-04-08 | 2021-04-08 | Method and device for determining weld bead inflection point and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110375007.1A CN112767491B (en) | 2021-04-08 | 2021-04-08 | Method and device for determining weld bead inflection point and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112767491A CN112767491A (en) | 2021-05-07 |
CN112767491B true CN112767491B (en) | 2021-11-12 |
Family
ID=75691236
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110375007.1A Active CN112767491B (en) | 2021-04-08 | 2021-04-08 | Method and device for determining weld bead inflection point and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112767491B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113579601B (en) * | 2021-08-16 | 2023-01-10 | 北京博清科技有限公司 | Welding bead positioning method and device, welding robot and storage medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5796610A (en) * | 1995-10-30 | 1998-08-18 | Nippon Telegraph And Telephone Corporation | Method of detecting seam characteristic points |
CN107798330A (en) * | 2017-11-10 | 2018-03-13 | 上海电力学院 | A kind of weld image characteristics information extraction method |
CN107876970A (en) * | 2017-12-13 | 2018-04-06 | 浙江工业大学 | A kind of robot multi-pass welding welding seam three-dimensional values and weld seam inflection point identification method |
CN108568624A (en) * | 2018-03-29 | 2018-09-25 | 东风贝洱热***有限公司 | A kind of mechanical arm welding system and welding method based on image procossing |
CN110751604A (en) * | 2019-09-30 | 2020-02-04 | 佛山科学技术学院 | Machine vision-based steel pipe weld defect online detection method |
CN111055054A (en) * | 2020-01-13 | 2020-04-24 | 北京博清科技有限公司 | Welding seam identification method and device, welding robot and storage medium |
CN111451610A (en) * | 2020-04-08 | 2020-07-28 | 北京博清科技有限公司 | Method and device for controlling a welding process |
CN111774764A (en) * | 2020-07-14 | 2020-10-16 | 北京博清科技有限公司 | Control method and control device for welding robot and readable storage medium |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101726256B (en) * | 2008-10-27 | 2012-03-28 | 鸿富锦精密工业(深圳)有限公司 | Computer system and method for searching inflection point from image contour |
WO2019153090A1 (en) * | 2018-02-08 | 2019-08-15 | Novarc Technologies Inc. | Systems and methods for seam tracking in pipe welding |
CN111402323B (en) * | 2020-03-31 | 2021-09-17 | 北京博清科技有限公司 | Butt weld joint identification method, device, equipment and storage medium |
-
2021
- 2021-04-08 CN CN202110375007.1A patent/CN112767491B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5796610A (en) * | 1995-10-30 | 1998-08-18 | Nippon Telegraph And Telephone Corporation | Method of detecting seam characteristic points |
CN107798330A (en) * | 2017-11-10 | 2018-03-13 | 上海电力学院 | A kind of weld image characteristics information extraction method |
CN107876970A (en) * | 2017-12-13 | 2018-04-06 | 浙江工业大学 | A kind of robot multi-pass welding welding seam three-dimensional values and weld seam inflection point identification method |
CN108568624A (en) * | 2018-03-29 | 2018-09-25 | 东风贝洱热***有限公司 | A kind of mechanical arm welding system and welding method based on image procossing |
CN110751604A (en) * | 2019-09-30 | 2020-02-04 | 佛山科学技术学院 | Machine vision-based steel pipe weld defect online detection method |
CN111055054A (en) * | 2020-01-13 | 2020-04-24 | 北京博清科技有限公司 | Welding seam identification method and device, welding robot and storage medium |
CN111451610A (en) * | 2020-04-08 | 2020-07-28 | 北京博清科技有限公司 | Method and device for controlling a welding process |
CN111774764A (en) * | 2020-07-14 | 2020-10-16 | 北京博清科技有限公司 | Control method and control device for welding robot and readable storage medium |
Non-Patent Citations (1)
Title |
---|
基于结构光视觉传感的V型焊缝检测与信息提取;刘明友 等;《南昌大学学报》;20061231;第28卷(第4期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN112767491A (en) | 2021-05-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108171104B (en) | Character detection method and device | |
CN109670500B (en) | Text region acquisition method and device, storage medium and terminal equipment | |
CN116740070B (en) | Plastic pipeline appearance defect detection method based on machine vision | |
AU2013206597A1 (en) | Depth constrained superpixel-based depth map refinement | |
CN110333240B (en) | Method and device for detecting appearance of capacitor, storage medium and processor | |
JP7508556B2 (en) | Character segmentation method, device, and computer-readable storage medium | |
CN109509200A (en) | Checkerboard angle point detection process, device and computer readable storage medium based on contours extract | |
CN112801088B (en) | Method and related device for correcting distorted text line image | |
CN112184639A (en) | Round hole detection method and device, electronic equipment and storage medium | |
CN109754423B (en) | Method and equipment for extracting coverage area of leaf scab | |
CN112767491B (en) | Method and device for determining weld bead inflection point and computer readable storage medium | |
CN102005051A (en) | Edge detection method and related device | |
CN109087347B (en) | Image processing method and device | |
CN112561919A (en) | Image segmentation method, device and computer readable storage medium | |
CN109034058B (en) | Method and system for dividing and self-correcting region in image | |
CN110807457A (en) | OSD character recognition method, device and storage device | |
CN104952089A (en) | Image processing method and image processing system | |
CN108268868A (en) | Inclination value-acquiring method and device, terminal, the storage medium of ID Card Image | |
CN104504712A (en) | Picture processing method and device | |
CN116739943A (en) | Image smoothing method and target contour extraction method | |
CN116894849A (en) | Image segmentation method and device | |
CN109426770B (en) | Iris identification method | |
CN112837307A (en) | Method, device, processor and system for determining welding bead profile | |
CN112329572B (en) | Rapid static living body detection method and device based on frame and flash point | |
CN113902699A (en) | Method and device for determining inflection point of weld joint, processor and 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 |