Method, device, processor and welding system for processing weld images

By shifting and comparing pixel points on the welding image multiple times, generating an intermediate slit image and selecting an image with the largest sum of pixel values ​​to update the current frame slit image, solving the problem that welding arc light affects the accuracy of the slit image processing and achieving high-accuracy slit image processing.

CN113902637BActive Publication Date: 2025-06-13BEIJING BO TSING TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111163720.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-30
Publication Date
2025-06-13
Estimated Expiration
2041-09-30

AI Technical Summary

Technical Problem

Welding arc light affects the accuracy of welding image processing, resulting in inaccurate adjustment of welding parameters.

Method used

By acquiring the current frame weld image, shifting the pixel points of the target weld image multiple times, generating multiple shifted weld images, comparing the pixel values ​​of these images with the non-target weld image, generating an intermediate weld image, and finally selecting the updated current frame weld image based on the sum of the pixel values.

Benefits of technology

Effectively remove the influence of welding arc light, reduce the impact of arc light on image processing, ensure the accuracy of welding image processing, and retain the pixel points of the weld to the greatest extent.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113902637B_ABST
    Figure CN113902637B_ABST
Patent Text Reader

Abstract

The present application provides a method, an apparatus, a processor, and a welding system for processing a weld image. The method includes: shifting each pixel point of a target weld image multiple times to obtain multiple shifted weld images; comparing the pixel values of the pixel points at corresponding positions of each shifted weld image and a non-target weld image, and generating multiple intermediate weld images based on the pixel points with smaller pixel values at each position in the two compared images; determining an intermediate weld image with the largest sum of pixel values as the updated current frame weld image. In this solution, the welding arc light has a higher brightness compared to the pixel points at other positions in the image, and its pixel value will also be larger. Therefore, by obtaining the pixel points with smaller pixel values at each position in the shifted weld image and the non-target weld image, the arc light in the image can be removed, so that the influence of the welding arc light on the welding image processing can be reduced, thereby being able to alleviate the problem in the prior art that the welding arc light affects the accuracy of the welding image processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing, and in particular, to a method and apparatus for processing a weld image, a computer-readable storage medium, a processor, and a welding system. Background Technique

[0002] In the related art, a welding robot is often used for welding. The welding robot includes a laser emitter and an image acquisition device. During the welding process, the laser emitter emits laser light to the weld, and the image acquisition device acquires the corresponding image, determines the weld information based on the acquired image, and adjusts the welding parameters of the welding process according to the weld information. However, during the welding process, the arc light of the welding will affect the detection of the laser stripe of the acquired image, thereby affecting the accuracy of subsequent image processing, that is, the result of image processing is inaccurate, and further affecting the accuracy of adjusting the welding parameters according to the result of image processing.

[0003] Therefore, there is an urgent need for an image processing method that can alleviate or even eliminate the influence of welding arc light.

[0004] The above information disclosed in the background art section is only used to enhance the understanding of the background art of the technology described in this article. Therefore, the background art may contain certain information that is not prior art known to those skilled in the art in this country. Summary of the Invention

[0005] The main purpose of the present application is to provide a method and apparatus for processing a weld image, a computer-readable storage medium, a processor, and a welding system to alleviate the problem that the welding arc light affects the accuracy of welding image processing in the prior art.

[0006] According to one aspect of the embodiments of the present invention, a method for processing a weld image is provided, including: obtaining a current frame weld image, and shifting each pixel point of the target weld image multiple times to obtain a plurality of shifted weld images, where the shifting directions and / or shifting distances corresponding to the plurality of shifted weld images are different, and the target weld image is one of the current frame weld image and the previous frame weld image; respectively comparing the pixel values of the pixel points at the corresponding positions of each of the shifted weld images and the non-target weld image, and generating an intermediate weld image based on the pixel points with smaller pixel values at each position in the two compared images, to obtain a plurality of the intermediate weld images, where the non-target weld image is the weld image other than the target weld image in the current frame weld image and the previous frame weld image; determining, according to the sum of the pixel values of each of the intermediate weld images, that one of the plurality of intermediate weld images with the largest sum of pixel values is the updated current frame weld image.

[0007] Optionally, after obtaining the weld seam image in real time and before shifting the target image multiple times to obtain multiple shifted images, the method further includes: respectively reducing the current frame weld seam image and the previous frame weld seam image to obtain the reduced current frame weld seam image and the reduced previous frame weld seam image, and the target weld seam image is one of the reduced current frame weld seam image and the reduced previous frame weld seam image.

[0008] Optionally, generating intermediate weld seam images based on the pixel points with smaller pixel values at each position in two compared images to obtain multiple intermediate weld seam images, including: generating initial intermediate weld seam images based on the pixel points with smaller pixel values at each position in two compared images to obtain multiple initial intermediate weld seam images; calculating the sum of the pixel values of each initial intermediate weld seam image, comparing the sums of the pixel values of all the initial intermediate weld seam images, and determining the initial intermediate weld seam image with the largest pixel value as the reference weld seam image; shifting the target weld seam image at least once according to the shifting direction and shifting distance corresponding to the reference weld seam image to obtain a target shifted weld seam image, and the distance between the corresponding pixel points of the target shifted weld seam image and the reference weld seam image is less than a first predetermined distance; comparing the pixel values of the pixel points at the corresponding positions of the target shifted weld seam image and the non-target weld seam image, and generating a final intermediate weld seam image based on the pixel points with smaller pixel values at each position in the two compared images, and the reference weld seam image and the final intermediate weld seam image constitute multiple intermediate weld seam images.

[0009] Optionally, respectively comparing the pixel values of the pixel points at the corresponding positions of each shifted weld seam image and the non-target weld seam image includes: respectively grayscale processing the shifted weld seam image and the non-target weld seam image; respectively comparing the pixel values of the pixel points at the corresponding positions of each grayscale processed shifted weld seam image and the grayscale processed non-target weld seam image.

[0010] Optionally, shifting each pixel point of the target weld seam image multiple times to obtain multiple shifted weld seam images, including: shifting each pixel point of the target weld seam image in multiple predetermined directions, and the multiple shifting distances in each predetermined direction are different.

[0011] Optionally, shifting each pixel point of the target weld seam image in multiple predetermined directions includes: shifting each pixel point of the target weld seam image in a first predetermined direction multiple times, and the maximum shifting distance for each shift is less than a second predetermined distance; shifting each pixel point of the target weld seam image in a second predetermined direction multiple times, and the maximum shifting distance for each shift is less than a third predetermined distance, and the first predetermined direction and the second predetermined direction are perpendicular.

[0012] According to another aspect of the embodiments of the present invention, there is also provided a processing device for weld images, including: an acquisition unit, configured to acquire a current frame of weld image, and shift each pixel point of the target weld image multiple times to obtain a plurality of shifted weld images, wherein the shifting directions and / or shifting distances corresponding to the plurality of shifted weld images are different, and the target weld image is one of the current frame weld image and the previous frame weld image; a comparison unit, configured to respectively compare the pixel values of the pixel points at corresponding positions of each of the shifted weld images and the non-target weld image, and generate an intermediate weld image based on the pixel points with smaller pixel values at each position in the two compared images, so as to obtain a plurality of the intermediate weld images, where the non-target weld image is the weld image other than the target weld image in the current frame weld image and the previous frame weld image; a determination unit, configured to determine, according to the sum of the pixel values of each of the intermediate weld images, that the intermediate weld image with the largest sum of pixel values among the plurality of intermediate weld images is the updated current frame weld image.

[0013] According to still another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, where the computer-readable storage medium includes a stored program, and the program executes any one of the methods described above.

[0014] According to yet another aspect of the embodiments of the present invention, there is also provided a processor, where the processor is used to run a program, and when the program runs, it executes any one of the methods described above.

[0015] According to another aspect of the embodiments of the present invention, there is also provided a welding system, including: a welding robot, a laser sensor, one or more processors, a memory, and one or more programs, where the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include those for executing any one of the methods described above.

[0016] In an embodiment of the present invention, first, a current frame weld seam image is acquired, and each pixel point of the target weld seam image is shifted multiple times to obtain multiple shifted weld seam images. Then, the pixel values of the pixel points at the corresponding positions of each of the above-mentioned shifted weld seam images and the non-target weld seam image are respectively compared, and an intermediate weld seam image is generated based on the pixel points with smaller pixel values at each position in the two compared images, obtaining multiple above-mentioned intermediate weld seam images. Finally, according to the sum of the pixel values of each of the above-mentioned intermediate weld seam images, it is determined that among the multiple above-mentioned intermediate weld seam images, the one intermediate weld seam image with the largest sum of pixel values is the updated above-mentioned current frame weld seam image. In this solution, the welding arc light has a higher brightness compared to the pixel points at other positions in the image, and its pixel value will also be larger. Therefore, by obtaining the pixel points with smaller pixel values at each position in the shifted weld seam image and the non-target weld seam image, the arc light in the image can be removed, thus reducing the influence of the welding arc light during welding image processing and obtaining the intermediate weld seam image. However, it is possible to remove the pixel points of the weld seam itself in the obtained intermediate weld seam image. Therefore, the intermediate weld seam image with the largest sum of pixel values is selected to update the current frame weld seam image, so as to retain the pixel points of the weld seam to the greatest extent. This solution can not only remove the arc light but also ensure that the obtained image is relatively accurate, thereby alleviating the problem in the prior art that the welding arc light affects the accuracy of welding image processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings forming a part of this application are used to provide a further understanding of this application. The schematic embodiments and descriptions thereof of this application are used to explain this application and do not constitute an improper limitation to this application. In the drawings:

[0018] Figure 1 FIG. shows a schematic flow chart of a method for processing a weld seam image according to an embodiment of this application;

[0019] Figure 2 FIG. shows a schematic structural diagram of a device for processing a weld seam image according to an embodiment of this application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0020] It should be noted that, without conflict, the embodiments in this application and the features in the embodiments can be combined with each other. The following will refer to the accompanying drawings and combine the embodiments to detail this application.

[0021] In order to enable those skilled in the art to better understand the solution of this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this application.

[0022] It should be noted that the terms "first", "second", etc. in the description, claims and above-mentioned drawings of this application are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so as to implement the embodiments of the present application described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0023] It should be understood that when an element (such as a layer, film, region, or substrate) is described as being "on" another element, the element can be directly on the other element, or there may also be an intermediate element. Moreover, in the description and claims, when an element is described as being "connected" to another element, the element can be "directly connected" to the other element, or "connected" to the other element through a third element.

[0024] As mentioned in the background art, the welding arc light in the prior art affects the accuracy of welding image processing. To solve the above problems, in a typical implementation manner of this application, a method, device, computer-readable storage medium, processor, and welding system for processing weld images are provided.

[0025] According to an embodiment of the present application, a method for processing weld images is provided.

[0026] Figure 1 is a flowchart of a method for processing weld images according to an embodiment of the present application. As Figure 1 shown, the method includes the following steps:

[0027] Step S101, obtaining the current frame weld image, and shifting each pixel point of the target weld image multiple times to obtain multiple shifted weld images, where the shifting directions and / or shifting distances corresponding to the multiple shifted weld images are different, and the target weld image is one of the current frame weld image and the previous frame weld image;

[0028] Step S102, respectively comparing the pixel values of the pixel points at the corresponding positions of each of the shifted weld images and the non-target weld image, and generating an intermediate weld image based on the pixel points with smaller pixel values at each position in the two compared images, to obtain multiple intermediate weld images, where the non-target weld image is the weld image other than the target weld image in the current frame weld image and the previous frame weld image;

[0029] Step S103: Based on the sum of the pixel values of each of the above intermediate weld images, determine that among the multiple above intermediate weld images, the one with the largest sum of pixel values is the updated current frame weld image.

[0030] In the above method, first obtain the current frame weld image, and shift each pixel point of the target weld image multiple times to obtain multiple shifted weld images. Then, compare the pixel values of the corresponding pixel points of each of the above shifted weld images and the non-target weld images respectively, and generate intermediate weld images based on the pixel points with smaller pixel values among the pixel values at each position in the two compared images, obtaining multiple above intermediate weld images. Finally, based on the sum of the pixel values of each of the above intermediate weld images, determine that among the multiple above intermediate weld images, the one with the largest sum of pixel values is the updated current frame weld image. In this solution, the welding arc light is brighter than the pixel points at other positions in the image, and its pixel value will also be larger. Therefore, obtaining the pixel points with smaller pixel values at each position in the shifted weld image and the non-target weld image can remove the arc light in the image, thus reducing the influence of the welding arc light during welding image processing and obtaining the intermediate weld image. However, it is possible to remove the pixel points of the weld itself in the obtained intermediate weld image. Therefore, select the intermediate weld image with the largest sum of pixel values to update the current frame weld image, so as to retain the pixel points of the weld to the greatest extent. This solution can not only remove the arc light but also ensure that the obtained image is relatively accurate, thus alleviating the problem in the prior art that the welding arc light affects the accuracy of welding image processing.

[0031] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0032] Specifically, each pixel point of the current frame weld image can be shifted multiple times to obtain multiple shifted weld images, or each pixel point of the previous frame weld image can be shifted multiple times to obtain multiple shifted weld images.

[0033] In an embodiment of the present application, after obtaining the weld image in real time and before shifting the target image multiple times to obtain multiple shifted images, the above method further includes: respectively performing a shrinking process on the current frame weld image and the previous frame weld image to obtain the shrunk current frame weld image and the shrunk previous frame weld image, and the target weld image is one of the shrunk current frame weld image and the shrunk previous frame weld image. In this embodiment, the image is shrunk, and the shrunk image can retain most of the features of the original image, which further improves the speed of subsequent image shifting processing.

[0034] In another embodiment of the present application, generating an intermediate weld image based on the pixel points with smaller pixel values at each position in two compared images to obtain multiple intermediate weld images includes: generating an initial intermediate weld image based on the pixel points with smaller pixel values at each position in two compared images to obtain multiple initial intermediate weld images; calculating the sum of the pixel values of each initial intermediate weld image and comparing the sums of the pixel values of all the initial intermediate weld images to determine the initial intermediate weld image with the largest pixel value sum as the reference weld image; performing at least one shift on the target weld image according to the shift direction and shift distance corresponding to the reference weld image to obtain a target shifted weld image, and the distance between the corresponding pixel points of the target shifted weld image and the reference weld image is less than the first predetermined distance; comparing the pixel values of the pixel points at the corresponding positions of the target shifted weld image and the non-target weld image, and generating a final intermediate weld image based on the pixel points with smaller pixel values at each position in the two compared images, and the reference weld image and the final intermediate weld image constitute multiple intermediate weld images. In this embodiment, the welding arc light has a higher brightness and larger pixel value than the pixel points at other positions. Therefore, using the pixel points with smaller pixel values at each position in the two compared images to generate the initial intermediate weld image can further remove the arc light in the image. Then, taking the one with the largest sum of pixel values among the multiple initial intermediate weld images as the reference weld image further ensures that the pixel points of the weld can be retained to the greatest extent. After that, shifting the target weld image again and selecting the pixel points with smaller pixel values at each position in the two compared images to generate the final intermediate weld image can further ensure that the obtained intermediate weld image is more accurate, thereby further alleviating the problem in the prior art that the welding arc light affects the accuracy of welding image processing.

[0035] It should be noted that the first predetermined distance can be the distance composed of 5 pixel points or the distance composed of 10 pixel points. Of course, it is not limited to the above two, and those skilled in the art can also select a suitable first predetermined distance according to the actual situation.

[0036] In order to further improve the speed of image processing, in a specific embodiment of the present application, the pixel values of the pixel points at corresponding positions of each of the above-mentioned shifted weld images and non-target weld images are compared respectively, including: performing grayscale processing on each of the above-mentioned shifted weld images and the above-mentioned non-target weld images respectively; comparing the pixel values of the pixel points at corresponding positions of each of the grayscale-processed shifted weld images and the grayscale-processed non-target weld images respectively.

[0037] In another embodiment of the present application, each pixel point of the target weld image is shifted multiple times to obtain multiple shifted weld images, including: shifting each of the above-mentioned pixel points of the target weld image in multiple predetermined directions, and the multiple shifting distances in each predetermined direction are different. In this embodiment, multiple shifted weld images can be obtained, so that when comparing images subsequently, multiple comparisons can be made, and thus the accuracy of the obtained images can be further ensured through the results of multiple comparisons.

[0038] In another embodiment of the present application, shifting each of the above-mentioned pixel points of the target weld image in multiple predetermined directions includes: shifting each of the above-mentioned pixel points of the target weld image multiple times in a first predetermined direction, and the maximum shifting distance for each shift is less than a second predetermined distance; shifting each of the above-mentioned pixel points of the target weld image multiple times in a second predetermined direction, and the maximum shifting distance for each shift is less than a third predetermined distance, where the first predetermined direction and the second predetermined direction are perpendicular. In this embodiment, the target weld image can be shifted in two different directions, and the maximum shifting distance is limited, so that the slow image processing speed caused by obtaining a large number of intermediate weld images due to excessive shifting of the target weld image can be avoided, and this embodiment can further ensure the accuracy of the obtained images.

[0039] It should be noted that the first predetermined direction can be the left direction or the right direction, and the second predetermined direction can be the up direction or the down direction. Of course, it is not limited to the above situations, and those skilled in the art can also select appropriate first and second predetermined directions according to actual needs.

[0040] It should also be noted that the second predetermined distance can be the distance composed of 2 pixel points, or the distance composed of 6 pixel points. Of course, it is not limited to the above two, and those skilled in the art can also select an appropriate second predetermined distance according to the actual situation. The third predetermined distance can be the distance composed of 3 pixel points, or the distance composed of 8 pixel points. Of course, it is not limited to the above two, and those skilled in the art can also select an appropriate third predetermined distance according to the actual situation.

[0041] The embodiment of the present application further provides a processing device for weld images. It should be noted that the processing device for weld images in the embodiment of the present application can be used to execute the method for processing weld images provided by the embodiment of the present application. The following introduces the processing device for weld images provided by the embodiment of the present application.

[0042] Figure 2 is a schematic diagram of a processing device for weld images according to an embodiment of the present application. As Figure 2 shown, the device includes:

[0043] An acquisition unit 10, configured to acquire a current-frame weld image, and perform multiple shifts on each pixel point of the target weld image to obtain a plurality of shifted weld images, where the shift directions and / or shift distances corresponding to the plurality of shifted weld images are different, and the target weld image is one of the current-frame weld image and the previous-frame weld image;

[0044] A comparison unit 20, configured to respectively compare the pixel values of the pixel points at the corresponding positions of each of the shifted weld images and the non-target weld image, and generate an intermediate weld image based on the pixel points with smaller pixel values at each position in the two compared images, to obtain a plurality of the intermediate weld images, where the non-target weld image is the weld image other than the target weld image in the current-frame weld image and the previous-frame weld image;

[0045] A determination unit 30, configured to determine, according to the sum of the pixel values of each of the intermediate weld images, that one of the plurality of intermediate weld images with the largest sum of pixel values is the updated current-frame weld image.

[0046] In the above device, the acquisition unit acquires the current frame weld image, and shifts each pixel point of the target weld image multiple times to obtain multiple shifted weld images. The comparison unit respectively compares the pixel values of the pixel points at the corresponding positions of each of the above shifted weld images and the non-target weld image, and generates an intermediate weld image based on the pixel points with smaller pixel values at each position in the two compared images, obtaining multiple above intermediate weld images. The determination unit determines, according to the sum of the pixel values of each of the above intermediate weld images, that one of the above intermediate weld images with the largest sum of pixel values among the multiple above intermediate weld images is the updated above current frame weld image. In this solution, the welding arc light has a higher brightness compared to the pixel points at other positions in the image, and its pixel value will also be larger. Therefore, by obtaining the pixel points with smaller pixel values at each position in the shifted weld image and the non-target weld image, the arc light in the image can be removed, so that the influence of the welding arc light during welding image processing can be reduced, and an intermediate weld image can be obtained. However, it is possible to remove the pixel points of the weld itself in the obtained intermediate weld image. Therefore, the intermediate weld image with the largest sum of pixel values is selected to update the current frame weld image, so that the pixel points of the weld can be retained to the greatest extent. This solution can not only remove the arc light, but also ensure that the obtained image is relatively accurate, thereby alleviating the problem that the welding arc light affects the accuracy of welding image processing in the prior art.

[0047] Specifically, each pixel point of the current frame weld image can be shifted multiple times to obtain multiple shifted weld images, or each pixel point of the previous frame weld image can be shifted multiple times to obtain multiple shifted weld images.

[0048] In an embodiment of the present application, the above device further includes a processing unit, which is used to respectively perform a reduction process on the above current frame weld image and the above previous frame weld image after the weld image is acquired in real time and before the target image is shifted multiple times to obtain multiple shifted images, obtaining the reduced above current frame weld image and the reduced above previous frame weld image. The above target weld image is one of the reduced above current frame weld image and the reduced above previous frame weld image. In this embodiment, the image is reduced, and the reduced image can retain most of the features of the original image. This embodiment further improves the speed of subsequent image shifting processing.

[0049] In another embodiment of the present application, the comparison unit includes a first generation module, a first comparison module, a first shift module, and a second generation module. The first generation module is configured to generate an initial intermediate weld seam image based on the pixel points with smaller pixel values at each position in the two compared images, and obtain a plurality of initial intermediate weld seam images. The first comparison module is configured to calculate the sum of the pixel values of each of the initial intermediate weld seam images, and compare the sums of the pixel values of all the initial intermediate weld seam images to determine the initial intermediate weld seam image with the largest pixel value as the reference weld seam image. The first shift module is configured to perform at least one shift on the target weld seam image according to the shift direction and shift distance corresponding to the reference weld seam image, to obtain a target shifted weld seam image, and the distance between the corresponding pixel points of the target shifted weld seam image and the reference weld seam image is less than a first predetermined distance. The second generation module is configured to compare the pixel values of the corresponding pixel points of the target shifted weld seam image and the non-target weld seam image, and generate a final intermediate weld seam image based on the pixel points with smaller pixel values at each position in the two compared images. The reference weld seam image and the final intermediate weld seam image constitute a plurality of the intermediate weld seam images. In this embodiment, the welding arc light has a higher brightness and larger pixel value than the pixel points at other positions. Therefore, using the pixel points with smaller pixel values at each position in the two compared images to generate the initial intermediate weld seam image can further remove the arc light in the image. Then, taking the one with the largest sum of pixel values among the plurality of initial intermediate weld seam images as the reference weld seam image further ensures that the pixel points of the weld seam can be retained to the greatest extent. After that, the target weld seam image is shifted again, and the pixel points with smaller pixel values at each position in the two compared images are selected again to generate the final intermediate weld seam image, which can further ensure that the obtained intermediate weld seam image is more accurate, and further alleviate the problem in the prior art that the welding arc light affects the accuracy of welding image processing.

[0050] It should be noted that the first predetermined distance may be a distance composed of 5 pixel points or a distance composed of 10 pixel points. Of course, it is not limited to the above two, and those skilled in the art can also select a suitable first predetermined distance according to the actual situation.

[0051] In a specific embodiment of the present application, to further improve the speed of image processing, the comparison unit includes a processing module and a second comparison module. The processing module is configured to perform grayscale processing on the shifted weld seam image and the non-target weld seam image respectively. The second comparison module is configured to compare the pixel values of the corresponding pixel points of each of the shifted weld seam images after grayscale processing and the non-target weld seam image after grayscale processing respectively.

[0052] In another embodiment of the present application, the acquisition unit includes a second shifting module, which is used to shift each of the above-mentioned pixel points of the target weld image in a plurality of predetermined directions, and the plurality of shifting distances in each predetermined direction are different. In this embodiment, a plurality of shifted weld images can be obtained, so that when comparing images subsequently, multiple comparisons can be performed, and thus the accuracy of the obtained images can be further ensured through the results of multiple comparisons.

[0053] In another embodiment of the present application, the second shifting module includes a first shifting sub-module and a second shifting sub-module. The first shifting sub-module is used to shift each of the above-mentioned pixel points of the target weld image in a first predetermined direction multiple times, and the maximum shifting distance of each shift is less than a second predetermined distance; the second shifting sub-module is used to shift each of the above-mentioned pixel points of the target weld image in a second predetermined direction multiple times, and the maximum shifting distance of each shift is less than a third predetermined distance, and the above-mentioned first predetermined direction and the above-mentioned second predetermined direction are perpendicular. In this embodiment, the target weld image can be shifted in two different directions, and the maximum shifting distance of the shift is limited, so that the slow processing speed of image processing caused by obtaining a large number of intermediate weld images due to a large shift of the target weld image can be avoided, and this embodiment can further ensure the accuracy of the obtained images.

[0054] It should be noted that the first predetermined direction can be the left direction or the right direction, and the second predetermined direction can be the up direction or the down direction. Of course, it is not limited to the above situations, and those skilled in the art can also select appropriate first and second predetermined directions according to actual needs.

[0055] It should also be noted that the second predetermined distance can be the distance composed of 2 pixel points, or the distance composed of 6 pixel points. Of course, it is not limited to the above two, and those skilled in the art can also select an appropriate second predetermined distance according to the actual situation. The third predetermined distance can be the distance composed of 3 pixel points, or the distance composed of 8 pixel points. Of course, it is not limited to the above two, and those skilled in the art can also select an appropriate third predetermined distance according to the actual situation.

[0056] The above-mentioned processing device for weld images includes a processor and a memory. The above-mentioned acquisition unit, comparison unit, determination unit, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to implement corresponding functions.

[0057] The processor contains a kernel, and the kernel retrieves the corresponding program units from the memory. One or more kernels can be set, and by adjusting the kernel parameters, the accuracy of welding image processing affected by welding arc light in the prior art can be alleviated.

[0058] The memory may include non - permanent memory in the form of computer - readable media, random access memory (RAM) and / or non - volatile memory, such as read - only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0059] An embodiment of the present invention provides a storage medium, on which a program is stored, and when the program is executed by a processor, the above - mentioned method for processing weld images is implemented.

[0060] An embodiment of the present invention provides a processor, which is used to run a program, and when the program runs, the above - mentioned method for processing weld images is executed.

[0061] This application also provides a welding system, including a welding robot, a laser sensor, one or more processors, a memory, and one or more programs. Among them, the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include the method for any one of the above - mentioned methods.

[0062] In the above - mentioned system, since it includes any one of the above - mentioned methods for processing weld images, in this method, first, the current - frame weld image is obtained, and each pixel point of the target weld image is shifted multiple times to obtain multiple shifted weld images. Then, the pixel values of the pixel points at the corresponding positions of each of the above - mentioned shifted weld images and the non - target weld image are compared respectively, and an intermediate weld image is generated based on the pixel points with smaller pixel values at each position in the two compared images, obtaining multiple above - mentioned intermediate weld images. Finally, according to the sum of the pixel values of each of the above - mentioned intermediate weld images, it is determined that among the multiple above - mentioned intermediate weld images, the one with the largest sum of pixel values is the updated above - mentioned current - frame weld image. In this solution, the welding arc light has a higher brightness compared to the pixel points at other positions in the image, and its pixel value will also be larger. Therefore, by obtaining the pixel points with smaller pixel values at each position in the shifted weld image and the non - target weld image, the arc light in the image can be removed, so that the influence of the welding arc light during welding image processing can be reduced, and an intermediate weld image can be obtained. However, it is possible to remove the pixel points of the weld itself in the obtained intermediate weld image. Therefore, the intermediate weld image with the largest sum of pixel values is selected to update the current - frame weld image, so that the pixel points of the weld can be retained to the greatest extent. This solution can not only remove the arc light but also ensure that the obtained image is relatively accurate, thereby alleviating the problem in the prior art that the welding arc light affects the accuracy of welding image processing.

[0063] An embodiment of the present invention provides a device, which includes a processor, a memory, and a program stored on the memory and executable on the processor. When the processor executes the program, at least the following steps are implemented:

[0064] Step S101: Obtain the current-frame weld image, and shift each pixel point of the target weld image multiple times to obtain multiple shifted weld images. The shifting directions and / or shifting distances corresponding to the multiple shifted weld images are different. The target weld image is one of the current-frame weld image and the previous-frame weld image.

[0065] Step S102: Compare the pixel values of the pixel points at the corresponding positions of each of the shifted weld images and the non-target weld image respectively, and generate an intermediate weld image based on the pixel points with smaller pixel values at each position in the two compared images, obtaining multiple intermediate weld images. The non-target weld image is the weld image other than the target weld image in the current-frame weld image and the previous-frame weld image.

[0066] Step S103: According to the sum of the pixel values of each of the intermediate weld images, determine that the intermediate weld image with the largest sum of pixel values among the multiple intermediate weld images is the updated current-frame weld image.

[0067] The device in this article can be a server, a PC, a PAD, a mobile phone, etc.

[0068] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program initialized with at least the following method steps:

[0069] Step S101: Obtain the current-frame weld image, and shift each pixel point of the target weld image multiple times to obtain multiple shifted weld images. The shifting directions and / or shifting distances corresponding to the multiple shifted weld images are different. The target weld image is one of the current-frame weld image and the previous-frame weld image.

[0070] Step S102: Compare the pixel values of the pixel points at the corresponding positions of each of the shifted weld images and the non-target weld image respectively, and generate an intermediate weld image based on the pixel points with smaller pixel values at each position in the two compared images, obtaining multiple intermediate weld images. The non-target weld image is the weld image other than the target weld image in the current-frame weld image and the previous-frame weld image.

[0071] Step S103: According to the sum of the pixel values of each of the intermediate weld images, determine that the intermediate weld image with the largest sum of pixel values among the multiple intermediate weld images is the updated current-frame weld image.

[0072] In the above embodiments of the present invention, the descriptions of the respective embodiments have their own focuses. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0073] In several embodiments provided by this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are merely illustrative. For example, the above division of units can be a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling, direct coupling, or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of units or modules can be in an electrical or other form.

[0074] The units described above as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0075] In addition, in each embodiment of the present invention, each functional unit can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.

[0076] If the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the above methods in each embodiment of the present invention. The foregoing storage medium includes: various media such as USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks, or optical discs that can store program codes.

[0077] From the above description, it can be seen that the above embodiments of this application achieve the following technical effects:

[0078] 1) The method for processing the weld seam image of the present application first obtains the current frame weld seam image, and shifts each pixel point of the target weld seam image multiple times to obtain multiple shifted weld seam images. Then, it respectively compares the pixel values of the pixel points at the corresponding positions of each of the above-mentioned shifted weld seam images and the non-target weld seam image, and generates an intermediate weld seam image based on the pixel points with smaller pixel values at each position in the two compared images, obtaining multiple above-mentioned intermediate weld seam images. Finally, according to the sum of the pixel values of each of the above-mentioned intermediate weld seam images, it determines that among the multiple above-mentioned intermediate weld seam images, the one with the largest sum of pixel values is the updated above-mentioned current frame weld seam image. In this solution, the welding arc light has a higher brightness compared to the pixel points at other positions in the image, and its pixel value will also be larger. Therefore, by obtaining the pixel points with smaller pixel values at each position in the shifted weld seam image and the non-target weld seam image, the arc light in the image can be removed, thus reducing the influence of the welding arc light during welding image processing and obtaining the intermediate weld seam image. However, it is possible to remove the pixel points of the weld seam itself in the obtained intermediate weld seam image. Therefore, by selecting the intermediate weld seam image with the largest sum of pixel values to update the current frame weld seam image, the pixel points of the weld seam can be retained to the greatest extent. This solution can not only remove the arc light but also ensure that the obtained image is relatively accurate, thereby alleviating the problem in the prior art that the welding arc light affects the accuracy of welding image processing.

[0079] 2) The device for processing the weld seam image of the present application includes an acquisition unit that acquires the current frame weld seam image and shifts each pixel point of the target weld seam image multiple times to obtain multiple shifted weld seam images. A comparison unit respectively compares the pixel values of the pixel points at the corresponding positions of each of the above-mentioned shifted weld seam images and the non-target weld seam image, and generates an intermediate weld seam image based on the pixel points with smaller pixel values at each position in the two compared images, obtaining multiple above-mentioned intermediate weld seam images. A determination unit determines that among the multiple above-mentioned intermediate weld seam images, the one with the largest sum of pixel values is the updated above-mentioned current frame weld seam image according to the sum of the pixel values of each of the above-mentioned intermediate weld seam images. In this solution, the welding arc light has a higher brightness compared to the pixel points at other positions in the image, and its pixel value will also be larger. Therefore, by obtaining the pixel points with smaller pixel values at each position in the shifted weld seam image and the non-target weld seam image, the arc light in the image can be removed, thus reducing the influence of the welding arc light during welding image processing and obtaining the intermediate weld seam image. However, it is possible to remove the pixel points of the weld seam itself in the obtained intermediate weld seam image. Therefore, by selecting the intermediate weld seam image with the largest sum of pixel values to update the current frame weld seam image, the pixel points of the weld seam can be retained to the greatest extent. This solution can not only remove the arc light but also ensure that the obtained image is relatively accurate, thereby alleviating the problem in the prior art that the welding arc light affects the accuracy of welding image processing.

[0080] 3) The welding system of the present application includes any one of the above-mentioned methods for processing weld images. In this method, first, the current frame weld image is obtained, and each pixel point of the target weld image is shifted multiple times to obtain multiple shifted weld images. Then, the pixel values of the pixel points at the corresponding positions of each of the above-mentioned shifted weld images and the non-target weld image are compared respectively, and an intermediate weld image is generated based on the pixel points with smaller pixel values at each position in the two compared images, obtaining multiple above-mentioned intermediate weld images. Finally, according to the sum of the pixel values of each of the above-mentioned intermediate weld images, it is determined that among the multiple above-mentioned intermediate weld images, the one with the largest sum of pixel values is the updated above-mentioned current frame weld image. In this solution, the welding arc light has a higher brightness compared to the pixel points at other positions in the image, and its pixel value will also be larger. Therefore, by obtaining the pixel points with smaller pixel values at each position in the shifted weld image and the non-target weld image, the arc light in the image can be removed, so that the influence of the welding arc light during welding image processing can be reduced, and an intermediate weld image can be obtained. However, it is possible to remove the pixel points of the weld itself in the obtained intermediate weld image. Therefore, the intermediate weld image with the largest sum of pixel values is selected to update the current frame weld image, so that the pixel points of the weld can be retained to the greatest extent. This solution can not only remove the arc light but also ensure that the obtained image is relatively accurate, thus being able to alleviate the problem in the prior art that the welding arc light affects the accuracy of welding image processing.

[0081] The above are only the preferred embodiments of the present application and are not used to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the protection scope of the present application.

Claims

1. A method for processing a weld seam image, characterized in that, it includes: Obtain the current frame weld seam image, and shift each pixel point of the target weld seam image multiple times to obtain multiple shifted weld seam images. The shifting directions and / or shifting distances corresponding to the multiple shifted weld seam images are different. The target weld seam image is one of the current frame weld seam image and the previous frame weld seam image; Compare the pixel values of the pixel points at the corresponding positions of each of the shifted weld seam images and the non-target weld seam image respectively, and generate an intermediate weld seam image based on the pixel points with smaller pixel values at each position in the two compared images, obtaining multiple intermediate weld seam images. The non-target weld seam image is the weld seam image other than the target weld seam image in the current frame weld seam image and the previous frame weld seam image; According to the sum of the pixel values of each of the intermediate weld seam images, determine that the intermediate weld seam image with the largest sum of pixel values among the multiple intermediate weld seam images is the updated current frame weld seam image; After obtaining the weld seam image in real time and before shifting the target image multiple times to obtain multiple shifted images, the method further includes: Reduce the current frame weld seam image and the previous frame weld seam image respectively to obtain the reduced current frame weld seam image and the reduced previous frame weld seam image. The target weld seam image is one of the reduced current frame weld seam image and the reduced previous frame weld seam image; Generating an intermediate weld seam image based on the pixel points with smaller pixel values at each position in the two compared images, obtaining multiple intermediate weld seam images, including: Generating an initial intermediate weld seam image based on the pixel points with smaller pixel values at each position in the two compared images, obtaining multiple initial intermediate weld seam images; Calculate the sum of the pixel values of each of the initial intermediate weld seam images, compare the sums of the pixel values of all the initial intermediate weld seam images, and determine the initial intermediate weld seam image with the largest pixel value as the reference weld seam image; According to the shifting direction and shifting distance corresponding to the reference weld seam image, shift the target weld seam image at least once to obtain a target shifted weld seam image. The distance between the pixel points of the target shifted weld seam image and the reference weld seam image is less than the first predetermined distance; Compare the pixel values of the pixel points at the corresponding positions of the target shifted weld seam image and the non-target weld seam image, and generate a final intermediate weld seam image based on the pixel points with smaller pixel values at each position in the two compared images. The reference weld seam image and the final intermediate weld seam image constitute multiple intermediate weld seam images.

2. The method according to claim 1, characterized in that, Comparing the pixel values of the pixel points at the corresponding positions of each of the shifted weld seam images and the non-target weld seam image respectively includes: Grayscale the shifted weld seam image and the non-target weld seam image respectively; Compare the pixel values of the pixel points at the corresponding positions of each of the grayscaled shifted weld seam images and the grayscaled non-target weld seam image respectively.

3. The method according to claim 1, characterized in that, Performing multiple shifts on each pixel point of the target weld image to obtain multiple shifted weld images, including: Shifting each pixel point of the target weld image in multiple predetermined directions, and the multiple shift distances in each predetermined direction are different.

4. The method according to claim 3, characterized in that, shifting each pixel point of the target weld image in multiple predetermined directions includes: shifting each pixel point of the target weld image in a first predetermined direction multiple times, and the maximum shift distance of each shift is less than a second predetermined distance; shifting each pixel point of the target weld image in a second predetermined direction multiple times, and the maximum shift distance of each shift is less than a third predetermined distance, and the first predetermined direction and the second predetermined direction are perpendicular.

5. A processing device for weld images, characterized in that, comprising: an acquisition unit, configured to acquire the current frame weld image, and perform multiple shifts on each pixel point of the target weld image to obtain multiple shifted weld images, where the shift directions and / or shift distances corresponding to the multiple shifted weld images are different, and the target weld image is one of the current frame weld image and the previous frame weld image; a comparison unit, configured to respectively compare the pixel values of the pixel points at the corresponding positions of each shifted weld image and the non-target weld image, and generate an intermediate weld image based on the pixel points with smaller pixel values at each position in the two compared images, to obtain multiple intermediate weld images, and the non-target weld image is the weld image other than the target weld image in the current frame weld image and the previous frame weld image; a determination unit, configured to determine, according to the sum of the pixel values of each intermediate weld image, that one of the multiple intermediate weld images with the largest sum of pixel values is the updated current frame weld image; the device further includes a processing unit, and the processing unit is configured to respectively perform downscaling processing on the current frame weld image and the previous frame weld image after the weld image is acquired in real time and before the target image is shifted multiple times to obtain the downscaled current frame weld image and the downscaled previous frame weld image, and the target weld image is one of the downscaled current frame weld image and the downscaled previous frame weld image; The comparison unit includes a first generation module, a first comparison module, a first shifting module, and a second generation module. The first generation module is configured to generate an initial intermediate weld image based on the pixel points with smaller pixel values at each position in the two compared images, and obtain a plurality of initial intermediate weld images. The first comparison module is configured to calculate the sum of the pixel values of each of the initial intermediate weld images, and compare the sums of the pixel values of all the initial intermediate weld images to determine the initial intermediate weld image with the largest pixel value as the reference weld image. The first shifting module is configured to perform at least one shift on the target weld image according to the shifting direction and shifting distance corresponding to the reference weld image, to obtain a target shifted weld image, where the distance between the corresponding pixel points of the target shifted weld image and the reference weld image is less than a first predetermined distance. The second generation module is configured to compare the pixel values of the corresponding pixel points of the target shifted weld image and the non-target weld image, and generate a final intermediate weld image based on the pixel points with smaller pixel values at each position in the two compared images. The reference weld image and the final intermediate weld image constitute a plurality of the intermediate weld images.

6. A computer-readable storage medium, wherein, the computer-readable storage medium includes a stored program, wherein the program executes the method according to any one of claims 1 to 4.

7. A processor, wherein, the processor is configured to run a program, wherein when the program runs, it executes the method according to any one of claims 1 to 4.

8. A welding system, wherein, comprising: a welding robot, a laser sensor, one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a program for executing the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Welding image processing method and device and electronic equipment

    CN111681243A