A new energy welding quality detection method and system based on image processing
Through image processing technology, efficient, accurate and automatic detection of new energy welding quality is achieved, and the inefficiency and missed detection of traditional detection methods are solved, reducing costs and protecting workpiece quality.
Patent Information
- Application Number
- CN202411581706.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2044-11-07
AI Technical Summary
Traditional new energy welding quality inspection relies on manual visual or X-ray detection, which leads to inefficient efficiency and prone to false and missed inspections, and has high equipment costs and high radiation risks.
Using an image processing-based method, automated quality detection of welding images is achieved through image preprocessing, image enhancement, superpixel area analysis and deep learning models.
It improves the efficiency and accuracy of welding quality inspection, reduces inspection costs, and avoids damage and contamination to workpieces. It has automatic detection and abnormal alarm functions.
Smart Images

Figure CN119501364B_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 booming development of the new energy industry, the application of welding technology 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 inspection methods are key to ensuring product quality and production efficiency. In recent years, welding quality inspection methods based on image processing have gradually become an important means of welding quality inspection for new energy vehicles due to their advantages such as high efficiency, non-contact, and high precision.
[0003] Traditionally, welding quality inspection for new energy vehicles relies primarily on manual visual inspection or X-ray inspection. Manual visual inspection is not only inefficient but also limited by the inspector's experience and subjective judgment, making it prone to false positives and missed detections. While X-ray inspection can detect internal weld defects, it is expensive, complex, and carries a certain radiation risk to the inspector.
[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 in existing solutions that traditional new energy welding quality detection mainly relies on manual visual inspection or X-ray inspection, resulting in not only low detection efficiency but also being limited by the experience and subjective judgment of the inspectors, and 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 includes:
[0008] Collecting welding images during the new energy welding process, and preprocessing 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] Based on the pre-processed welding image after image enhancement, a super-pixel region is determined, and a local contrast saliency map, a global contrast saliency map, and a color distribution saliency map are calculated based on the super-pixel region. The local contrast saliency map, the global contrast saliency map, and the color distribution saliency map are fused 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 steps:
[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, and each sub-block G m The size of
[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 Thermal value information, 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 grayscale 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 heat map sub-block m is obtained by mapping the heat map sub-block to a specific color through a color mapping function;
[0024] The heat map sub-blocks with a weight index less than the preset weight index are removed to obtain the 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. a1, b1, and c1 are respectively preset gray value thresholds, and a1 < b1 < c1; M1×N1 is the size of the preprocessed welding image.
[0028] Furthermore, judging whether the preprocessed welding image meets the welding image enhancement requirement 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 super pixel r i The width and height of the welding image.
[0037] Furthermore, 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 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 super-pixel regions, n(i) is the number of super-pixel 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 region where the local contrast saliency value S1(i) is greater than the preset local contrast saliency value is recorded as the 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 super-pixel region whose global contrast saliency value S2(i) is greater than the preset global contrast saliency value is recorded as the global contrast saliency map;
[0046] Calculate the superpixel region r i Color distribution eigenvalue S3(i):
[0047]
[0048] in, Pick and the maximum value of 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 where the 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 inspected is input into the welding image quality inspection 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: Perform image cleaning, denoising, and enhancement preprocessing operations to improve the recognition accuracy of the model; annotate the location and type of defects in welding images 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 inspection; use preprocessed datasets to train the models to identify defects in welding images and assess weld 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 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 evaluate 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 welding quality to intuitively reflect the quality of 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 during 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 requirements based on the image quality index. If so, perform image enhancement processing on the preprocessed welding image;
[0063] An image fusion processing module is used to determine the super-pixel area based on the pre-processed 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 super-pixel 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;
[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] This invention not only improves the efficiency and accuracy of welding quality testing but also reduces testing costs. Furthermore, because this method utilizes non-contact testing, it avoids damage and contamination to the workpiece during testing, helping to protect the workpiece's surface quality. Furthermore, combined with artificial intelligence technology, this method can also implement automated testing, data statistics, and abnormality alarms, further improving production efficiency and product quality.
[0067] By adjusting the image processing algorithm and detection parameters, the present invention 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 following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments described in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0069] Figure 1 This 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 This 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 clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. 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 making creative efforts are within the scope of protection of the present invention.
[0072] In addition, the described features, structures or characteristics can be combined in any suitable manner in one or more example embodiments. 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 can be practiced while omitting one or more of the specific details, or other methods, components, steps, etc. can 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 This is a workflow diagram of a new energy welding quality detection method based on image processing according to an embodiment of the present invention. Figure 1 As shown, the method includes the following steps:
[0074] Step S101: collecting welding images during 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 pre-processed welding image;
[0076] Step S103: judging whether the pre-processed welding image meets the welding image enhancement requirements based on the image quality index, if so, proceeding to step S104, if not, proceeding to step S107;
[0077] Step S104: performing image enhancement processing on the pre-processed welding image;
[0078] Step S105: Determine a superpixel region based on the preprocessed 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 superpixel 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;
[0079] Step S106: inputting the welding image to be inspected into the welding image quality inspection 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 during the new energy welding process, preprocesses the welding images to obtain preprocessed welding images; calculates an image quality index based on the preprocessed welding images, determines whether the preprocessed welding images meet the welding image enhancement requirements based on the image quality index, and if so, performs image enhancement processing on the preprocessed welding images; determines a superpixel area based on the preprocessed welding images after image enhancement, calculates a local contrast saliency map, a global contrast saliency map, and a color distribution saliency map based on the superpixel area, and fuses the local contrast saliency map, the global contrast saliency map, and the color distribution saliency map to obtain a welding image to be detected; inputs the welding image to be detected into a welding image quality detection model, and outputs a new energy welding quality result. This not only improves the efficiency and accuracy of welding quality detection, but also reduces detection costs. This method is a non-contact detection method that avoids damage and contamination to the workpiece during the detection process, and is beneficial 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, and each sub-block G m The size of
[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 Thermal value information, 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 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, where 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 used for image enhancement. It excels 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 sizes 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 between adjacent sub-blocks may be caused (ie, "blocking effect").
[0113] 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 that can estimate the value of the current pixel based on the values of adjacent pixels, thereby making 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 pre-processed welding image after image enhancement specifically includes the following process:
[0119] Obtain the width and height of the welding 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 super pixel r i The width and height of the welding image.
[0124] In some embodiments, calculating 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 super-pixel regions, n(i) is the number of super-pixel 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 region where the local contrast saliency value S1(i) is greater than the preset local contrast saliency value is recorded as the 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 super-pixel region whose global contrast saliency value S2(i) is greater than the preset global contrast saliency value is recorded as the global contrast saliency map;
[0133] Calculate the superpixel region r i Color distribution eigenvalue S3(i):
[0134]
[0135] in, Pick and the maximum value of 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 where the 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 inspected into the welding image quality inspection 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: Perform image cleaning, denoising, and enhancement preprocessing operations to improve the recognition accuracy of the model; annotate the location and type of defects in welding images 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 inspection; use preprocessed datasets to train the models to identify defects in welding images and assess weld 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 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 evaluate 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 welding quality to intuitively reflect the quality of 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 during 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 requirements based on the image quality index. If so, perform image enhancement processing on the preprocessed welding image;
[0150] An image fusion processing module is used to determine the super-pixel area based on the pre-processed 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 super-pixel 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;
[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 using 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 processes or functions described in the embodiments of the present application are 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, computer, server or data center to another website, computer, server or data center via a wired (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer 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 drive.
[0153] Those skilled 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 beyond the scope of this application.
[0154] Those skilled in the art will 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 this 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 merely schematic. For example, the division of the units is only for some logical functions. In actual implementation, there may be other division methods, 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 separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0157] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A new energy welding quality detection method based on image processing, characterized in that the method include: Collecting welding images during the new energy welding process, and preprocessing the welding images to obtain preprocessed welding images; The preprocessing of the welding image to obtain the preprocessed welding image specifically includes the following steps: 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, and each sub-block G m The size of Calculate each heat map sub-block G m Corresponding thermal value V m : Among them, P iV Represents sub-block G m Medium thermal point P i Thermal value information, 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 grayscale 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; Eliminate the thermal image sub-blocks whose weight index is less than the preset weight index to obtain a pre-processed welding image; 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; The image quality index H is calculated based on the pre-processed welding image and 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; 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; Based on the pre-processed welding image after image enhancement, a super-pixel region is determined, and a local contrast saliency map, a global contrast saliency map, and a color distribution saliency map are calculated based on the super-pixel region. The local contrast saliency map, the global contrast saliency map, and the color distribution saliency map are fused 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: Judging whether the pre-processed welding image meets the welding image enhancement requirements based on the image quality index specifically includes the following processes: An image quality index threshold is loaded to determine whether the image quality index exceeds the image quality index threshold. If so, the preprocessed welding image is determined to meet the requirements for welding image enhancement. If not, the preprocessed welding image is determined to not meet the requirements for welding image enhancement.
3. 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 pre-processed welding image after image enhancement The following processes are included: Obtain the width and height of the welding 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 super pixel r i The width and height of the welding image.
4. The new energy welding quality detection method based on image processing according to claim 3 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 process: Calculate the superpixel region r i The local contrast saliency value S1(i): Among them, N S1 is the number of super-pixel regions, n(i) is the number of super-pixel 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 region where the local contrast saliency value S1(i) is greater than the preset local contrast saliency value is recorded as the 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 super-pixel region whose global contrast saliency value S2(i) is greater than the preset global contrast saliency value is recorded as the global contrast saliency map; Calculate the superpixel region r i Color distribution eigenvalue S3(i): in, Pick and the maximum value of 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 where the color distribution characteristic value S3(i) is greater than the preset color distribution characteristic value is recorded as a color distribution saliency map.
5. 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 includes the following processes: Data collection: Collect a large amount of new energy welding image data, including qualified and unqualified welding samples; Data preprocessing: Perform image cleaning, denoising, and enhancement preprocessing operations to improve the recognition accuracy of the model; annotate the location and type of defects in welding images to provide supervision information for model training; Model selection and training: Select appropriate deep learning models, including convolutional neural networks, for welding image quality inspection; use preprocessed datasets to train the models to identify defects in welding images and assess weld 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 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 evaluate 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 welding quality to intuitively reflect the quality of welding.
6. New energy welding quality detection system based on image processing, characterized in that: A new energy welding quality detection method based on image processing applicable to any one of claims 1 to 5, 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 during 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 requirements based on the image quality index. If so, perform image enhancement processing on the preprocessed welding image; An image fusion processing module is used to determine the super-pixel area based on the pre-processed 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 super-pixel 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 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