CN109447986B - Welding image acquisition method and device, electronic equipment and storage medium - Google Patents

Welding image acquisition method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN109447986B
CN109447986B CN201811377651.7A CN201811377651A CN109447986B CN 109447986 B CN109447986 B CN 109447986B CN 201811377651 A CN201811377651 A CN 201811377651A CN 109447986 B CN109447986 B CN 109447986B
Authority
CN
China
Prior art keywords
image
lens
molten pool
pool area
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811377651.7A
Other languages
Chinese (zh)
Other versions
CN109447986A (en
Inventor
徐青松
李青
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Glority Software Ltd
Original Assignee
Hangzhou Glority Software Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Glority Software Ltd filed Critical Hangzhou Glority Software Ltd
Priority to CN201811377651.7A priority Critical patent/CN109447986B/en
Publication of CN109447986A publication Critical patent/CN109447986A/en
Application granted granted Critical
Publication of CN109447986B publication Critical patent/CN109447986B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/181Segmentation; Edge detection involving edge growing; involving edge linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30152Solder

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Image Processing (AREA)
  • Studio Devices (AREA)

Abstract

The invention provides a welding image acquisition method, a welding image acquisition device, electronic equipment and a storage medium, wherein the method comprises the following steps: in the welding process, a first image shot by a first shooting device and a second image shot by a second shooting device are obtained; calculating a transformation matrix according to an angle formed by the projection of the optical axes of the first lens and the second lens on the plane of the molten pool area; determining a contour map of the molten pool area from the second image, and obtaining a mask map for covering an area outside the molten pool area according to the contour map; and respectively carrying out transformation processing on the second image and the mask image based on the transformation matrix, and synthesizing the first image, the second image after the transformation processing and the mask image to obtain an acquired welding image. By applying the scheme of the invention, the problem that the welding image acquired in the prior art is difficult to distinguish the molten pool area from other areas can be solved.

Description

Welding image acquisition method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of welding technologies, and in particular, to a welding image acquisition method and apparatus, an electronic device, and a computer-readable storage medium.
Background
In the field of machine manufacturing, welding is an effective method for connecting metal materials, and the metal materials connected by welding are firmer, so that the welding machine has higher durability.
In the prior art, in order to ensure the welding quality, the welding process is generally required to be monitored. However, when the welding area is shot in the monitoring process, the welding area is too bright, so that the shot welding image is overexposed, and the molten pool area and other areas are difficult to distinguish.
Disclosure of Invention
The invention aims to provide a welding image acquisition method, a welding image acquisition device, electronic equipment and a computer readable storage medium, which are used for solving the problem that a weld pool area and other areas are difficult to distinguish by acquired welding images in the prior art.
In order to solve the technical problem, the invention provides a welding image acquisition method, which comprises the following steps:
step S101, in the welding process, obtaining a first image shot by a first shooting device and a second image shot by a second shooting device, wherein the definition of a molten pool area in the first image is smaller than that of an area outside the molten pool area, and the definition of the molten pool area in the second image is larger than that of the area outside the molten pool area;
step S102, calculating a transformation matrix according to an angle formed by the projection of the optical axes of a first lens and a second lens on the plane of the molten pool area, wherein the first lens is the lens of the first shooting device, and the second lens is the lens of the second shooting device;
step S103, determining a contour map of the molten pool area from the second image, and obtaining a mask map for covering an area outside the molten pool area according to the contour map;
and step S104, respectively carrying out transformation processing on the second image and the mask image based on the transformation matrix, and synthesizing the first image, the second image after the transformation processing and the mask image to obtain a collected welding image.
Optionally, step S103 determines a contour map of the molten pool region from the second image, including:
converting the second image into a grey-scale map;
carrying out self-adaptive thresholding and binarization processing on the gray-scale image to obtain a binarization image;
finding the contour point of the molten pool area in the binary image, and extracting the outermost contour point of the molten pool area;
and fitting the outermost contour points of the molten pool area to obtain a contour map of the outermost contour of the molten pool area.
Optionally, in step S103, obtaining a mask map for covering a region outside the molten pool region according to the profile map, including:
and obtaining a mask map for covering the region outside the molten pool region by modifying the pixel values of the pixel points outside the molten pool region in the contour map.
Optionally, the optical axes of the first lens and the second lens penetrate through the central point of the molten pool area, the included angles of the optical axes of the first lens and the second lens and the plane where the molten pool area is located are equal, and the distances from the first lens and the second lens to the central point of the molten pool area are equal.
Optionally, the transformation matrix is:
Figure BDA0001871168250000021
α represents an included angle between the optical axes of the first lens and the second lens and a plane where the molten pool area is located, β represents an angle formed by projections of the optical axes of the first lens and the second lens on the plane where the molten pool area is located, and r represents a distance from the first lens and the second lens to a central point of the molten pool area.
Optionally, an angle formed by projections of optical axes of the first lens and the second lens on a plane of the molten pool area is smaller than 90 degrees.
Optionally, the first lens is configured with an optical filter, and the second lens is configured with an optical filter and a dimmer.
The present invention also provides a welding image acquisition apparatus, the apparatus comprising:
the image acquisition module is used for acquiring a first image shot by a first shooting device and a second image shot by a second shooting device in the welding process, wherein the definition of a molten pool area in the first image is smaller than that of an area outside the molten pool area, and the definition of the molten pool area in the second image is larger than that of the area outside the molten pool area;
the calculation module is used for calculating a transformation matrix according to an angle formed by the projection of the optical axes of a first lens and a second lens on the plane of the molten pool area, wherein the first lens is the lens of the first shooting device, and the second lens is the lens of the second shooting device;
the image processing module is used for determining a contour map of the molten pool area from the second image and obtaining a mask map for covering an area outside the molten pool area according to the contour map;
and the image synthesis module is used for respectively carrying out transformation processing on the second image and the mask image based on the transformation matrix, and synthesizing the first image, the second image after the transformation processing and the mask image to obtain the collected welding image.
Optionally, the image processing module is specifically configured to convert the second image into a grayscale image; carrying out self-adaptive thresholding and binarization processing on the gray-scale image to obtain a binarization image; finding the contour point of the molten pool area in the binary image, and extracting the outermost contour point of the molten pool area; and fitting the outermost contour points of the molten pool area to obtain a contour map of the outermost contour of the molten pool area.
Optionally, the image processing module is specifically configured to obtain a mask map for covering a region outside the molten pool region by modifying pixel values of pixel points outside the molten pool region in the profile map.
Optionally, the optical axes of the first lens and the second lens penetrate through the central point of the molten pool area, the included angles of the optical axes of the first lens and the second lens and the plane where the molten pool area is located are equal, and the distances from the first lens and the second lens to the central point of the molten pool area are equal.
Optionally, the transformation matrix is:
Figure BDA0001871168250000041
α represents an included angle between the optical axes of the first lens and the second lens and a plane where the molten pool area is located, β represents an angle formed by projections of the optical axes of the first lens and the second lens on the plane where the molten pool area is located, and r represents a distance from the first lens and the second lens to a central point of the molten pool area.
Optionally, an angle formed by projections of optical axes of the first lens and the second lens on a plane of the molten pool area is smaller than 90 degrees.
Optionally, the first lens is configured with an optical filter, and the second lens is configured with an optical filter and a dimmer.
The invention also provides electronic equipment which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the method steps of any one welding image acquisition method when executing the program stored in the memory.
The present invention also provides a computer readable storage medium having a computer program stored therein, which computer program, when being executed by a processor, realizes the method steps of any one of the above described welding image acquisition.
Compared with the prior art, in the scheme provided by the invention, in the welding process, the first shooting device shoots the first image of which the definition of the molten pool area is smaller than that of the area outside the molten pool area, namely the shot image shows the characteristics of partial overexposure of the molten pool but clear periphery; the second shooting device shoots a second image with the definition of the molten pool area larger than that of the area outside the molten pool area, namely the shot image shows the characteristic that the molten pool part is clear but the surrounding is not high in resolution, then the outline of the molten pool area can be determined from the second image, a mask image used for covering the area outside the molten pool area is obtained according to the outline, meanwhile, a transformation matrix can be calculated according to the angle formed by the projection of the optical axes of the lenses of the two shooting devices on the plane of the molten pool area, the second image and the mask image are respectively subjected to transformation processing based on the transformation matrix, and then the first image, the second image after the transformation processing and the mask image are synthesized to obtain the collected welding image. The weld image after synthesis has clear weld pool part and clear periphery, can clearly distinguish the weld pool area from other areas, and has lower cost.
Drawings
FIG. 1 is a schematic flow chart of a welding image acquisition method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a photographing system for acquiring an image according to an embodiment of the present invention;
FIG. 3 is a block diagram of a welding image acquisition device according to an embodiment of the present invention;
fig. 4 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following describes a welding image acquisition method, a welding image acquisition device, an electronic device, and a computer-readable storage medium according to the present invention in further detail with reference to the accompanying drawings and specific embodiments. The advantages and features of the present invention will become more fully apparent from the appended claims and the following description.
In order to solve the problems in the prior art, embodiments of the present invention provide a welding image acquisition method and apparatus, an electronic device, and a computer-readable storage medium.
It should be noted that the welding image acquisition method according to the embodiment of the present invention may be applied to the welding image acquisition device according to the embodiment of the present invention, and the welding image acquisition device may be configured on an electronic device. The electronic device may be a personal computer, a mobile terminal, and the like, and the mobile terminal may be a hardware device having various operating systems, such as a mobile phone and a tablet computer.
Fig. 1 is a schematic flow chart of a welding image acquisition method according to an embodiment of the present invention, and referring to fig. 1, the welding image acquisition method may include the following steps:
step S101, in the welding process, a first image shot by a first shooting device and a second image shot by a second shooting device are obtained.
The first image and the second image both comprise a molten pool area and an area outside the molten pool area, and the definition of the molten pool area in the first image is smaller than that of the area outside the molten pool area, namely the shot image shows the characteristics that the molten pool is partially over-exposed and the periphery is clear; the definition of the molten pool area in the second image is larger than that of the area outside the molten pool, namely the shot image shows the characteristic that the molten pool part is clear but the surrounding is darker and has low resolution. The region outside the bath region is the region around the bath region.
In practical application, the first lens of the first shooting device can be provided with a filter lens, and the second lens of the second shooting device can be provided with a filter lens and a dimmer, so that the first shooting device can shoot a first image with exposure in a molten pool area and clear parts outside the molten pool area, and the second shooting device can shoot a second image with clear molten pool area and low surrounding dark resolution. Wherein, the optical filter can be the black optical filter, and the optical filter is used for filtering out the arc light interference of some wave bands, and the dimmer is used for reducing bright entering the second camera obtains reasonable exposure, in practical application, can use the optical filter and the dimmer of different parameters as required to obtain the first image and the second image that the definition degree satisfies the needs.
In addition, in practical application, the distances from the first lens and the second lens to the central point of a molten pool area formed by welding can be equal, and the optical axes of the first lens and the second lens penetrate through the central point of the molten pool area and are equal to the included angle of the plane where the molten pool area is located. It can be seen that the first shooting device and the second shooting device are symmetrically arranged relative to the molten pool area, specifically, before the welding image is collected, the two shooting devices are fixed, so that the optical axes of the lenses of the two shooting devices penetrate through the central point of the molten pool area, the included angles of the optical axes of the lenses and the plane where the molten pool area is located are equal, and the distances from the lenses to the central point of the molten pool area are equal.
And step S102, calculating a transformation matrix according to an angle formed by the projection of the optical axes of the first lens and the second lens on the plane of the molten pool area.
Wherein an angle formed by projections of optical axes of the first lens and the second lens on a plane of the molten pool area is smaller than 90 degrees, and the transformation matrix may be:
Figure BDA0001871168250000061
α represents an included angle between the optical axes of the first lens and the second lens and a plane where the molten pool area is located, β represents an angle formed by projections of the optical axes of the first lens and the second lens on the plane where the molten pool area is located, and r represents a distance from the first lens and the second lens to a central point of the molten pool area.
In the structural diagram of the photographing system shown in fig. 2, it is assumed that a rectangular region is formed by a molten pool and a region outside the molten pool, the optical axes of the lenses of the two photographing devices a and B pass through the central point of the molten pool region, the included angle between the optical axes of the lenses and the plane of the rectangular region is α (α is less than 90 degrees), the distance between the lenses and the central point is r, the included angle formed by the projections of the optical axes of the lenses of the two photographing devices on the plane of the rectangular region is β (β is less than 90 degrees), a spatial coordinate system exists, the plane of the rectangular region is parallel to the plane formed by the X axis and the Y axis, the position of the photographing device a can be set as an origin 1, and the position of the photographing device B is set as an origin 2, when the origin of the spatial coordinate system is shifted from the origin 1 to the origin 2, since the distances between the origin 1 and the origin 2 and the central point of the molten pool region are equal, it can be considered that the axis (central axis) passing through the molten pool region on the plane and perpendicular to the central point of the molten pool region is rotated β.
Let the coordinates of the central point of the molten pool area in the space coordinate system be (a, b, c), when b is 0, a is rcos α, c is rsin α.
Firstly, translation is carried out, the central point of a molten pool area is moved to an original point 1, and the corresponding matrix is as follows:
Figure BDA0001871168250000071
then, rotating around the Z axis, namely moving the central point of the molten pool area to the origin 2, wherein the corresponding matrix is as follows:
Figure BDA0001871168250000072
and translating again to move the central point of the molten pool area back to the original position, namely the original point 1, wherein the corresponding matrix is as follows:
Figure BDA0001871168250000073
in summary, the matrix obtained for rotation about the central axis is:
Figure BDA0001871168250000081
i.e. convert the matrix into
Figure BDA0001871168250000082
Step S103, determining a contour map of the molten pool area from the second image, and obtaining a mask map for covering an area outside the molten pool area according to the contour map.
In practical applications, step S102 may be executed after step S103 is executed, and the execution order of step S102 and step S103 is not limited in the present invention.
And step S104, performing transformation processing on the second image and the mask image based on the transformation matrix, and synthesizing the first image, the second image after the transformation processing and the mask image to obtain a collected welding image.
Specifically, the first image and the second image may be image-synthesized based on the OpenCV technique, so as to obtain a welding image in which the molten pool area is clear and the periphery is also clear.
In one implementation, the step S103 of determining the contour map of the molten pool area from the second image may include:
converting the second image into a grey-scale map;
carrying out self-adaptive thresholding and binarization processing on the gray-scale image to obtain a binarization image;
finding the contour point of the molten pool area in the binary image, and extracting the outermost contour point of the molten pool area;
and fitting the outermost contour points of the molten pool area to obtain a contour map of the outermost contour of the molten pool area.
It will be appreciated that the colour second image may be converted to a grey scale map for convenience of edge detection of the puddle, and the colour space of the image may be converted by calling the cvtColor function. Then, self-adaptive thresholding processing is carried out on the gray-scale image by calling an adaptive threshold function, the Gaussian mean value of each region in the gray-scale image is calculated, an offset value is subtracted to obtain a threshold value in the region, and binarization processing is carried out on pixel points in the region according to the threshold value, so that a binarization image is obtained. The contour points of the weld pool region are found in the binary map by calling the findContours function, and only the outermost contour points need to be extracted here. And fitting the outline points of the outermost layer of the molten pool by calling an approxPlyDP function to obtain a closed outline map of the outermost layer of the molten pool.
After obtaining the contour map of the molten pool area, the step S103 obtains a mask map for covering an area outside the molten pool area according to the contour map, which may include: and obtaining a mask map for covering the region outside the molten pool region by modifying the pixel values of the pixel points outside the molten pool region in the contour map. Specifically, the pixel value of the pixel point outside the molten pool area in the contour map may be modified to 0, so as to obtain a mask map for covering other parts outside the molten pool area.
In step S104, a function warp perspective may be called according to the transformation matrix obtained in step S102 to perform perspective transformation on the second image and the mask map respectively, and the second image captured from the perspective of the second camera may be transformed into an image captured from the perspective of the first camera, and the mask map may be transformed into an image at the first camera. And then calling a copy to function to cover the transformed second image on the first image, and simultaneously transmitting a masking map to ensure that only the molten pool area part of the second image can be covered on the first image without influencing pixel points of other parts except the molten pool area. The welding image obtained after the synthesis processing is the clear image of the molten pool part and the periphery.
In summary, compared with the prior art, according to the scheme provided by the invention, in the welding process, the first image with the definition of the molten pool area smaller than that of the area outside the molten pool area is shot by the first shooting device, that is, the shot image shows the characteristics that the molten pool is partially overexposed and the periphery is clear; the second shooting device shoots a second image with the definition of the molten pool area larger than that of the area outside the molten pool area, namely the shot image shows the characteristic that the molten pool part is clear but the surrounding is not high in resolution, then the outline of the molten pool area can be determined from the second image, a mask image used for covering the area outside the molten pool area is obtained according to the outline, meanwhile, a transformation matrix can be calculated according to the angle formed by the projection of the optical axes of the lenses of the two shooting devices on the plane of the molten pool area, the second image and the mask image are respectively subjected to transformation processing based on the transformation matrix, and then the first image, the second image and the mask image after the transformation processing are synthesized to obtain the collected welding image. The weld image after synthesis has clear weld pool part and clear periphery, can clearly distinguish the weld pool area from other areas, and has lower cost.
Corresponding to the above welding image acquisition method, the present invention also provides a welding image acquisition apparatus, as shown in fig. 3, the apparatus comprising:
the image acquisition module 201 is configured to acquire a first image captured by a first camera and a second image captured by a second camera during welding, where a definition of a molten pool area in the first image is smaller than a definition of an area outside the molten pool area, that is, a feature that a molten pool part is overexposed and a periphery is clear is presented in the captured image, and a definition of the molten pool area in the second image is larger than a definition of the area outside the molten pool area, that is, a feature that the molten pool part is clear and a periphery is dark and has low resolution is presented in the captured image;
a calculating module 202, configured to calculate a transformation matrix according to an angle formed by projections of optical axes of a first lens and a second lens on a plane where the molten pool area is located, where the first lens is a lens of the first shooting device, and the second lens is a lens of the second shooting device;
an image processing module 203, configured to determine a profile of the molten pool area from the second image, and obtain a mask map for covering an area outside the molten pool area according to the profile;
and the image synthesis module 204 is configured to perform transformation processing on the second image and the mask map respectively based on the transformation matrix, and synthesize the first image, the transformed second image and the mask map to obtain an acquired welding image.
Optionally, the image processing module 203 is specifically configured to convert the second image into a grayscale map; carrying out self-adaptive thresholding and binarization processing on the gray-scale image to obtain a binarization image; finding the contour point of the molten pool area in the binary image, and extracting the outermost contour point of the molten pool area; and fitting the outermost contour points of the molten pool area to obtain a contour map of the outermost contour of the molten pool area.
Optionally, the image processing module 203 is specifically configured to obtain a mask map for covering a region outside the molten pool region by modifying pixel values of pixel points outside the molten pool region in the profile map.
Optionally, the optical axes of the first lens and the second lens penetrate through the central point of the molten pool area, the included angles of the optical axes of the first lens and the second lens and the plane where the molten pool area is located are equal, and the distances from the first lens and the second lens to the central point of the molten pool area are equal.
Optionally, the transformation matrix is:
Figure BDA0001871168250000111
α represents an included angle between the optical axes of the first lens and the second lens and a plane where the molten pool area is located, β represents an angle formed by projections of the optical axes of the first lens and the second lens on the plane where the molten pool area is located, and r represents a distance from the first lens and the second lens to a central point of the molten pool area.
Optionally, an angle formed by projections of optical axes of the first lens and the second lens on a plane of the molten pool area is smaller than 90 degrees.
Optionally, the first lens is configured with an optical filter, and the second lens is configured with an optical filter and a dimmer.
As for the welding image collecting device disclosed in the present embodiment, since it is substantially similar to the embodiment of the welding image collecting method, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the embodiment of the welding image collecting method.
The invention also provides an electronic device, as shown in fig. 4, comprising a processor 301, a communication interface 302, a memory 303 and a communication bus 304, wherein the processor 301, the communication interface 302 and the memory 303 complete mutual communication through the communication bus 304,
a memory 303 for storing a computer program;
the processor 301, when executing the program stored in the memory 303, implements the following steps:
step S101, in the welding process, obtaining a first image shot by a first shooting device and a second image shot by a second shooting device, wherein the definition of a molten pool area in the first image is smaller than that of an area outside the molten pool area, namely the shot image shows the characteristics that a molten pool part is over-exposed and the periphery is clear, and the definition of the molten pool area in the second image is larger than that of the area outside the molten pool area, namely the shot image shows the characteristics that the molten pool part is clear and the periphery is dark and has low resolution;
step S102, calculating a transformation matrix according to an angle formed by the projection of the optical axes of the first lens and the second lens on the plane of the molten pool area, wherein the first lens is the lens of the first shooting device, and the second lens is the lens of the second shooting device;
step S103, determining a contour map of the molten pool area from the second image, and obtaining a mask map for covering an area outside the molten pool area according to the contour map;
and step S104, respectively carrying out transformation processing on the second image and the mask image based on the transformation matrix, and synthesizing the first image, the second image after the transformation processing and the mask image to obtain a collected welding image.
For specific implementation and related explanation of each step of the method, reference may be made to the method embodiment shown in fig. 1, which is not described herein again.
In addition, other implementation manners of the welding image acquisition method implemented by the processor 301 executing the program stored in the memory 303 are the same as those mentioned in the foregoing method embodiment, and are not described herein again.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
The invention further provides a computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method steps of the above-mentioned welding image acquisition method.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only for the purpose of describing the preferred embodiments of the present invention, and is not intended to limit the scope of the present invention, and any variations and modifications made by those skilled in the art based on the above disclosure are within the scope of the appended claims.

Claims (12)

1. A welding image acquisition method, comprising:
step S101, in the welding process, obtaining a first image shot by a first shooting device and a second image shot by a second shooting device, wherein the definition of a molten pool area in the first image is smaller than that of an area outside the molten pool area, and the definition of the molten pool area in the second image is larger than that of the area outside the molten pool area;
step S102, calculating a transformation matrix according to an angle formed by the projection of the optical axes of a first lens and a second lens on the plane of the molten pool area, wherein the first lens is the lens of the first shooting device, and the second lens is the lens of the second shooting device;
step S103, determining a contour map of the molten pool area from the second image, and obtaining a mask map for covering an area outside the molten pool area according to the contour map;
step S104, respectively carrying out transformation processing on the second image and the mask image based on the transformation matrix, and synthesizing the first image, the second image after the transformation processing and the mask image to obtain a collected welding image;
step S103 determines a contour map of the molten pool area from the second image, including:
converting the second image into a grey-scale map;
carrying out self-adaptive thresholding and binarization processing on the gray-scale image to obtain a binarization image;
finding the contour point of the molten pool area in the binary image, and extracting the outermost contour point of the molten pool area;
fitting the outermost contour point of the molten pool area to obtain a contour map of the outermost contour of the molten pool area;
step S103, obtaining a mask map for covering the region outside the molten pool region according to the profile map, and the method comprises the following steps:
and obtaining a mask map for covering the region outside the molten pool region by modifying the pixel values of the pixel points outside the molten pool region in the contour map.
2. The welding image acquisition method according to claim 1, wherein optical axes of the first lens and the second lens both pass through a central point of the molten pool area, included angles between the optical axes of the first lens and the second lens and a plane where the molten pool area is located are equal, and distances from the first lens and the second lens to the central point of the molten pool area are equal.
3. The welding image acquisition method of claim 2, wherein the transformation matrix is:
Figure FDA0002493256920000021
α represents an included angle between the optical axes of the first lens and the second lens and a plane where the molten pool area is located, β represents an angle formed by projections of the optical axes of the first lens and the second lens on the plane where the molten pool area is located, and r represents a distance from the first lens and the second lens to a central point of the molten pool area.
4. The welding image acquisition method according to claim 3, wherein an angle formed by projections of optical axes of the first lens and the second lens on a plane on which the molten pool area is located is smaller than 90 degrees.
5. The welding image capturing method of claim 1, wherein the first lens is configured with an optical filter, and the second lens is configured with an optical filter and a dimmer.
6. A welding image acquisition apparatus, characterized in that the apparatus comprises:
the image acquisition module is used for acquiring a first image shot by a first shooting device and a second image shot by a second shooting device in the welding process, wherein the definition of a molten pool area in the first image is smaller than that of an area outside the molten pool area, and the definition of the molten pool area in the second image is larger than that of the area outside the molten pool area;
the calculation module is used for calculating a transformation matrix according to an angle formed by the projection of the optical axes of a first lens and a second lens on the plane of the molten pool area, wherein the first lens is the lens of the first shooting device, and the second lens is the lens of the second shooting device;
the image processing module is used for determining a contour map of the molten pool area from the second image and obtaining a mask map for covering an area outside the molten pool area according to the contour map;
the image synthesis module is used for respectively carrying out transformation processing on the second image and the mask image based on the transformation matrix, and synthesizing the first image, the second image after the transformation processing and the mask image to obtain a collected welding image;
the image processing module is specifically configured to convert the second image into a grayscale image; carrying out self-adaptive thresholding and binarization processing on the gray-scale image to obtain a binarization image; finding the contour point of the molten pool area in the binary image, and extracting the outermost contour point of the molten pool area; fitting the outermost contour point of the molten pool area to obtain a contour map of the outermost contour of the molten pool area;
the image processing module is specifically configured to obtain a mask map for covering an area outside the molten pool area by modifying pixel values of pixel points outside the molten pool area in the profile map.
7. The welding image acquisition device according to claim 6, wherein the optical axes of the first lens and the second lens both pass through the central point of the molten pool area, the included angles between the optical axes of the first lens and the second lens and the plane where the molten pool area is located are equal, and the distances from the first lens and the second lens to the central point of the molten pool area are equal.
8. The welding image acquisition device according to claim 7, wherein the transformation matrix is:
Figure FDA0002493256920000031
α represents an included angle between the optical axes of the first lens and the second lens and a plane where the molten pool area is located, β represents an angle formed by projections of the optical axes of the first lens and the second lens on the plane where the molten pool area is located, and r represents a distance from the first lens and the second lens to a central point of the molten pool area.
9. The welding image acquisition device according to claim 8, wherein an angle formed by projections of optical axes of the first lens and the second lens on a plane on which the molten pool area is located is less than 90 degrees.
10. The welding image acquisition device according to claim 6, wherein the first lens is provided with a filter, and the second lens is provided with a filter and a dimmer.
11. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1 to 5 when executing a program stored in the memory.
12. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1-5.
CN201811377651.7A 2018-11-19 2018-11-19 Welding image acquisition method and device, electronic equipment and storage medium Active CN109447986B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811377651.7A CN109447986B (en) 2018-11-19 2018-11-19 Welding image acquisition method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811377651.7A CN109447986B (en) 2018-11-19 2018-11-19 Welding image acquisition method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109447986A CN109447986A (en) 2019-03-08
CN109447986B true CN109447986B (en) 2020-08-04

Family

ID=65553840

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811377651.7A Active CN109447986B (en) 2018-11-19 2018-11-19 Welding image acquisition method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109447986B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110490866B (en) * 2019-08-22 2020-05-15 四川大学 Metal additive forming size real-time prediction method based on depth feature fusion
TWI744999B (en) * 2020-07-23 2021-11-01 和碩聯合科技股份有限公司 Method for training solder joint detecting model, method for detecting solder joint, and solder joint detecting device
CN114619170A (en) * 2022-02-17 2022-06-14 毛望龙 Intelligent monitoring device and method for welding pool imaging
CN114473140A (en) * 2022-02-22 2022-05-13 上海电力大学 Molten pool image parallel acquisition method based on time division multiplexing

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104574362A (en) * 2014-12-01 2015-04-29 汕头大学 Passive visual system-based molten pool edge extraction method
CN106112318A (en) * 2016-07-13 2016-11-16 桂林航天工业学院 The online welding seam tracking method of a kind of view-based access control model and system
CN107378328A (en) * 2017-09-08 2017-11-24 郑州云海信息技术有限公司 A kind of recording method for welding operation and device
CN108320280A (en) * 2018-01-16 2018-07-24 南京理工大学 The crater image method for detecting abnormality of view-based access control model clarity and contours extract

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104574362A (en) * 2014-12-01 2015-04-29 汕头大学 Passive visual system-based molten pool edge extraction method
CN106112318A (en) * 2016-07-13 2016-11-16 桂林航天工业学院 The online welding seam tracking method of a kind of view-based access control model and system
CN107378328A (en) * 2017-09-08 2017-11-24 郑州云海信息技术有限公司 A kind of recording method for welding operation and device
CN108320280A (en) * 2018-01-16 2018-07-24 南京理工大学 The crater image method for detecting abnormality of view-based access control model clarity and contours extract

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
灰度形态学提取焊接熔池图像边缘技术;郑相锋等;《焊接学报》;20070131;第28卷(第1期);第105-108页 *

Also Published As

Publication number Publication date
CN109447986A (en) 2019-03-08

Similar Documents

Publication Publication Date Title
CN109447986B (en) Welding image acquisition method and device, electronic equipment and storage medium
CN109712102B (en) Image fusion method and device and image acquisition equipment
US9858651B2 (en) Electronic device and method in an electronic device for processing image data
JP6469678B2 (en) System and method for correcting image artifacts
CN110493525B (en) Zoom image determination method and device, storage medium and terminal
KR101662846B1 (en) Apparatus and method for generating bokeh in out-of-focus shooting
CN110796600B (en) Image super-resolution reconstruction method, image super-resolution reconstruction device and electronic equipment
CN110211110B (en) Component size detection method and system and terminal equipment
CN109005367B (en) High dynamic range image generation method, mobile terminal and storage medium
CN112738411B (en) Exposure adjusting method, exposure adjusting device, electronic equipment and storage medium
CN110855876B (en) Image processing method, terminal and computer storage medium
CN113344821B (en) Image noise reduction method, device, terminal and storage medium
CN110971841A (en) Image processing method, image processing device, storage medium and electronic equipment
CN111383278A (en) Calibration method, device and equipment for double cameras
CN110598712B (en) Object position identification method and device, computer equipment and storage medium
CN111405185A (en) Zoom control method and device for camera, electronic equipment and storage medium
CN113673474B (en) Image processing method, device, electronic equipment and computer readable storage medium
CN114418914A (en) Image processing method, image processing device, electronic equipment and storage medium
CN114569004B (en) Travel direction adjustment method, mobile robot system and electronic device
CN115719314A (en) Smear removing method, smear removing device and electronic equipment
CN113592753A (en) Image processing method and device based on industrial camera shooting and computer equipment
CN110868549B (en) Exposure control method and device and electronic equipment
CN110691197A (en) Shooting tracking method and device and electronic equipment
CN111915497A (en) Image black and white enhancement method and device, electronic equipment and readable storage medium
CN110809116A (en) Shooting tracking method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant