A method for detecting the completion degree of flame brazing of metal pipe joints
By performing image processing on welding videos, the flame internal flame image is extracted and the welding completion degree is judged, which solves the problem of poor accuracy and adaptability of welding completion degree judgment in the prior art, and achieves more efficient and reliable welding detection.
Patent Information
- Application Number
- CN202411866699.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-12-18
AI Technical Summary
The existing flame brazing detection methods have poor accuracy and adaptability when judging the welding completion degree, especially when the quality of the welding wire is inconsistent.
By collecting welding videos and performing frame processing, the flame image is pre-processed, normalized, threshold segmented and morphological operations are used to extract the flame internal flame image, and the welding completion degree is automatically judged based on the flame characteristics.
It improves the efficiency and reliability of welding completion judgment, enhances adaptability, and can adapt to changes in different welding wire quality and welding conditions.
Smart Images

Figure CN119338850B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of brazing detection, and in particular to a method for detecting the completion of flame brazing of a metal pipe joint. Background Art
[0002] Fuel and gas vehicle engines need to be connected to other components through folded and bent metal pipes of various sizes to achieve the transportation or circulation of oil, gas, water, etc. These metal pipes are usually connected in multiple sections by flame brazing to facilitate the direction adjustment during pipeline layout and the need to connect with different interface sizes.
[0003] Under the condition that the flame energy provided by the welding gun is stable and unchanged, the flame burning time during welding needs to be strictly controlled. If the time is too short, the metal in the welding part will not reach the required melting conditions and cannot be welded through. If the time is too long, the metal welding wire in the welding part will be vaporized in large quantities, especially the metal welding wire with low melting point, which will cause the weld to be discontinuous and leak.
[0004] At present, flame brazing of automobile metal pipelines has achieved robot automatic welding, but the completion of welding mainly relies on manual observation and control, or the welding time of the welding parts of the batch is set in the program based on the prior statistics of the welding time required for the same batch of welding parts as the standard for welding completion and stopping; but manual judgment has inconsistent standards and fatigue and efficiency problems; if the welding time is set according to the statistical average welding time of the same batch of products, it cannot adapt to the fluctuation of the welding time required due to the possible inconsistency of welding wire quality such as material and size. Summary of the invention
[0005] In view of the shortcomings of the existing methods, the present invention solves the problems of poor accuracy and adaptability of the existing method of judging the completion of welding by welding time.
[0006] The technical solution adopted by the present invention is: a method for detecting the completion degree of flame brazing of a metal pipe joint comprises the following steps:
[0007] Step 1: Collect the welding video of automobile metal pipe joints and perform frame processing on the video;
[0008] As a preferred embodiment of the present invention, a color industrial camera is used for video acquisition.
[0009] Step 2: Segment the flame and background in the frame image;
[0010] Step 21, preprocessing the welding wire burning flame image to obtain an image M1;
[0011] As a preferred implementation of the present invention, the preprocessing includes: denoising, contrast adjustment and brightness adjustment.
[0012] Step 22, normalize the pixel values of the RGB three channels of M1 and convert them to the YCbCr color space to obtain image M2;
[0013] Step 23, create a binary mask mask1 with the same width and height as M2, filter the pixel point P1 in M2 whose Y and Cb channels are greater than the first threshold, and set the pixel value of the corresponding position of P1 in mask1 to 1;
[0014] Step 24, perform a bitwise AND operation on mask1 and M1 to segment the flame foreground, and obtain image M3;
[0015] Step 25, convert M3 into HSV color to obtain image M4; and create a binary mask mask2 with the same width and height as M4, filter the pixel point P2 in M4 within the HSV threshold range, and set the pixel value of the corresponding position of P2 in mask2 to 1;
[0016] As a preferred implementation manner of the present invention, the lower limits of H, S, and V in the HSV threshold are 20, 50, and 70, respectively.
[0017] As a preferred implementation manner of the present invention, the upper limits of H, S, and V in the HSV threshold are 40, 255, and 255, respectively.
[0018] Step 26, perform a bitwise AND operation on M1 and mask2 to obtain the flame inner flame image M5;
[0019] Step 3: Extract the inner flame image frame by frame and judge the welding completion degree according to the flame characteristics;
[0020] As a preferred implementation manner of the present invention, the frame-by-frame method further includes: frame extraction.
[0021] As a preferred embodiment of the present invention, step three specifically includes:
[0022] Step 31: Calculate the number of pixels whose pixel values are not 0 from M5 corresponding to a certain frame image. a ,when a is greater than the second threshold N1 and the next frame a If it continues to increase, the judgment will continue to the next frame;
[0023] Step 32: When the next frame of image is a When it is smaller than the previous frame, the M5 corresponding to the next frame image is subjected to morphological closing operation to fill the small holes, and then the connected area is marked; when the connected area is marked as 1, it is determined that the welding is completed at the corresponding moment of a certain frame.
[0024] As a preferred embodiment of the present invention, a flame brazing completion detection system for metal pipe joints includes: a memory for storing instructions executable by a processor; and a processor for executing the instructions to implement a flame brazing completion detection method for metal pipe joints.
[0025] As a preferred embodiment of the present invention, a computer readable medium stores computer program codes, and when the computer program codes are executed by a processor, a method for detecting the degree of completion of flame brazing of a metal pipe joint is implemented.
[0026] Beneficial effects of the present invention:
[0027] 1. Through two binary mask operations, the flame inner flame image is quickly identified;
[0028] 2. Automatically judge the degree of welding completion through the flame characteristics during flame brazing, which improves efficiency and reliability compared with manual judgment, and has better adaptability and accuracy compared with the judgment of welding time set by software;
[0029] 3. The method of the present invention is highly portable. When changing the batch of welding objects causes changes in welding conditions, such as material, size, flame intensity, etc., only a small amount of experiments are needed to obtain the corresponding threshold parameters to realize the judgment of the changed welding object. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 It is a flow chart of the method for detecting the degree of completion of flame brazing of a metal pipe joint of the present invention;
[0031] Figure 2 This is a completed image of flame brazing of an automobile metal pipe joint of the present invention;
[0032] Figure 3 is an image of the automotive metal pipe joint during flame brazing of the present invention;
[0033] Figure 4 It is a curve diagram of the area change of the yellow flame zone during the welding process of the automobile metal pipe joint of the present invention. DETAILED DESCRIPTION
[0034] The present invention is further described below in conjunction with the accompanying drawings and embodiments. This figure is a simplified schematic diagram, which only illustrates the basic structure of the present invention in a schematic manner, and therefore it only shows the components related to the present invention.
[0035] like Figure 1 As shown, a method for detecting the completion of flame brazing of a metal pipe joint comprises the following steps:
[0036] Step 1: Collect the welding video of automobile metal pipe joints and perform frame processing on the video;
[0037] The brazing video of automobile metal pipe joints is shot using a color industrial camera with a corresponding frame rate of 60Hz. The camera is fixed during shooting and automatically starts shooting through an external signal trigger. To reduce the amount of data storage and processing, the time to trigger the start of shooting is set based on actual conditions. For example, a timer is used to let the welding gun spray flame for a certain period of time before sending a command to trigger the camera to start shooting.
[0038] Step 2: Segment the flame and background in the frame image;
[0039] Specifically include:
[0040] Step 21, performing image preprocessing on the welding wire burning flame image to obtain an image M1;
[0041] Preprocessing includes: denoising, contrast adjustment and brightness adjustment;
[0042] Step 22, normalize the pixel values of the RGB three channels of the image M1, that is, map the pixel values from the range of 0 to 255 to the range of 0 to 1, and convert them to the YCbCr color space to obtain the image M2;
[0043] Among them, the formula of YCbCr color space is:
[0044]
[0045] Among them, Y, Cb, Cr represent brightness, blue chromaticity and red chromaticity values respectively; R, G, B represent red, green, and blue color values respectively.
[0046] Step 23, create a single-channel binary mask mask1 with the same width and height as M2, filter the pixel points P1 in the Y and Cb channels of M2 that are greater than the first threshold, set the pixel value of the corresponding position of P1 in mask1 to 1, that is, the flame part, and the other pixel values are 0; the Y in the first threshold is 100-200; the Cb in the first threshold is 70-150; preferably Y=120, Cb=85.
[0047] Step 24, perform a bitwise AND operation on mask1 and M1 to segment the flame foreground, and obtain image M3;
[0048] Step 25, convert M3 into HSV color to obtain image M4; and create a single-channel binary mask mask2 with the same width and height as M4, set the HSV thresholds of hue H, saturation S, and brightness V; filter the pixel point P2 in M4 within the HSV threshold range, set the pixel value of the corresponding position of P2 in mask2 to 1, and the rest to 0; in this embodiment, the lower limits of H, S, and V in the HSV threshold are: 20, 50, and 70, respectively, and the upper limits of H, S, and V in the HSV threshold are 40, 255, and 255.
[0049] Step 26: Perform a bitwise AND operation on M1 and mask2 to obtain the flame inner flame image M5.
[0050] Step 3: Extract the inner flame image frame by frame and judge the welding completion degree according to the flame characteristics;
[0051] In order to improve the operation efficiency, the frames can be extracted by frame, that is, the extraction is performed at intervals of several frames, for example, 60 frames are spaced between two frames as one extraction.
[0052] Specifically include:
[0053] Step 31: Calculate the number of pixels whose pixel values are not 0 from M5 corresponding to a certain frame image. a ,when a is greater than the second threshold N1 and the next frame a If it continues to increase, the judgment will continue to the next frame;
[0054] Step 32: When the next frame of image is a When it is smaller than the previous frame, the M5 corresponding to the next frame image is subjected to morphological closing operation to fill the small holes, and then the connected regions are marked; when the connected region mark after removing the background region is 1, it is determined that the welding is completed at the corresponding moment of a certain frame; if it is not 1, the subsequent frames are continuously extracted.
[0055] like Figure 2 The left picture is an image M1 extracted from a flame brazing frame. Figure 2 The right picture is the corresponding flame inner flame image M5; Figure 2 The left figure shows that at the corresponding moment, the welding wire and the metal pipes and joints to be welded have melted to varying degrees, especially the rapid melting of the low-melting-point welding wire and its participation in combustion, resulting in a significant change in the color of the flame compared to the color when the welding wire is not burning; specifically, the color of the flame in the welding area changes from red to yellow, and the more intense the welding wire burns, the larger the yellow area of the flame is. When the area of the yellow area increases rapidly and then decreases rapidly, and the connected area of the yellow area is marked as 1, it indicates that the welding wire has been completely melted and the welding is completed, that is, Figure 2 The connected area in the right figure is marked as 1, which means there is only one connected area.
[0056] Extract one frame of image every 60 frames in time sequence and calculate the number of pixels in the foreground of the flame inner flame image M5, that is, the "yellow" area a As the flame area, the flame area is plotted in the time sequence of the frames as follows: Figure 4 As shown, in this example, the second threshold value N1 is set to 12000, and N1 can be obtained by combining the test statistics of welding parts of the same batch and the same conditions; a >12000 and the next extracted frame image aIf the number of frames extracted is still increasing compared to the previous one, continue processing and comparison; if the curve rises quickly and then drops quickly to directly determine that the welding is completed, it will cause a wrong judgment; according to Figure 2 , Figure 3 and Figure 4 Curve analysis, Figure 3 correspond Figure 4 In the 12th frame of the curve, Figure 2 Corresponds to Figure 4 In the 17th frame of the curve, due to Figure 3 When the inner flame is burning, multiple yellow areas appear, that is, the number of connected area marks ≠ 1. Even if the area curve meets the conditions of rapid rise and then decline, the welding is not completed at this time. Therefore, first determine whether the curve meets the conditions of rapid rise and then decline. Secondly, determine whether the inner flame is concentrated in one area, that is, whether the number of connected area marks is 1. If both conditions are met, it means that the welding wire has been completely melted, the flame begins to decay, and the welding is completed.
[0057] Based on the above ideal embodiments of the present invention, the relevant staff can make various changes and modifications without departing from the technical concept of the present invention through the above description. The technical scope of the present invention is not limited to the contents of the specification, and its technical scope must be determined according to the scope of the claims.
Claims
1. A method for detecting the completion of flame brazing of a metal pipe joint, characterized in that: The following steps are involved: Step 1: Collect the welding video of automobile metal pipe joints and perform frame processing on the video; Step 2: Segment the flame and background in the frame image; Step 21, preprocessing the welding wire burning flame image to obtain an image M1; Step 22, normalize the pixel values of the RGB three channels of M1 and convert them to the YCbCr color space to obtain image M2; Step 23, create a binary mask mask1 with the same width and height as M2, filter the pixel point P1 in M2 whose Y and Cb channels are greater than the first threshold, and set the pixel value of the corresponding position of P1 in mask1 to 1; Step 24, perform a bitwise AND operation on mask1 and M1 to segment the flame foreground, and obtain image M3; Step 25, convert M3 into HSV color to obtain image M4; and create a binary mask mask2 with the same width and height as M4, filter the pixel point P2 in M4 within the HSV threshold range, and set the pixel value of the corresponding position of P2 in mask2 to 1; Step 26, perform a bitwise AND operation on M1 and mask2 to obtain the flame inner flame image M5; Step 3: Extract the inner flame image frame by frame and judge whether the welding is completed according to the flame characteristics; Step 3 Specific include: Step 31: Calculate the number of pixels whose pixel values are not 0 from M5 corresponding to a certain frame image. a ,when a is greater than the second threshold N1 and the next frame a If it continues to increase, the judgment will continue to the next frame; Step 32: When the next frame of image is a When it is smaller than the previous frame, the M5 corresponding to the next frame image is subjected to morphological closing operation to fill the small holes, and then the connected area is marked; when the connected area is marked as 1, it is determined that the welding is completed at the corresponding moment of a certain frame.
2. The method for detecting the completion degree of flame brazing of metal pipe joints according to claim 1, characterized in that: The video is captured using a color industrial camera.
3. The method for detecting the completion degree of flame brazing of metal pipe joints according to claim 1, characterized in that: Preprocessing includes: De-noise, adjust contrast and brightness.
4. The method for detecting the completion degree of flame brazing of metal pipe joints according to claim 1, characterized in that: The lower limits of H, S, and V in the HSV threshold are 20, 50, and 70, respectively.
5. The method for detecting the completion degree of flame brazing of metal pipe joints according to claim 1, characterized in that: The upper limits of H, S, and V in the HSV threshold are 40, 255, and 255, respectively.
6. The method for detecting the completion degree of flame brazing of metal pipe joints according to claim 1, characterized in that: By frame also includes: extracting frames.
7. Metal pipe joint flame brazing completion detection system, characterized in that: include: a memory for storing instructions executable by a processor; A processor is used to execute instructions to implement the method for detecting the completion degree of flame brazing of a metal pipe joint as described in any one of claims 1 to 6.
8. A computer readable medium storing a computer program code, characterized in that: The computer program code, when executed by a processor, implements the method for detecting the degree of completion of flame brazing of a metal pipe joint as claimed in any one of claims 1 to 6.
Citation Information
Patent Citations
Method for real-time monitoring gas heating furnace flame on the basis of ROI average image analysis
CN105678295A
Welding auxiliary method and system for detecting welding process parameters
CN114147389A