New energy welding quality detection method and system based on image processing
Through the new energy welding quality detection method based on image processing, the traditional detection efficiency is solved and the problems of inefficient and prone to missed detection are easily solved, efficient and accurate welding quality detection is achieved, and cost and workpiece damage risk are reduced.
Patent Information
- Application Number
- CN202411581706.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-11-07
AI Technical Summary
Traditional new energy welding quality inspection relies on manual visual or X-ray detection, which is inefficient and prone to false detection and missed detection.
Using an image processing-based method, welded images are collected, preprocessed, image enhancement, superpixel area determination and significant image fusion, and finally welded images are input into the quality detection model to output welding quality results.
It improves the efficiency and accuracy of welding quality inspection, reduces inspection costs, avoids workpiece damage and contamination, and realizes automated inspection and data statistics.
Smart Images

Figure CN119501364A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of new energy welding, and in particular to a new energy welding quality detection method and system based on image processing. Background Art
[0002] With the vigorous development of the new energy industry, the application of welding technology in it has become increasingly important. Welding quality is directly related to the performance, safety and reliability of new energy equipment. Therefore, efficient and accurate welding quality detection methods are the key to ensuring product quality and production efficiency. In recent years, welding quality detection methods based on image processing have gradually become an important means of new energy welding quality detection due to their advantages such as high efficiency, non-contact and high precision.
[0003] Traditional new energy welding quality inspection mainly relies on manual visual inspection or X-ray inspection. Manual visual inspection is not only inefficient, but also limited by the experience and subjective judgment of the inspectors, prone to false detection and missed detection. Although X-ray inspection can detect internal defects in welding, the equipment cost is high, the operation is complicated, and there is a certain radiation risk to the inspectors.
[0004] In order to overcome these shortcomings, a new energy welding quality detection method and system based on image processing came into being. Summary of the invention
[0005] The purpose of the present invention is to provide a new energy welding quality detection method and system based on image processing: to solve the technical problems that the traditional new energy welding quality detection in the existing solutions mainly relies on manual visual detection or X-ray detection, which leads to not only low detection efficiency, but also limited by the experience and subjective judgment of the detection personnel, and is prone to false detection and missed detection.
[0006] The purpose of the present invention can be achieved through the following technical solutions:
[0007] On the one hand, a new energy welding quality detection method based on image processing, the method comprises:
[0008] Collect welding images during the new energy welding process, and preprocess the welding images to obtain preprocessed welding images;
[0009] An image quality index is calculated based on the preprocessed welding image, and whether the preprocessed welding image meets the welding image enhancement requirement is determined based on the image quality index. If so, image enhancement processing is performed on the preprocessed welding image;
[0010] Determine the superpixel area based on the preprocessed welding image after image enhancement, calculate the local contrast saliency map, the global contrast saliency map and the color distribution saliency map based on the superpixel area, and fuse the local contrast saliency map, the global contrast saliency map and the color distribution saliency map to obtain the welding image to be detected;
[0011] The welding image to be inspected is input into the welding image quality inspection model, and the new energy welding quality result is output.
[0012] Furthermore, preprocessing the welding image to obtain the preprocessed welding image specifically includes the following process:
[0013] Draw a thermal map G of the welding image according to the welding image, where the size of the thermal map is M×N;
[0014] The heat map G is divided into non-overlapping a×b sub-blocks G m , where a≤M, b≤N, each sub-block G m The size is
[0015] Calculate each heat map sub-block G m Corresponding thermal value V m :
[0016]
[0017] Among them, P iV Represents sub-block G m Medium thermal point P i The thermal value information of G, i = 1, 2, ..., m, m represents the sub-block G m The number of medium thermal points, |QP i | 2 Indicates the thermal point P i The square of the sum of the distances between the four vertices of the heat map G;
[0018] Calculate each heat map sub-block G m The corresponding contrast value D m :
[0019]
[0020] Among them, f(i, j) represents each heat map sub-block G m Medium thermal point P i The corresponding pixel gray value;
[0021] Based on thermal value V m , contrast value D m and brightness value S m Calculate the weight index W of each heat map sub-block m:
[0022]
[0023] Among them, the brightness value S of each sub-block of the heat map m is obtained by mapping each sub-block of the heat map to a specific color through a color mapping function;
[0024] Sub-blocks of the heat map with a weight index less than the preset weight index are removed to obtain a preprocessed welding image.
[0025] Furthermore, calculating the image quality index H based on the preprocessed welding image specifically includes the following process:
[0026]
[0027] Among them, B(x ij ) is the eigenvalue in the corresponding fuzzy feature plane after mapping the gray value of the pixel point x ij of the preprocessed welding image, and a1, b1, and c1 are respectively preset gray value thresholds, where a1 < b1 < c1; M1×N1 is the size of the preprocessed welding image.
[0028] Furthermore, judging whether the preprocessed welding image meets the requirements of welding image enhancement based on the image quality index specifically includes the following process:
[0029] Load the image quality index threshold, and judge whether the image quality index exceeds the image quality index threshold. If so, it is determined that the preprocessed welding image meets the welding image enhancement. If not, it is determined that the preprocessed welding image does not meet the welding image enhancement.
[0030] Furthermore, performing image enhancement processing on the preprocessed welding image specifically includes performing image enhancement processing on the processed welding image based on the CLAHE algorithm.
[0031] Furthermore, determining the superpixel region based on the preprocessed welding image after image enhancement specifically includes the following process:
[0032] Obtain the width width and height height of the image based on the preprocessed welding image after image enhancement;
[0033] Calculate the superpixel region R of the image based on the superpixel calculation formula:
[0034] R = {r i |r i ∈B r};
[0035]
[0036] Among them, ri is the superpixel of the welding image, B r is the superpixel region r i The image area where x and y are located is the superpixel r i The width and height of the weld image.
[0037] Furthermore, the local contrast saliency map, the global contrast saliency map and the color distribution saliency map are calculated based on the superpixel region and specifically include the following processes:
[0038] Calculate the superpixel region r i The local contrast saliency value S1(i):
[0039]
[0040] Among them, N S1 is the number of superpixel regions, n(i) is the number of superpixel regions r i The number of pixels in ||r i -r j || is the super pixel area r i and other superpixel regions r j The Euclidean distance between them, ||c i -c j || is the super pixel area r i and other superpixel regions r j The centroid distance of , c is the median distance between each pair of superpixel centroids;
[0041] The super pixel area whose local contrast saliency value S1(i) is greater than the preset local contrast saliency value is recorded as a local contrast saliency map;
[0042] Calculate the superpixel region r i The global contrast saliency value S2(i):
[0043]
[0044] Among them, the value of e is 2.72;
[0045] The superpixel region whose global contrast saliency value S2(i) is greater than the preset global contrast saliency value is recorded as a global contrast saliency map;
[0046] Calculate the superpixel region r i The color distribution characteristic value S3(i):
[0047]
[0048] in, Pick and 0, R j , B jand G j They are superpixels r in RGB color space. i The R, B and G values of the j-th pixel in;
[0049] The superpixel region whose color distribution characteristic value S3(i) is greater than the preset color distribution characteristic value is recorded as a color distribution saliency map.
[0050] Furthermore, the welding image to be detected is input into the welding image quality detection model, and the output of the new energy welding quality result specifically includes the following process:
[0051] Data collection: Collect a large amount of new energy welding image data, including qualified and unqualified welding samples;
[0052] Data preprocessing: Clean, denoise and enhance the image to improve the recognition accuracy of the model; mark the defect location and type in the welding image to provide supervision information for model training;
[0053] Model selection and training: Select appropriate deep learning models, including convolutional neural networks, for welding image quality detection; use the preprocessed dataset to train the model to identify defects in welding images and assess welding quality;
[0054] Image input: Input the welding image to be inspected into the trained welding image quality inspection model;
[0055] Feature extraction: The model extracts feature information from welding images through convolutional layer and pooling layer structures;
[0056] Defect detection and classification: Use the classifier in the model to identify the extracted features, determine whether there are defects in the welding image, and determine the type of defects;
[0057] Quality assessment: Quantitatively assess welding quality based on defect detection results and preset quality assessment standards;
[0058] Output defect location and type: Output the specific location and type information of defects in the welding image, including pores, cracks, and slag inclusions;
[0059] Welding quality score: Give a quantitative score or grade assessment of the welding quality to intuitively reflect the quality of the welding.
[0060] On the other hand, a new energy welding quality detection system based on image processing includes an image preprocessing module, an image enhancement processing module, an image fusion processing module and a welding quality evaluation module;
[0061] An image preprocessing module is used to collect welding images in the new energy welding process and preprocess the welding images to obtain preprocessed welding images;
[0062] An image enhancement processing module is used to calculate an image quality index based on the preprocessed welding image, and determine whether the preprocessed welding image meets the welding image enhancement requirement based on the image quality index. If so, the preprocessed welding image is subjected to image enhancement processing;
[0063] An image fusion processing module is used to determine a super-pixel region based on the pre-processed welding image after image enhancement, calculate a local contrast saliency map, a global contrast saliency map and a color distribution saliency map based on the super-pixel region, and fuse the local contrast saliency map, the global contrast saliency map and the color distribution saliency map to obtain a welding image to be detected;
[0064] The welding quality evaluation module is used to input the welding image to be detected into the welding image quality detection model and output the new energy welding quality result.
[0065] Compared with the existing solutions, the present invention achieves the following beneficial effects:
[0066] The present invention not only improves the efficiency and accuracy of welding quality detection, but also reduces the detection cost. In addition, since the method is non-contact detection, it avoids damage and contamination to the workpiece during the detection process, which is beneficial to protecting the surface quality of the workpiece. At the same time, combined with artificial intelligence technology, the method can also realize functions such as automated detection, data statistics and abnormal alarm, further improving production efficiency and product quality.
[0067] By adjusting the image processing algorithm and detection parameters, the method can adapt to the detection requirements of different welding qualities and defects and has high flexibility. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0069] Figure 1 is a workflow diagram of a new energy welding quality detection method based on image processing according to an embodiment of the present invention;
[0070] Figure 2 It is a system block diagram of a new energy welding quality detection system based on image processing according to an embodiment of the present invention. DETAILED DESCRIPTION
[0071] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0072] In addition, the described features, structures or characteristics may be combined in one or more example embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the example embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, steps, etc. may be adopted. In other cases, well-known structures, methods, implementations or operations are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0073] This embodiment provides a new energy welding quality detection method based on image processing. Figure 1 is a workflow diagram of a new energy welding quality detection method based on image processing according to an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:
[0074] Step S101: collecting welding images in the new energy welding process, and preprocessing the welding images to obtain preprocessed welding images;
[0075] Step S102: Calculating an image quality index based on the preprocessed welding image;
[0076] Step S103: judging whether the preprocessed welding image meets the welding image enhancement requirement based on the image quality index, if yes, proceeding to step S104, if no, proceeding to step S107;
[0077] Step S104: performing image enhancement processing on the pre-processed welding image;
[0078] Step S105: determining a superpixel region based on the preprocessed welding image after image enhancement, calculating a local contrast saliency map, a global contrast saliency map and a color distribution saliency map based on the superpixel region, and fusing the local contrast saliency map, the global contrast saliency map and the color distribution saliency map to obtain a welding image to be detected;
[0079] Step S106: inputting the welding image to be detected into the welding image quality detection model, and outputting the new energy welding quality result;
[0080] Step S107: re-collecting welding images during the new energy welding process.
[0081] In summary, the present invention collects welding images in the new energy welding process, pre-processes the welding images to obtain pre-processed welding images; calculates the image quality index based on the pre-processed welding images, judges whether the pre-processed welding images meet the welding image enhancement requirements based on the image quality index, and if so, performs image enhancement processing on the pre-processed welding images; determines the super-pixel area based on the pre-processed welding images after image enhancement, calculates the local contrast saliency map, the global contrast saliency map and the color distribution saliency map based on the super-pixel area, and fuses the local contrast saliency map, the global contrast saliency map and the color distribution saliency map to obtain the welding image to be detected; inputs the welding image to be detected into the welding image quality detection model, and outputs the new energy welding quality results. Not only improves the efficiency and accuracy of welding quality detection, but also reduces the detection cost. The method is non-contact detection, avoids damage and pollution to the workpiece during the detection process, and is conducive to protecting the surface quality of the workpiece.
[0082] In some embodiments, preprocessing the welding image to obtain the preprocessed welding image specifically includes the following process:
[0083] Draw a thermal map G of the welding image according to the welding image, where the size of the thermal map is M×N;
[0084] The heat map G is divided into non-overlapping a×b sub-blocks G m , where a≤M, b≤N, each sub-block G m The size is
[0085] Calculate each heat map sub-block G m Corresponding thermal value V m :
[0086]
[0087] Among them, P iV Represents sub-block G m Medium thermal point P i The thermal value information of G, i = 1, 2, ..., m, m represents the sub-block G m The number of medium thermal points, |QP i | 2 Indicates the thermal point P i The square of the sum of the distances between the four vertices of the heat map G;
[0088] Calculate each heat map sub-block G m The corresponding contrast value D m :
[0089]
[0090] Among them, f(i, j) represents each heat map sub-block G m in the heat point P i corresponding pixel gray value;
[0091] Based on the heat value V m , contrast value D m and brightness value S m Calculate the weight index W of each heat map sub-block m :
[0092]
[0093] Among them, the brightness value S of each heat map sub-block m is obtained by mapping the heat map sub-block to a specific color through a color mapping function;
[0094] Eliminate the heat map sub-blocks with a weight index less than the preset weight index to obtain the preprocessed welding image.
[0095] In some embodiments, calculating the image quality index H based on the preprocessed welding image specifically includes the following process:
[0096]
[0097] Among them, B(x ij ) is the eigenvalue of the gray value of the pixel point x ij of the preprocessed welding image mapped into the corresponding fuzzy feature plane, and a1, b1, and c1 are respectively preset gray value thresholds, a1 < b1 < c1; M1×N1 is the size of the preprocessed welding image.
[0098] In some embodiments, judging whether the preprocessed welding image meets the welding image enhancement requirement based on the image quality index specifically includes the following process:
[0099] Load the image quality index threshold, and judge whether the image quality index exceeds the image quality index threshold. If so, it is determined that the preprocessed welding image meets the welding image enhancement. If not, it is determined that the preprocessed welding image does not meet the welding image enhancement.
[0100] In some embodiments, perform image enhancement processing on the processed welding image based on the CLAHE algorithm:
[0101] The CLAHE (Contrast Limited Adaptive Histogram Equalization) algorithm is a technique for image enhancement, especially in improving the local contrast of images, while effectively suppressing noise:
[0102] Image segmentation:
[0103] First, the input image is divided into multiple equal-sized sub-blocks (also called “tiles” or “small blocks”).
[0104] The size of these sub-blocks can be adjusted as needed, but smaller sub-blocks are usually chosen to better capture the local features of the image.
[0105] Histogram Equalization:
[0106] Perform histogram equalization on each sub-block.
[0107] The purpose of histogram equalization is to make the pixel value distribution of each sub-block more uniform, thereby improving the local contrast of the image.
[0108] Contrast Limit:
[0109] During the histogram equalization process, set a clipping threshold.
[0110] If the number of pixels at a certain gray level exceeds this threshold, then these excess pixels will be evenly distributed to other gray levels to avoid over-enhancement and noise amplification.
[0111] Bilinear interpolation:
[0112] Since each sub-block is subjected to independent histogram equalization processing, image discontinuity (ie, "blocking effect") may occur between adjacent sub-blocks.
[0113] In order to eliminate this discontinuity, bilinear interpolation is performed on the boundaries between adjacent sub-blocks.
[0114] Bilinear interpolation is a commonly used image interpolation method, which can estimate the value of the current pixel based on the values of adjacent pixels to make the image smoother.
[0115] Image reconstruction:
[0116] The processed sub-blocks are stitched together into a complete image.
[0117] After the above steps, the local contrast of the image is significantly improved and the noise is effectively suppressed.
[0118] In some embodiments, determining the superpixel region based on the preprocessed welding image after image enhancement specifically includes the following process:
[0119] Obtain the width and height of the image based on the preprocessed welding image after image enhancement;
[0120] Calculate the superpixel area R of the image based on the superpixel calculation formula:
[0121] R = {r i |r i ∈B r};
[0122]
[0123] Among them, r i is the superpixel of the welding image, B r is the superpixel region r i The image area where x and y are located is the superpixel r i The width and height of the weld image.
[0124] In some embodiments, the calculation of the local contrast saliency map, the global contrast saliency map and the color distribution saliency map based on the superpixel region specifically includes the following process:
[0125] Calculate the superpixel region r i The local contrast saliency value S1(i):
[0126]
[0127] Among them, N S1 is the number of superpixel regions, n(i) is the number of superpixel regions r i The number of pixels in ||r i -r j || is the super pixel area r i and other superpixel regions r j The Euclidean distance between them, ||c i -c j || is the super pixel area r i and other superpixel regions r j The centroid distance of , c is the median distance between each pair of superpixel centroids;
[0128] The super pixel area whose local contrast saliency value S1(i) is greater than the preset local contrast saliency value is recorded as a local contrast saliency map;
[0129] Calculate the superpixel region r i The global contrast saliency value S2(i):
[0130]
[0131] Among them, the value of e is 2.72;
[0132] The superpixel region whose global contrast saliency value S2(i) is greater than the preset global contrast saliency value is recorded as a global contrast saliency map;
[0133] Calculate the superpixel region r i The color distribution characteristic value S3(i):
[0134]
[0135] in, Pick and 0, R j , B j and G j They are superpixels r in RGB color space. i The R, B and G values of the j-th pixel in;
[0136] The superpixel region whose color distribution characteristic value S3(i) is greater than the preset color distribution characteristic value is recorded as a color distribution saliency map.
[0137] In some embodiments, inputting the welding image to be detected into the welding image quality detection model and outputting the new energy welding quality result specifically includes the following process:
[0138] Data collection: Collect a large amount of new energy welding image data, including qualified and unqualified welding samples;
[0139] Data preprocessing: Clean, denoise and enhance the image to improve the recognition accuracy of the model; mark the defect location and type in the welding image to provide supervision information for model training;
[0140] Model selection and training: Select appropriate deep learning models, including convolutional neural networks, for welding image quality detection; use the preprocessed dataset to train the model to identify defects in welding images and assess welding quality;
[0141] Image input: Input the welding image to be inspected into the trained welding image quality inspection model;
[0142] Feature extraction: The model extracts feature information from welding images through convolutional layer and pooling layer structures;
[0143] Defect detection and classification: Use the classifier in the model to identify the extracted features, determine whether there are defects in the welding image, and determine the type of defects;
[0144] Quality assessment: Quantitatively assess welding quality based on defect detection results and preset quality assessment standards;
[0145] Output defect location and type: Output the specific location and type information of defects in the welding image, including pores, cracks, and slag inclusions;
[0146] Welding quality score: Give a quantitative score or grade assessment of the welding quality to intuitively reflect the quality of the welding.
[0147] The present invention also provides a new energy welding quality detection system based on image processing, Figure 2 is a system block diagram of a new energy welding quality detection system based on image processing according to an embodiment of the present invention. Figure 2 As shown, the system includes an image preprocessing module, an image enhancement processing module, an image fusion processing module and a welding quality evaluation module;
[0148] An image preprocessing module is used to collect welding images in the new energy welding process and preprocess the welding images to obtain preprocessed welding images;
[0149] An image enhancement processing module is used to calculate an image quality index based on the preprocessed welding image, and determine whether the preprocessed welding image meets the welding image enhancement requirement based on the image quality index. If so, the preprocessed welding image is subjected to image enhancement processing;
[0150] An image fusion processing module is used to determine a super-pixel region based on the pre-processed welding image after image enhancement, calculate a local contrast saliency map, a global contrast saliency map and a color distribution saliency map based on the super-pixel region, and fuse the local contrast saliency map, the global contrast saliency map and the color distribution saliency map to obtain a welding image to be detected;
[0151] The welding quality evaluation module is used to input the welding image to be detected into the welding image quality detection model and output the new energy welding quality result.
[0152] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are changed or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0153] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0154] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0155] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only some logical function divisions. There may be other division methods in actual implementation, such as 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0156] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0157] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A new energy welding quality detection method based on image processing, characterized in that: Methods include: Collect welding images during the new energy welding process, and preprocess the welding images to obtain preprocessed welding images; An image quality index is calculated based on the preprocessed welding image, and whether the preprocessed welding image meets the welding image enhancement requirement is determined based on the image quality index. If so, image enhancement processing is performed on the preprocessed welding image; Determine the superpixel area based on the preprocessed welding image after image enhancement, calculate the local contrast saliency map, the global contrast saliency map and the color distribution saliency map based on the superpixel area, and fuse the local contrast saliency map, the global contrast saliency map and the color distribution saliency map to obtain the welding image to be detected; The welding image to be inspected is input into the welding image quality inspection model, and the new energy welding quality result is output.
2. The new energy welding quality detection method based on image processing according to claim 1 is characterized in that: Preprocessing the welding image to obtain the preprocessed welding image specifically includes the following processes: Draw a thermal map G of the welding image according to the welding image, where the size of the thermal map is M×N; The heat map G is divided into non-overlapping a×b sub-blocks G m , where a≤M, b≤N, each sub-block G m The size is Calculate each heat map sub-block G m The corresponding thermal value V m : Among them, P iV Represents sub-block G m Medium thermal point P i The thermal value information of G, i = 1, 2, ..., m, m represents the sub-block G m The number of medium thermal points, |QP i | 2 Indicates the thermal point P i The square of the sum of the distances between the four vertices of the heat map G; Calculate each heat map sub-block G m The corresponding contrast value D m : Among them, f(i, j) represents each heat map sub-block G m Medium thermal point P i The corresponding pixel gray value; Based on thermal value V m , contrast value D m and brightness value S m Calculate the weight index W of each heat map sub-block m : Among them, the brightness value S of each heat map sub-block m The heat map sub-blocks are mapped to specific colors through the color mapping function; The sub-blocks of the thermal image with a weight index less than the preset weight index are eliminated to obtain a preprocessed welding image.
3. The new energy welding quality detection method based on image processing according to claim 1 is characterized in that: The image quality index H is calculated based on the preprocessed welding image, which specifically includes the following process: Among them, B(x ij ) maps the gray value of the pixel point x ij of the preprocessed welding image into the eigenvalue in the corresponding fuzzy feature plane. a1, b1, and c1 are respectively preset gray value thresholds, where a1 < b1 < c1; M1×N1 is the size of the preprocessed welding image.
4. The new energy welding quality detection method based on image processing according to claim 1 is characterized in that: Judging whether the preprocessed welding image meets the welding image enhancement requirements based on the image quality index specifically includes the following processes: The image quality index threshold is loaded to determine whether the image quality index exceeds the image quality index threshold. If so, it is determined that the preprocessed welding image meets the welding image enhancement requirements. If not, it is determined that the preprocessed welding image does not meet the welding image enhancement requirements.
5. The new energy welding quality detection method based on image processing according to claim 1 is characterized in that: The image enhancement processing of the pre-processed welding image specifically includes performing image enhancement processing on the processed welding image based on the CLAHE algorithm.
6. The new energy welding quality detection method based on image processing according to claim 1 is characterized in that: Determine the specific superpixel area based on the preprocessed welding image after image enhancement The process includes: Obtain the width and height of the image based on the preprocessed welding image after image enhancement; Calculate the superpixel area R of the image based on the superpixel calculation formula: R={r i |r i ∈B r }; Among them, r i is the superpixel of the welding image, B r is the superpixel region r i The image area where x and y are located is the superpixel r i The width and height of the weld image.
7. The new energy welding quality detection method based on image processing according to claim 6 is characterized in that: The calculation of local contrast saliency map, global contrast saliency map and color distribution saliency map based on superpixel region specifically includes the following processes: Calculate the superpixel region r i The local contrast saliency value S1(i): Among them, N S1 is the number of superpixel regions, n(i) is the number of superpixel regions r i The number of pixels in ||r i -r j || is the super pixel area r i and other superpixel regions r j The Euclidean distance between them, ||c i -c j || is the super pixel area r i and other superpixel regions r j The centroid distance of , c is the median distance between each pair of superpixel centroids; The super pixel area whose local contrast saliency value S1(i) is greater than the preset local contrast saliency value is recorded as a local contrast saliency map; Calculate the superpixel region r i The global contrast saliency value S2(i): Among them, the value of e is 2.72; The superpixel region whose global contrast saliency value S2(i) is greater than the preset global contrast saliency value is recorded as a global contrast saliency map; Calculate the superpixel region r i The color distribution characteristic value S3(i): in, Pick and 0, R j , B j and G j They are superpixels r in RGB color space. i The R, B and G values of the j-th pixel in; The superpixel region whose color distribution characteristic value S3(i) is greater than the preset color distribution characteristic value is recorded as a color distribution saliency map.
8. The new energy welding quality detection method based on image processing according to claim 1 is characterized in that: Inputting the welding image to be inspected into the welding image quality inspection model and outputting the new energy welding quality results specifically include the following processes: Data collection: Collect a large amount of new energy welding image data, including qualified and unqualified welding samples; Data preprocessing: Clean, denoise and enhance the image to improve the recognition accuracy of the model; mark the defect location and type in the welding image to provide supervision information for model training; Model selection and training: Select appropriate deep learning models, including convolutional neural networks, for welding image quality detection; use the preprocessed dataset to train the model to identify defects in welding images and assess welding quality; Image input: Input the welding image to be inspected into the trained welding image quality inspection model; Feature extraction: The model extracts feature information from welding images through convolutional layer and pooling layer structures; Defect detection and classification: Use the classifier in the model to identify the extracted features, determine whether there are defects in the welding image, and determine the type of defects; Quality assessment: Quantitatively assess welding quality based on defect detection results and preset quality assessment standards; Output defect location and type: Output the specific location and type information of defects in the welding image, including pores, cracks, and slag inclusions; Welding quality score: Give a quantitative score or grade assessment of the welding quality to intuitively reflect the quality of the welding.
9. The new energy welding quality detection system based on image processing is characterized by: A new energy welding quality detection method based on image processing applicable to any one of claims 1 to 8, the system comprising an image preprocessing module, an image enhancement processing module, an image fusion processing module and a welding quality evaluation module; An image preprocessing module is used to collect welding images in the new energy welding process and preprocess the welding images to obtain preprocessed welding images; An image enhancement processing module is used to calculate an image quality index based on the preprocessed welding image, and determine whether the preprocessed welding image meets the welding image enhancement requirement based on the image quality index. If so, the preprocessed welding image is subjected to image enhancement processing; An image fusion processing module is used to determine a super-pixel region based on the pre-processed welding image after image enhancement, calculate a local contrast saliency map, a global contrast saliency map and a color distribution saliency map based on the super-pixel region, and fuse the local contrast saliency map, the global contrast saliency map and the color distribution saliency map to obtain a welding image to be detected; The welding quality evaluation module is used to input the welding image to be detected into the welding image quality detection model and output the new energy welding quality result.
Citation Information
Patent Citations
Visual identification system of welding robot
CN114862775A
Method and system for detecting welding quality of heat dissipation copper bottom plate based on multi-source data
CN116787022A
System and method for identifying defects in welds by processing x-ray images
US20140348415A1
Cited By
Electron beam welding quality detection method for metal composite material
CN119910337A