Disclosure of Invention
In order to solve the above problems, the present invention provides a method and a system for identifying a gapless weld joint based on a linear array camera, so as to realize rapid identification of the gapless weld joint and improve the accuracy and robustness of weld joint identification.
The technical scheme adopted by the invention for solving the problems is as follows:
in a first aspect of the invention, a linear array camera-based gapless weld joint identification method comprises the following steps: acquiring image information of a weldment through a linear array camera; carrying out noise reduction processing on the image information to obtain preprocessing information; screening the preprocessed information to obtain candidate information; removing error position information in the candidate information to obtain welding seam information; and splicing the welding seam information to obtain a welding seam track.
The gapless weld joint identification method based on the linear array camera at least has the following beneficial effects: by carrying out noise reduction and screening processing on the image information, the information quantity of the image information can be effectively reduced, a large amount of information redundancy is avoided, a large amount of data operation is further reduced, and the processing speed is improved; by removing the wrong position information in the candidate information, the wrong position information in the candidate information can be quickly deleted, and the accuracy of weld joint identification is ensured.
Further, the performing noise reduction processing on the image information includes: and performing mean filtering on the image information according to rows, and solving a brightness average value according to columns. Because the reflectivity of the surface of the workpiece is not completely consistent, certain noise can be contained in the image information, and the noise can greatly influence the accuracy of the identification algorithm. Therefore, the image information is subjected to mean filtering according to the rows, the noises are removed, and the accuracy of the welding seam identification is improved.
Further, the screening the preprocessing information includes: when the brightness average value is the minimum value of the brightness average value in a certain area, outputting the corresponding preprocessing information as the candidate information; and discarding the rest of the preprocessing information. By calculating the average brightness value, candidate information where the minimum value is located is screened out, invalid information can be effectively removed, and the processing speed of the linear array camera-based gapless weld joint identification method is improved.
Further, the removing the wrong location information in the candidate information includes: removing the candidate information of which the brightness average value is larger than a brightness threshold value; removing the candidate information of which the continuous number is smaller than the length threshold value to obtain the information of the undetermined weld joint; removing the undetermined weld joint information with overlarge brightness average value change along the direction of the candidate information; and calculating the minimum brightness value of the undetermined weld joint information and the minimum brightness value of the end point of the undetermined weld joint information, and removing the undetermined weld joint information with small difference between the minimum brightness value and the endpoint brightness value. By analyzing the brightness, brightness change, contrast and weld zone width of the candidate information, the accuracy of the weld information is improved, and the seamless weld can be rapidly identified.
In a second aspect of the present invention, a linear array camera based gapless weld seam recognition system comprises: the image acquisition unit comprises a linear array camera and is used for acquiring image information of the weldment; the data processing unit is configured to perform noise reduction processing on the image information to obtain preprocessing information; splicing the preprocessing information and screening to obtain candidate information; removing error position information in the candidate information to obtain welding seam information; splicing the welding seam information to obtain a welding seam track; and the control unit is used for receiving the welding seam track and controlling the welding gun to perform welding operation.
The gapless weld joint identification system based on the linear array camera at least has the following beneficial effects: the image information of the welding seam is obtained through the linear array camera, the information quantity of the image information is reduced on the premise of not influencing the identification precision, and further the operation quantity of the image information is reduced; the data processing unit is used for processing noise reduction, screening and error position information removal on the image information, so that redundant information in the image information can be effectively removed, error position information in candidate information can be quickly deleted, the processing speed is improved, and the accuracy of weld joint identification is ensured; the control unit receives the welding seam information and controls the welding gun to perform welding operation, so that the welding precision is improved.
Further, the performing noise reduction processing on the image information includes: and performing mean filtering on the image information according to rows, and solving a brightness average value according to columns. Because the reflectivity of the surface of the workpiece is not completely consistent, certain noise can be contained in the image information, and the noise can greatly influence the accuracy of the identification algorithm. Therefore, the image information is subjected to mean filtering according to rows through the data processing unit, the noises are removed, and the accuracy of welding seam identification is improved.
Further, the screening the preprocessing information includes: when the brightness average value is the minimum value of the brightness average value in a certain area, outputting the corresponding preprocessing information as the candidate information; and discarding the rest of the preprocessing information. The data processing unit is used for calculating the average brightness value, candidate information where the minimum value is located is screened out, invalid information can be effectively removed, and the processing speed of the linear array camera-based gapless weld joint identification method is improved.
Further, the removing the wrong location information in the candidate information includes: removing the candidate information of which the brightness average value is greater than a brightness threshold value; removing the candidate information of which the continuous number is smaller than the length threshold value to obtain the information of the undetermined weld joint; removing the undetermined weld joint information with overlarge brightness average value change along the direction of the candidate information; and calculating the minimum brightness value of the undetermined weld joint information and the minimum brightness value of the end point of the undetermined weld joint information, and removing the undetermined weld joint information with small difference between the minimum brightness value and the endpoint brightness value. The data processing unit is used for analyzing the brightness, brightness change, contrast and welding seam area width of the candidate information, so that the accuracy of the welding seam information is improved, and the seamless welding seam can be rapidly identified.
In a third aspect of the invention, a computer apparatus comprises a memory and a processor, the memory having stored therein computer readable instructions which, when executed by one or more of the processors, cause the one or more processors to perform the line camera based gapless weld recognition method as described above.
The computer equipment at least has the following beneficial effects: by carrying out noise reduction and screening processing on the image information, the information quantity of the image information can be effectively reduced, a large amount of information redundancy is avoided, a large amount of data operation is further reduced, and the processing speed is improved; by removing the wrong position information in the candidate information, the wrong position information in the candidate information can be quickly deleted, and the accuracy of weld joint identification is ensured.
In a fourth aspect of the present invention, a storage medium stores computer-executable instructions for causing a computer to execute the gapless weld recognition method based on a line camera as described above.
The storage medium has at least the following beneficial effects: by carrying out noise reduction and screening processing on the image information, the information quantity of the image information can be effectively reduced, a large amount of information redundancy is avoided, a large amount of data operation is further reduced, and the processing speed is improved; by removing the wrong position information in the candidate information, the wrong position information in the candidate information can be quickly deleted, and the accuracy of weld joint identification is ensured.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention.
In the description of the present invention, it should be understood that the orientation or positional relationship referred to in the description of the orientation, such as the upper, lower, front, rear, left, right, etc., is based on the orientation or positional relationship shown in the drawings, and is only for convenience of description and simplification of description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus, should not be construed as limiting the present invention.
In the description of the present invention, the meaning of a plurality of means is one or more, the meaning of a plurality of means is two or more, and larger, smaller, larger, etc. are understood as excluding the number, and larger, smaller, inner, etc. are understood as including the number. If the first and second are described for the purpose of distinguishing technical features, they are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
In the description of the present invention, unless otherwise explicitly limited, terms such as arrangement, installation, connection and the like should be understood in a broad sense, and those skilled in the art can reasonably determine the specific meanings of the above terms in the present invention in combination with the specific contents of the technical solutions.
Referring to fig. 1, an embodiment of the present invention provides a method for identifying a gapless weld seam based on a line camera, including step S110, obtaining image information of a weldment 600 by the line camera; step S120, carrying out noise reduction processing on the image information to obtain preprocessing information; s130, screening the preprocessing information to obtain candidate information; and step S140, removing error position information in the candidate information to obtain welding seam information.
In this embodiment, the method for identifying a gapless weld based on a line camera further includes: and S150, splicing the welding seam information to obtain a welding seam track, and controlling a welding gun to perform welding operation according to the welding seam track.
By carrying out noise reduction and screening processing on the image information, the information quantity of the image information can be effectively reduced, a large amount of information redundancy is avoided, a large amount of data operation is further reduced, and the processing speed is improved; by removing the wrong position information in the candidate information, the wrong position information in the candidate information can be quickly deleted, and the accuracy of weld joint identification is ensured.
In another embodiment, the noise reduction processing of the image information includes: the image information is subjected to average filtering by rows, and the average value of the luminance is obtained by columns. Because the reflectivity of the surface of the workpiece is not completely consistent, certain noise can be contained in the image information, and the noise can greatly influence the accuracy of the identification algorithm. Therefore, the image information is subjected to mean filtering according to the rows, the noises are removed, and the accuracy of the welding seam identification is improved.
In the present embodiment, the line frequency of the line camera 210 is 29000 lines/second, and the resolution is 4096 × 1 pixels. In order to obtain a more accurate recognition result, the line camera 210 is exposed for multiple times to acquire image information once, preferably, the exposure time is 32, that is, each time the line camera acquires image information with a weld resolution of 4096 × 32, which is recorded as:
Lij(i=1,2,...,32;j=1,2,...,4096)
to reduce the amount of computation and increase the operating speed, the welding torch center position j is determined in advance0The ROI area with column number 1500 is determined, and the image information is:
Lij(i=1,2,...,32;j=j0-750,j0-749,...,j0+749)
the image information is then filtered using a mean, preferably 31 filter size, and averaged as follows, i.e.:
luminance distribution L subjected to noise reduction processing
kImage information at resolution 1500 x 1.
In another embodiment, screening the pre-processing information comprises: when the brightness average value is the minimum value of the brightness average value in a certain area, outputting the corresponding preprocessing information as candidate information; the remaining pre-processed information is discarded. Candidate information where the minimum value is located is screened out by calculating the average brightness value, so that invalid information can be effectively removed, and the processing speed of the linear array camera-based gapless weld joint identification method is increased.
In this embodiment, the calculation formula of the preprocessing information is as follows:
wherein when SkWhen 1, the point at the position k is filtered and incorporated into the candidate information. Preferably, the size of the region for finding the seed point is 81.
Referring to fig. 2, another embodiment, the removing of the error location information in the candidate information includes:
step S141, removing candidate information of which the brightness average value is greater than the brightness threshold value; in the present embodiment, the candidate information having the brightness larger than the brightness threshold is removed in consideration of the fact that the bead region is dark. Preferably, the luminance threshold is 1.2 times the average luminance value, i.e., the luminance threshold is
S142, removing the candidate information of which the continuous number is smaller than the length threshold value to obtain the information of the undetermined weld joint; considering that the width of the weld joint area is large, the candidate information with the continuous number smaller than the length threshold is removed, preferably, the length threshold is 30, and the remaining groups of continuous candidate information form a plurality of pieces of information of the weld joint to be determined.
S143, removing undetermined weld joint information with overlarge brightness average value change along the direction of the candidate information; it is considered that the brightness at the weld seam does not vary much parallel to the direction of movement of the line camera when the line camera is in motion. Therefore, undetermined weld joint information with overlarge change in the motion direction of the linear array camera can be removed, and DL is usedkThe magnitude of the change in brightness at position k is characterized by the following formula:
DLk=max(Lij)-Lk
wherein DLkSubtracting the average brightness value from the maximum brightness value of the image information in the moving direction of the welding gun, and removing the information of the undetermined welding line which is greater than the change threshold value, wherein the change threshold value is preferably 18.
And S144, calculating the minimum brightness value of the undetermined weld joint information and the minimum brightness value of the end point of the undetermined weld joint information, and removing the undetermined weld joint information with small difference between the minimum brightness value and the end point of the undetermined weld joint information. Since the brightness of the weld zone is significantly less than the ambient brightness, i.e., the brightness of the weld zone ends is significantly greater than the minimum value of the weld zone brightness. And calculating the minimum value of the end point brightness of each undetermined welding line information minus the minimum value of the brightness of the undetermined welding line information, and removing the undetermined welding line area if the result is smaller than a distinguishing threshold, wherein the preferable distinguishing threshold is 9.
In another embodiment, if the undetermined weld joint information exists and is unique, the point with the minimum brightness in the undetermined weld joint information is the weld joint position; the successive weld locations constitute a weld trajectory. Only when the information of the weld joint to be determined exists and is unique, the position of the weld joint can be determined, so that the condition that the positions of a plurality of weld joints are identified by the same image information is avoided, and the accuracy of weld joint identification is influenced; the continuous welding seam information forms a welding seam track, the robustness of the welding seam track can be ensured, and the condition that the welding seam information is discontinuous is avoided.
In another embodiment, after the weld information is obtained, step S145 is performed to determine whether a signal for stopping the collection is received, if the collection is stopped, the weld identification is completed once, and step S150 is performed, otherwise, the step S110 is returned to.
In the embodiment, the time for acquiring the image information of the weld and executing the weld recognition algorithm by the linear array camera each time is 7-8ms, the speed of the linear array camera is 300mm/s, namely the moving distance of the welding gun in the two adjacent execution algorithms is about 2mm, so that the results obtained by the two adjacent execution algorithms do not differ too much, if the difference is too much, the position of the weld at the moment is recorded as 0, otherwise, the position of the weld at the moment is considered to be located at the position of the point with the minimum brightness of the weld area.
Referring to fig. 3, an embodiment of the present invention further provides a system for identifying a gapless weld seam based on a line camera, including: the image acquisition unit 200 comprises a linear array camera 210 for acquiring image information of the weldment 600; a data processing unit (not shown) configured to perform noise reduction processing on the image information to obtain pre-processing information; splicing the preprocessed information and screening to obtain candidate information; removing error position information in the candidate information to obtain welding seam information; and a control unit (not shown) for receiving the welding information and controlling the welding gun 500 to perform the welding operation. A welding torch 500 for performing a welding operation in response to the control unit.
The image information of the welding seam is obtained through the linear array camera 210, the information quantity of the image information is reduced on the premise of not influencing the identification precision, and further the operation quantity of the image information is reduced; the data processing unit is used for processing noise reduction, screening and error position information removal on the image information, so that redundant information in the image information can be effectively removed, error position information in candidate information can be quickly deleted, the processing speed is improved, and the accuracy of weld joint identification is ensured; the control unit receives the welding seam information and controls the welding gun 500 to perform welding operation, so that the welding precision is improved.
It should be noted that, because the above-mentioned contents of information interaction, execution process, etc. between modules of the gapless weld seam recognition system based on the line camera are based on the same concept as the method embodiment of the present invention, specific functions and technical effects brought thereby can be specifically referred to the method embodiment section, and are not described herein again.
In another embodiment, the image capturing unit 200 further comprises: an imaging device 230 and an illumination source 240; the imaging device 230 is located between the line camera 210 and the weldment 600; the illumination source 240 is positioned opposite the weldment 600. By arranging the imaging device 230 and the illumination light source 240, the line camera 210 can finely image the weld joint, accurately extract image information of the surface of the weld joint, and thus accurately identify the track of the weld joint.
In the present embodiment, the imaging device 230 includes a range ring for realizing high magnification imaging and an industrial lens. Preferably, the focal length of the industrial lens is 75mm, and the length of the distance increasing ring is 98 mm. The linear array camera 210 may be configured to take a picture with a resolution of 4096 × 1 in a single exposure, and in order to eliminate noise and obtain a more accurate recognition result, the linear array camera 210 is configured to acquire image information once in multiple exposures, preferably, the number of exposures is 32, that is, the resolution of the image information acquired each time is 4096 × 32, and the weld position at a time is determined by the image information acquired in the 32 exposures.
In another embodiment, the image capturing unit 200 further comprises a movable mechanism (not shown); the movable mechanism drives the linear array camera 210 to move horizontally along the length direction of the welding seam. The movable mechanism is arranged to drive the linear array camera 210 to scan the welding seam, so that the integrity of the welding seam information is ensured, the condition of welding seam segmentation is avoided, and the welding continuity of the welding gun is improved.
Referring to fig. 4, in order to facilitate observation of the weld recognition effect, the images collected by the line-array camera 210 are spliced, and the spliced images are shown in fig. 4 (a); the weld trace recognition result is shown in fig. 4(b), in which the dark spot on the left side is the position where the recognition failed, and the dark spot in the middle is the recognized weld position.
An embodiment of the present invention further provides a computing device, including: a memory and a processor; a memory for storing program instructions; and the processor is used for calling the program instructions stored in the memory and executing the gapless weld joint identification method based on the linear array camera according to the obtained program.
It should be noted that, since the computing apparatus in this embodiment is based on the same inventive concept as the gapless weld seam identification method based on the line camera in the foregoing embodiment, the corresponding contents in the method embodiment are also applicable to this computing apparatus embodiment, and are not described in detail here.
The embodiment of the invention also provides a computer storage medium which stores computer executable instructions, and the computer executable instructions are used for executing the gapless weld joint identification method based on the linear array camera.
It should be noted that, since the computer storage medium in the present embodiment is based on the same inventive concept as the gapless seam recognition method based on the line camera in the foregoing embodiments, the corresponding contents in the method embodiments are also applicable to the present storage medium embodiment, and detailed description thereof is omitted here.
One of ordinary skill in the art will appreciate that all or some of the steps, systems, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an illustrative embodiment," "an example," "a specific example," or "some examples" or the like mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.