A method for detecting the grinding quality of weld seams of welded shells

By correcting the weld image grayscale value and building the environmental characteristic value matrix, combined with the improved edge detection algorithm, the existing weld grinding quality detection methods are solved, and high-precision and reliable weld grinding quality detection is achieved.

CN119741298BActive Publication Date: 2025-05-16SHAANXI JINXIN ELECTRIC APPLIANCE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510246657.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-04
Publication Date
2025-05-16
Estimated Expiration
2045-03-04

AI Technical Summary

Technical Problem

The existing weld grinding quality detection methods have problems such as low accuracy and insufficient reliability in detection results, especially in complex environments that are susceptible to noise interference and false defects.

Method used

By acquiring the weld image, greyscale value correction and environmental characteristic value matrix construction, combined with an improved edge detection algorithm, the edge profile of the weld surface is extracted, and whether it is greater than the set threshold is determined to determine the grinding quality.

Benefits of technology

It improves the accuracy and reliability of weld grinding quality inspection, enhances the sensitivity of the image to local details changes, and adapts to practical application needs in complex industrial environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119741298B_ABST
    Figure CN119741298B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image data processing technology, and specifically to a weld grinding quality detection method for a welded shell, comprising: obtaining a weld image to be detected; correcting the grayscale value of each pixel in the weld image to obtain a corrected weld image, and using an edge detection algorithm to obtain the number of edge contours in the corrected weld image, and if the number of edge contours is greater than a set threshold, the grinding is determined to be unqualified; wherein the corrected grayscale value is related to an environmental characteristic value and an environmental characteristic value matrix, the environmental characteristic value characterizing the stability of the pixel, and the environmental characteristic value matrix is: the environmental characteristic value of each pixel and its right adjacent pixel constitutes a coordinate index, and based on the coordinate index, the environmental characteristics of each pixel are mapped to the corresponding position in the environmental characteristic value matrix. The present invention solves the problem of low accuracy and insufficient reliability of the detection result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image data processing, and more specifically, to a method for detecting the quality of weld grinding of a welded shell. Background Art

[0002] Welded shells are used in aerospace, shipbuilding, pressure vessels, rail transit, precision manufacturing and other fields. The quality of their welds is directly related to the structural strength, sealing performance and service life of the product. After the welding process is completed, the welds usually need to be polished to remove welding slag, improve surface finish, and ensure the overall consistency of the weld area with the parent material. However, various defects may occur during the weld polishing process, such as transverse lines, pits, residual welds, surface unevenness, etc. These defects not only affect the appearance quality of the welded shell, but may also cause local stress concentration, thereby reducing the safety and stability of the structure.

[0003] At present, the inspection of weld grinding quality mainly relies on manual visual inspection or traditional contact inspection methods, such as probe measurement, profile scanner, etc. However, manual inspection is limited by the operator's experience and subjective judgment, and is easily affected by visual fatigue, resulting in poor detection consistency and high misjudgment rate. Although the traditional contact inspection method can provide a certain degree of accuracy, its detection efficiency is low, it is difficult to meet the real-time detection needs of industrial production, and it has obvious limitations in the inspection of complex curved surface structures or large workpieces. Therefore, non-contact, high-precision weld grinding quality inspection methods have gradually become a research hotspot, among which the inspection scheme based on computer vision and image processing technology has attracted attention due to its high efficiency, stability and strong repeatability.

[0004] The patent application document with application publication number CN117911326A discloses a method and system for detecting weld surface defects. The patent application document obtains target surface data through multi-angle and multi-surface imaging, reconstructs the normal map using a high-performance algorithm, and accurately extracts the normal features of the defect; two special detection algorithms are designed for different defect types: a transverse grain defect detection algorithm based on dual-stage and rotating rectangle extraction, and a highly sudden change defect detection algorithm based on adaptive dual-threshold segmentation, which effectively overcomes the texture noise and pseudo-defect interference of the polished surface.

[0005] However, the above technical solution only relies on a specific algorithm to detect weld surface defects, and does not fully consider the adaptability of the algorithm in complex environments. As a result, it is susceptible to factors such as noise interference and false defect misjudgment in actual applications, resulting in low detection accuracy and insufficient reliability. Summary of the invention

[0006] In order to solve the problems of low accuracy and insufficient reliability of detection results raised in the above background technology, the present invention provides the following solutions.

[0007] The present invention provides a method for detecting the weld grinding quality of a welded shell, comprising: obtaining a weld image to be detected; correcting the grayscale value of each pixel in the weld image to obtain a corrected weld image, and using an edge detection algorithm to obtain the number of edge contours in the corrected weld image. If the number of edge contours is greater than a set threshold, it is determined that the grinding is unqualified; wherein the corrected grayscale value is, , where For the The gray value of a pixel, is the normalization function, is an exponential function with the natural constant e as base, For the The environmental characteristic value of each pixel, For the The proportion of pixel data in the environmental eigenvalue matrix, For the The Manhattan distance between the position of a pixel point in the environmental eigenvalue matrix and the matrix diagonal; the environmental eigenvalue characterizes the stability of the pixel point; the environmental eigenvalue matrix is: the environmental eigenvalue of the target pixel point and its right adjacent pixel point are used as the coordinate index of the target pixel point in the environmental eigenvalue matrix, and the environmental eigenvalue of the target pixel point is mapped to the corresponding position in the environmental eigenvalue matrix based on the coordinate index to obtain the environmental eigenvalue matrix, and the target pixel point is any pixel point in the weld image.

[0008] The above technical solution corrects the grayscale value of each pixel in the weld image, which not only makes the grayscale value of each pixel in the image more accurately reflect its relative position and degree of abnormality in the image, but also enhances the correlation between pixels in the image and the expression of local structure by constructing an environmental eigenvalue matrix. It can effectively improve the quality of the image and enhance the expressiveness of details, especially when processing images with complex textures or uneven distributions, and can provide more refined grayscale value adjustments, thereby improving detection results.

[0009] Furthermore, the environmental characteristic value is, , where For the The environmental characteristic value of each pixel, For the first The neighborhood range is set as the center of the pixel point. For the first The pixel point is the center of the set neighborhood. The neighborhood range of pixels is set. is the number of pixels within the set neighborhood, For the The second approximate number of pixels, The first The second approximate number of pixels, For the The grayscale value of each pixel, The first The grayscale representation value of each pixel point represents the abnormality degree of the pixel point.

[0010] The above technical solution proposes a new method for calculating environmental feature values ​​by comprehensively considering the similarity between the second approximate number of a pixel and other pixels in the neighborhood, as well as the difference in grayscale representation values. In this way, the relationship between a pixel and its neighborhood in terms of grayscale and spatial distribution can be effectively captured, thereby more accurately quantifying the degree of abnormality of the pixel, which can not only reveal subtle changes in local areas, but also accurately detect potential abnormal areas in the image, thereby improving the reliability and accuracy of image analysis.

[0011] Furthermore, the environmental characteristic value is, , where For the The environmental characteristic value of each pixel, For the first The neighborhood range is set as the center of the pixel point. For the first The pixel point is the center of the set neighborhood. The neighborhood range of pixels is set. is the number of pixels within the set neighborhood, For the The grayscale value of each pixel, The first The grayscale representation value of each pixel point represents the abnormality degree of the pixel point.

[0012] The above technical solution proposes a new method for calculating environmental feature values ​​by comprehensively considering the difference between the second approximation number and grayscale representation value of a pixel and other pixels in the neighborhood. This method can effectively reflect the degree of abnormality of each pixel in the image relative to its surrounding environment, thereby improving the sensitivity to subtle changes and abnormal areas in the image. Through this calculation, local changes and potential defects in the image can be more accurately identified, especially when dealing with complex backgrounds or high-noise images, which helps to extract more stable and reliable feature information.

[0013] Furthermore, the grayscale representation value is, , where For the The grayscale value of each pixel, is the normalization function, For the The gray value of a pixel, For the first The maximum gray value of the pixels in the set neighborhood with the pixel as the center. is the minimum grayscale value of the pixels within the set neighborhood, is an empirical constant.

[0014] The above technical solution can effectively improve the local contrast and detail performance of the image by normalizing the grayscale value of each pixel and combining the difference between the maximum and minimum grayscale values ​​in its neighborhood. By introducing the adjustment of empirical constants, it can flexibly adapt to the grayscale distribution of different images and further improve the ability to detect subtle changes in the image.

[0015] Furthermore, the second approximate number is specifically: an initial approximate number of any pixel point is preset, and if the absolute value of the difference between the grayscale representation value of any pixel point and the pixel points within its set neighborhood is less than a set absolute threshold, the initial approximate number of any pixel point is increased by one until all the pixels within the set neighborhood of any pixel point are traversed to obtain the second approximate number of any pixel point.

[0016] The above technical solution effectively enhances the expression of local grayscale relationships of the image by comparing the grayscale representation value of the pixel with the difference between the neighboring pixels and dynamically adjusting the approximate number of the pixel according to the set threshold. In this way, it is possible to accurately capture the areas with small grayscale changes in the image, reflecting the smoothness or subtle change characteristics of the image, thereby improving the sensitivity of image analysis.

[0017] Furthermore, a CCD camera or a CMOS camera is used to collect the image of the weld to be inspected.

[0018] Furthermore, the method also includes denoising and gray-scaling the weld image to be detected.

[0019] Furthermore, the edge detection algorithm is a Sobel operator or a Canny edge detection.

[0020] The beneficial effects of the present invention are:

[0021] The present invention uses advanced image processing technology to accurately detect the grinding quality of the weld of the welded shell; uses an improved edge detection algorithm to analyze the corrected weld image, which can effectively extract the edge contour of the weld surface, and judge whether the weld has defects based on the number of edge contours; by combining the generation of the environmental eigenvalue matrix and the grayscale value correction steps, the image's sensitivity to local detail changes is enhanced, thereby achieving high-precision detection of the weld grinding quality. In addition, the present invention can perform denoising and grayscale processing after image acquisition, further optimize image quality, reduce the interference of external noise on the detection results, improve the robustness and accuracy of detection, and adapt to actual application needs in complex industrial environments. Overall, the present invention improves the efficiency and reliability of weld grinding quality detection by comprehensively applying a variety of image processing technologies. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0023] Figure 1 is a flow chart schematically illustrating a method for detecting the weld grinding quality of a welded shell according to an embodiment of the present invention;

[0024] Figure 2 FIG. 4 is a grayscale diagram schematically showing a weld seam of a welded shell according to an embodiment of the present invention. DETAILED DESCRIPTION

[0025] 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 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 those skilled in the art without creative work are within the scope of protection of the present invention.

[0026] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0027] An embodiment of a method for detecting the grinding quality of a weld seam of a welded shell.

[0028] like Figure 1 As shown, a flow chart of a method for detecting the quality of weld grinding of a welded shell according to an embodiment of the present invention comprises the following steps:

[0029] S1: Acquire the weld image to be inspected.

[0030] In one embodiment, the weld image to be inspected can be acquired by using a high-resolution CCD camera or CMOS camera. The application of these cameras has significant advantages, and can provide clear, high-quality image data, making subsequent image processing and defect detection more accurate and reliable. Especially in weld inspection, subtle defects in the welding area often determine the quality and safety of the product, so the guarantee of image quality is crucial.

[0031] Then, the acquired weld images are subjected to denoising and grayscale processing, which not only optimizes the image quality but also provides a more accurate data basis for subsequent defect detection.

[0032] In the process of welding seam image acquisition, some unavoidable noise is often generated due to environmental noise, characteristics of camera photosensitive elements and interference in the image transmission process. If these noises are not removed, they will affect the subsequent welding seam defect detection, especially the identification of subtle defects, which may cause misjudgment or omission.

[0033] In order to eliminate these interferences, the image is first denoised. The specific method can be to use image denoising algorithms such as median filtering and Gaussian filtering, which can effectively remove salt and pepper noise and high-frequency noise while retaining the detailed features of the weld area. The denoised image can significantly improve the signal-to-noise ratio, making subsequent processing more stable and reliable. Through denoising, the interference information in the image is effectively suppressed, which helps to improve the clarity and accuracy of the image, so that in the subsequent defect detection, the quality problems of the weld, such as cracks, pores and other defects, can be more accurately identified.

[0034] With the denoising step completed, the image is then grayscaled. Weld images usually contain rich color information, but color information is often not the most critical part in defect detection. Grayscale processing can convert color images into grayscale images, remove color information, simplify the complexity of the image, and reduce the amount of calculation, thereby improving the efficiency of subsequent image analysis.

[0035] like Figure 2 As shown, the weld grayscale image of the welded shell according to the embodiment of the present invention.

[0036] When graying, it is very important to use a suitable grayscale mapping strategy. By mapping each pixel in the image to a grayscale value, the details in the image can be made more prominent. For example, the metal surface of the weld and the base material around the weld appear as different grayscale values ​​in the grayscale image. By analyzing the grayscale values, the detection system can more clearly identify the morphological characteristics and potential defects of the weld. The grayscale image not only simplifies the subsequent processing process, but also makes it easier to apply image analysis techniques, such as edge detection and texture analysis, to further improve the accuracy and efficiency of weld defect detection. In addition, graying can enhance the contrast between the weld area and the background, providing a clearer basis for subsequent image analysis.

[0037] S2: Correcting the grayscale value of each pixel in the weld image to obtain a corrected weld image.

[0038] In one embodiment, the corrected grayscale value is, , where For the The gray value of a pixel, is an exponential function with the natural constant e as base, For the The environmental characteristic value of each pixel, For the The proportion of pixel data in the environmental eigenvalue matrix, For the The Manhattan distance between the position of a pixel point in the environmental feature value matrix and the matrix diagonal; the environmental feature value represents the stability of the pixel point. The environmental feature value matrix is: the environmental feature value of the target pixel point and its right adjacent pixel point are used as the coordinate index of the target pixel point in the environmental feature value matrix, and the environmental feature value of the target pixel point is mapped to the corresponding position in the environmental feature value matrix based on the coordinate index to obtain the environmental feature value matrix, and the target pixel point is any pixel point in the weld image.

[0039] Exemplarily, if the environmental feature value of the target pixel and its right adjacent pixel is (1, 2), the environmental feature value of the target pixel is mapped to the first row and second column of the environmental feature value matrix, and all pixels in the weld image are traversed to obtain the environmental feature value matrix.

[0040] By introducing a revised grayscale value calculation method, multiple factors such as the grayscale value of the pixel, the environmental characteristic value, the Manhattan distance from the position to the diagonal, and the proportion of data volume are comprehensively considered for dynamic correction. This correction not only enables the grayscale value of each pixel in the image to more accurately reflect its relative position and degree of abnormality in the image, but also enhances the correlation between pixels in the image and the expression of local structure by constructing an environmental characteristic value matrix. This method can effectively improve the quality of the image and enhance the expressiveness of details. In particular, when processing images with complex textures or uneven distributions, it can provide more refined grayscale value adjustments, making subsequent image analysis and processing more accurate.

[0041] The environmental characteristic value is: , where For the The environmental characteristic value of each pixel, For the first The neighborhood range is set as the center of the pixel point. For the first The pixel point is the center of the set neighborhood. The neighborhood range of pixels is set. is the number of pixels within the set neighborhood, For the The second approximate number of pixels, The first The second approximate number of pixels, For the The grayscale value of each pixel, The first The grayscale expression value of each pixel characterizes the degree of abnormality of the pixel. A new method for calculating environmental characteristic values ​​is proposed by comprehensively considering the similarity between the second approximate number of the pixel and other pixels in the neighborhood, as well as the difference in grayscale expression values. In this way, the relationship between the pixel and its neighborhood in grayscale and spatial distribution can be effectively captured, so as to more accurately quantify the degree of abnormality of the pixel, which can not only reveal subtle changes in the local area, but also accurately detect potential abnormal areas in the image, thereby improving the reliability and accuracy of image analysis. This calculation based on local environmental characteristic values ​​can better identify and separate normal areas from abnormal areas in complex backgrounds.

[0042] In another embodiment, the environmental characteristic value is, , where For the The environmental characteristic value of each pixel, For the first The neighborhood range is set as the center of the pixel point. For the first The pixel point is the center of the set neighborhood. The neighborhood range of pixels is set. is the number of pixels within the set neighborhood, For the The grayscale value of each pixel, The first The grayscale representation value of each pixel characterizes the abnormality of the pixel. A new method for calculating environmental feature values ​​is proposed by comprehensively considering the difference between the second approximation number and the grayscale representation value of the pixel and other pixels in the neighborhood. This method can effectively reflect the abnormality of each pixel in the image relative to its surrounding environment, thereby improving the sensitivity to subtle changes and abnormal areas in the image. Through this calculation, local changes and potential defects in the image can be more accurately identified, especially when dealing with complex backgrounds or high-noise images, which helps to extract more stable and reliable feature information.

[0043] The grayscale representation value is, , where For the The grayscale value of each pixel, is the normalization function, For the The gray value of a pixel, For the first The maximum gray value of the pixels in the set neighborhood with the pixel as the center. is the minimum grayscale value of the pixels within the set neighborhood, is an empirical constant. By normalizing the grayscale value of each pixel and combining the difference between the maximum and minimum grayscale values ​​in its neighborhood, the local contrast and detail performance of the image can be effectively improved. By introducing the adjustment of empirical constants, it can flexibly adapt to the grayscale distribution of different images and further improve the ability to detect subtle changes in the image. This processing method not only enhances the local information of the image, making the details in the image clearer and easier to distinguish, but also reduces the impact of overall illumination changes or local noise on image quality.

[0044] The second approximate number is: an initial approximate number of any pixel point is preset. If the absolute value of the difference between the grayscale representation value of any pixel point and the pixel points within its set neighborhood is less than a set absolute threshold, the initial approximate number of any pixel point is increased by one until all the pixels within the set neighborhood of any pixel point are traversed to obtain the second approximate number of any pixel point.

[0045] For example, suppose there are 8 neighboring pixels around pixel p, and the grayscale value of pixel P is 0.5, and the grayscale values ​​in the neighborhood are: (0.4, 0.6, 0.5, 0.7, 0.3, 0.6, 0.4, 0.8) respectively. Set an absolute threshold to 0.1, then the second approximate number of pixel p is calculated to be 5.

[0046] S3: using an improved edge detection algorithm to obtain the number of edge contours in the corrected weld image; if the number of edge contours is greater than a set threshold, the grinding is determined to be unqualified.

[0047] The above threshold value may be set to 3, and of course, it may be determined according to actual conditions.

[0048] In one embodiment, the edge detection algorithm is a Sobel operator or a Canny edge detection.

[0049] For example, after edge detection is completed, edge contour statistics are performed next. Specifically, the edge detection algorithm outputs all edge information in the weld image and divides it into different contours according to the continuity and shape of the edge. At this time, it is necessary to count the number of edge contours in the image as a basis for subsequent quality judgment.

[0050] In the actual welding process, the quality of the weld is often closely related to its surface flatness and uniformity. If there are many irregular edge contours on the weld surface, it may be due to uneven welding, excessive grinding or other process defects. Therefore, the number of edge contours can effectively reflect the quality of the weld. If the number of edge contours detected in the image exceeds the preset threshold, it means that there are many unqualified defects on the weld surface, which may be due to incomplete grinding or problems in the welding process. At this time, by comparing the number of edge contours with the set threshold, the quality judgment can be automatically performed. If the number of detected edge contours is greater than the set threshold, it is judged as unqualified grinding and triggers the corresponding alarm or prompt information.

[0051] The solution of the present invention can accurately evaluate the grinding quality of the weld surface by combining image processing technology with eigenvalue analysis. By correcting the grayscale value of the weld image and using an improved edge detection algorithm, the influence of noise can be effectively eliminated and the precise contour of the weld edge can be extracted. On this basis, by calculating the environmental eigenvalue and grayscale performance value, the stability and abnormality of the pixel points can be quantified, thereby comprehensively evaluating the smoothness and integrity of the weld. This solution not only improves the accuracy and robustness of weld quality detection, but also reduces manual intervention through automated detection, thereby improving production efficiency and quality control level.

[0052] In the description of this specification, "plurality" or "several" means at least two, such as two, three or more, etc., unless otherwise clearly and specifically defined.

[0053] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.

Claims

1. A method for detecting the quality of weld grinding of a welded shell, characterized in that: include: Acquire the weld image to be inspected; The gray value of each pixel in the weld image is corrected to obtain a corrected weld image. The number of edge contours in the corrected weld image is obtained using an edge detection algorithm. If the number of edge contours is greater than a set threshold, the grinding is judged to be unqualified. Among them, the corrected gray value for, , where is the normalization function, is an exponential function with the natural constant e as base, For the The proportion of pixel data in the environmental eigenvalue matrix, For the The Manhattan distance between the position of a pixel in the environment eigenvalue matrix and the diagonal of the matrix; For the The environmental characteristic value of each pixel characterizes the stability of the pixel, and the expression is: , where For the first The neighborhood range is set as the center of the pixel point. For the first The pixel point is the center of the set neighborhood. The neighborhood range of pixels is set. To set the number of pixels in the neighborhood, For the The second approximate number of pixels, To set the neighborhood The second approximate number of pixels, For the The grayscale value of each pixel, To set the neighborhood The grayscale value of each pixel; The second approximate number is specifically: presetting an initial approximate number of any pixel point, if the absolute value of the difference between the grayscale representation value of any pixel point and the pixel points within its set neighborhood is less than a set absolute threshold, then the initial approximate number of any pixel point is increased by one until all the pixel points within the set neighborhood of any pixel point are traversed to obtain the second approximate number of any pixel point; The grayscale representation value represents the abnormality of the pixel point, and the expression is: , where For the The gray value of a pixel, For the first The maximum gray value of the pixels in the set neighborhood with the pixel as the center. To set the minimum gray value of pixels within the neighborhood, is an empirical constant; The environmental eigenvalue matrix is: the environmental eigenvalues ​​of the target pixel and its right adjacent pixel are used as the coordinate index of the target pixel in the environmental eigenvalue matrix, and the environmental eigenvalues ​​of the target pixel are mapped to the corresponding positions in the environmental eigenvalue matrix based on the coordinate index to obtain the environmental eigenvalue matrix. The target pixel is any pixel in the weld image.

2. The method for detecting the weld grinding quality of a welded shell according to claim 1, characterized in that: The environmental characteristic value is: , where For the The environmental characteristic value of each pixel, For the first The neighborhood range is set as the center of the pixel point. For the first The pixel point is the center of the set neighborhood. The neighborhood range of pixels is set. is the number of pixels within the set neighborhood, For the The grayscale value of each pixel, The first The grayscale representation value of each pixel point represents the abnormality degree of the pixel point.

3. The method for detecting the weld grinding quality of a welded shell according to claim 1, characterized in that: The image of the weld to be inspected is acquired using a CCD camera or a CMOS camera.

4. The method for detecting the weld grinding quality of a welded shell according to claim 1, characterized in that: The method also includes performing denoising and grayscale processing on the weld image to be detected.

5. The method for detecting the weld grinding quality of a welded shell according to claim 1, characterized in that: The edge detection algorithm is Sobel operator or Canny edge detection.

Citation Information

Patent Citations

  • Weld joint surface defect detection method and system

    CN117911326A

  • Welding defect extraction method and welding defect detection method

    CN104036495A

  • Weld defect detection method based on threshold segmentation

    CN116993744A