A new energy welding quality detection method
Through multi-module technical solutions and intelligent defect evaluation models, automated and accurate detection of welded joints is achieved, solving the problem that traditional detection methods cannot quickly and accurately identify small defects and are affected by human factors, improving the accuracy and reliability of the detection, and timely discovering and handling welding quality problems.
Patent Information
- Application Number
- CN202411697019.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-04-01
- Estimated Expiration
- Not applicable · inactive patent
Smart Images

Figure CN119740902A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of new energy welding, and in particular relates to a new energy welding quality detection method and system. Background Art
[0002] With the rapid development of the new energy industry, especially the rise of the new energy vehicle field, welding technology plays a vital role in the manufacturing of new energy equipment. The welding quality directly affects the safety, stability and service life of new energy equipment. Therefore, it is particularly important to conduct efficient and accurate testing of new energy welding quality.
[0003] Although traditional welding quality inspection methods have achieved certain results, they still have some limitations in the field of new energy welding. For example, traditional methods may not be able to quickly and accurately identify tiny defects in welded joints, or the inspection process is too cumbersome and time-consuming to meet the needs of efficient production of new energy equipment. In addition, traditional methods may also be affected by human factors, resulting in insufficient reliability and consistency of inspection results. Summary of the invention
[0004] In order to overcome the shortcomings and deficiencies of the above-mentioned prior art, the first purpose of the present invention is to provide a new energy welding quality detection method; the second purpose of the present invention is to provide a new energy welding quality detection system.
[0005] The first object of the present invention adopts the following technical solution:
[0006] A new energy welding quality detection method, the steps are as follows:
[0007] Step 1: Obtain an image of the welded part to be inspected, perform grayscale processing, and obtain a grayscale image of the welded part; extract the welding edge from the welding grayscale image, and use Hough linear transformation to extract the welding line and potential defect edge from the welding edge;
[0008] Step 2: Calculate the gradient direction of each pixel in the welding grayscale image, and calculate the sharpness of each pixel according to the gradient direction of each pixel on each potential defect edge;
[0009] Step 3: Based on each potential defect edge, a skeleton extraction algorithm is used to obtain each potential defect area and its skeleton, and the defect feature of each pixel on each potential defect edge is calculated based on the gray value of each pixel on the skeleton and the difference in gray values of adjacent pixels on the potential defect edge;
[0010] Step 4: Calculate the variance of the gradient direction according to the gradient direction of each pixel point on the skeleton of each potential defect area, and calculate the defect performance degree of each potential defect area according to the sharpness of each edge pixel point on each potential defect edge, the defect characteristics and the variance of the gradient direction;
[0011] Step 5: Preset multiple expression degree thresholds, mark potential defect areas with defect expression degrees greater than or equal to different thresholds as slight defects, medium defects and severe defects respectively, and preset area ratio thresholds. If the ratio of the sum of the number of pixels in all defect areas to the total number of pixels in the welding grayscale image is greater than or equal to the area ratio threshold, the quality of the welded part to be inspected is determined to be unqualified;
[0012] Step 6: Calculate the surface defect coefficient, defect area change rate, defect location concentration and comprehensive evaluation coefficient, and judge whether the weld joint meets the quality standard according to the preset defect threshold;
[0013] Step 7. For unqualified welded joints, a destruction mark is generated and unqualified information is recorded. Further production process data is obtained to analyze the failure of welding equipment and decide whether to start troubleshooting or quality inspection procedures based on the preset production failure threshold and production quantity difference threshold; production process data, including production stage, welding equipment number used and production time;
[0014] Step 8: Generate visual inspection results, including marking of defect areas and annotation of defect severity.
[0015] Preferably, step 2 is as follows:
[0016] S21: Use the Sobel operator to calculate the gradient direction of each pixel in the welding grayscale image;
[0017] S22: Calculate the sharpness of each pixel point according to the gradient direction of each pixel point on each potential defect edge;
[0018] S23: Draw a tangent for each pixel on each potential defect edge, and obtain the minimum angle between the gradient direction of any pixel on any potential defect edge and the tangent of the pixel, which is marked as the minimum angle between the gradient direction of the pixel and the tangent;
[0019] S24: Calculate the sharpness of each pixel point based on the minimum angle between the gradient direction of each pixel point on each potential defect edge and the tangent line. The specific calculation formula is as follows: Among them, sharpness i,j Indicates the sharpness of the jth pixel on the edge of the i-th potential defect; θ i,jIt represents the minimum angle between the gradient direction of the jth pixel on the i-th potential defect edge and the tangent line. is a logarithmic function with base 2.
[0020] Preferably, step three is as follows:
[0021] Mark the area within the edge of the i-th potential defect as the i-th potential defect area;
[0022] Obtain the skeleton of the ith potential defect area; mark the pixel point on the skeleton of the ith potential defect area that has the shortest Euclidean distance to the jth pixel point on the ith potential defect edge as the corresponding point of the jth pixel point on the ith potential defect edge;
[0023] According to the gray value of the corresponding point of each pixel on each potential defect edge, and the difference in gray value between each pixel on each potential defect edge and the surrounding pixels, the defect feature of each pixel on each potential defect edge is calculated. The specific calculation formula is as follows: i,j =max(0,|G i,j -G corresponding,i,j |); among them, defectfeature i,j G represents the defect feature of the jth pixel on the i-th potential defect edge; i,j G represents the gray value of the jth pixel on the i-th potential defect edge; corresponding,i,j Represents the gray value of the corresponding point of the jth pixel on the i-th potential defect edge.
[0024] Preferably, the defect manifestation degree of each potential defect area in step 4 is calculated by the following formula: Among them, α and β are weight coefficients, which represent the importance of defect features and gradient direction variance respectively; defectdegree i Indicates the degree of defect performance of the i-th potential defect area; defect feature i,j Represents the defect feature of the jth pixel on the i-th potential defect edge; sharpness i,j Indicates the sharpness of the jth pixel on the i-th potential defect edge; variance i represents the variance of the gradient direction of the pixel points on the skeleton of the i-th potential defect area; N i represents the number of pixels on the edge of the i-th potential defect; α and β are the weight coefficients of the defect feature and variance respectively; σ represents the sigmoid function, which is used to map the final result to a suitable range.
[0025] Preferably, the calculation formula of the surface defect coefficient D in step six is as follows: Among them, ω i is the weight of the i-th defect point; s i is the severity of the i-th defect point; n is the number of defect points; the larger D is, the more serious the surface defect of the weld joint is;
[0026] The calculation formula of defect area change rate V is as follows: Among them, A t A is the total defect area at the current time point t; t-1 is the total defect area at the previous time point t-1;
[0027] If V>0, it means the defect area increases; if V<0, it means the defect area decreases; if V=0, it means the defect area does not change;
[0028] The calculation formula of defect location concentration C is as follows: Among them, x i Represents the horizontal coordinate of the i-th defect point; y i Represents the ordinate of the i-th defect point; Represents the average value of the horizontal coordinates of all defect points; It represents the average value of the ordinates of all defect points; n represents the number of defect points; A represents the total area of the weld joint; C represents the ratio of the variance of the defect point position relative to the average position to the total area of the weld joint. The larger the C value, the more dispersed the defect points are distributed, and the smaller the C value, the more concentrated the defect points are distributed.
[0029] The calculation formula of the comprehensive evaluation coefficient E is as follows: E=αD+βV+γC; wherein D is the surface defect coefficient; V is the defect area change rate; C is the defect position concentration; α, β and γ are the preset proportional coefficients of the surface defect coefficient D, the defect area change rate V and the defect position concentration C respectively.
[0030] Preferably, whether the weld joint meets the quality standard is judged according to a preset defect threshold, specifically as follows: whether the weld joint meets the quality standard is judged according to a preset defect threshold X, if E≤X; the weld joint is qualified; if E>X; the weld joint is unqualified, and a destruction mark is generated.
[0031] Preferably, step seven also includes analyzing the fault condition of the welding equipment, specifically:
[0032] S61, calculate the frequency of each welding equipment number appearing in all unqualified welding joints, and convert these frequencies into proportions of the total frequency, and sort them from large to small according to the proportion to form a set S;
[0033] S62. In a specific time period, the number of welding joints with destruction marks and the total number of welding joints are counted, and according to the preset production failure threshold and production quantity difference threshold, it is decided whether to start the troubleshooting or quality inspection procedure:
[0034] Condition 1: The failure rate exceeds the preset production failure threshold;
[0035] Condition 2: The difference between the actual production quantity and the planned production quantity exceeds the preset production quantity difference threshold;
[0036] When condition one is met, the relevant welding equipment is troubleshooted according to the order of the equipment numbers in set S; when both conditions are met at the same time, in addition to troubleshooting, a comprehensive quality inspection of the welding equipment is also required according to the order in set S.
[0037] Preferably, step seven further includes abnormal analysis: counting the number of destroyed marked weld joints and the total number of weld joints in a specific time period, comparing these numbers with a preset threshold value of the number of unqualified weld joints, and determining whether the time period is an abnormal time period; calculating the ratio of the number of destroyed marks in the abnormal time period to the total number of unqualified weld joints, i.e., the abnormal ratio, and the standard deviation of the number of all unqualified weld joints in this period;
[0038] Judgment criteria: If the abnormal ratio and standard deviation are both lower than the respective set thresholds, it is considered an occasional abnormality; otherwise, it is considered a continuous abnormality and a fault warning is issued.
[0039] The second object of the present invention adopts the following technical solution:
[0040] A new energy welding quality detection system is used to implement a new energy welding quality detection method, including an image acquisition and preprocessing module, an edge extraction module, a gradient and sharpness calculation module, a skeleton extraction and defect feature calculation module, a defect manifestation degree calculation module, a defect classification and quality judgment module, a defect assessment and comprehensive evaluation module, a result output and troubleshooting module, an abnormality analysis module and a visual detection result generation module.
[0041] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0042] 1. The present invention not only considers the grayscale image and edge features of the welded parts, but also introduces features of multiple dimensions such as gradient direction, sharpness, defect features, skeleton information, etc. for comprehensive analysis. The multi-feature fusion analysis method can capture the quality information of welded parts more comprehensively and improve the accuracy and reliability of detection.
[0043] 2. The present invention establishes an intelligent defect assessment model by calculating indicators such as defect manifestation degree, surface defect coefficient, defect area change rate, defect location concentration and comprehensive evaluation coefficient. The model can automatically conduct quantitative assessment of the quality of welded joints, reduce the interference of human factors, and improve the accuracy and objectivity of the assessment.
[0044] 3. The present invention establishes a troubleshooting and quality inspection mechanism, which can troubleshoot and detect potential faults based on the quality assessment results of the welding joints and the production process data. This mechanism helps to promptly discover and deal with welding quality problems, and avoid the spread and deterioration of quality problems.
[0045] 4. The present invention generates visual inspection results including defect area marks and defect severity annotations to facilitate manual review and further processing. This visual output method makes the inspection results more intuitive and easy to understand, improving the efficiency and accuracy of the inspection work. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0047] Figure 1 A flow chart of a new energy welding quality detection method of the present invention is shown;
[0048] Figure 2 A module diagram of a new energy welding quality detection system of the present invention is shown;
[0049] Figure 3 The flowchart of calculating the gradient direction and sharpness of the present invention is shown. DETAILED DESCRIPTION
[0050] 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.
[0051] 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.
[0052] Embodiment 1:
[0053] See also Figure 1 As shown, a new energy welding quality detection method of this embodiment has the following steps:
[0054] Step 1: Obtain the image of the welded part to be inspected.
[0055] S1: Acquire an image of the welded part to be inspected, perform grayscale processing, and obtain a grayscale image of the welded part, which is marked as a welding grayscale image.
[0056] The image of the welded part to be inspected is obtained, and a high-resolution image is taken with an industrial camera. The image is grayed to obtain a grayscale image of the welded part, which is marked as a welding grayscale image. The grayscale image is denoised and contrast enhanced to improve image quality.
[0057] Step 2: Extract the welding edge.
[0058] S21: Use the Canny edge detection algorithm, select appropriate high and low thresholds (such as a low threshold of 50 and a high threshold of 150), and extract the welding edge from the welding grayscale image.
[0059] S22: Use Hough line transform, set the accumulator threshold to 100, and the minimum line length to 50 to extract welding lines and potential defect edges from the welding edges.
[0060] Step 3: Calculate the gradient direction and sharpness.
[0061] See also Figure 3 As shown, the calculation of gradient direction and sharpness is as follows:
[0062] S31: Use the Sobel operator to calculate the gradient direction of each pixel in the welding grayscale image.
[0063] S32: Calculate the sharpness of each pixel point according to the gradient direction of each pixel point on each potential defect edge.
[0064] S33: Draw a tangent for each pixel on each potential defect edge, and obtain the minimum angle between the gradient direction of any pixel on any potential defect edge and the tangent of the pixel, which is marked as the minimum angle between the gradient direction of the pixel and the tangent.
[0065] S34: Calculate the sharpness of each pixel point based on the minimum angle between the gradient direction of each pixel point on each potential defect edge and the tangent line. The specific calculation formula is as follows:
[0066]
[0067] Among them, sharpness i,j Indicates the sharpness of the jth pixel on the edge of the i-th potential defect; θ i,j It represents the minimum angle between the gradient direction of the jth pixel on the i-th potential defect edge and the tangent line. is a logarithmic function with base 2.
[0068] Step 4: Based on each potential defect edge, use a skeleton extraction algorithm (such as medial axis transformation) to obtain each potential defect region and the skeleton of each potential defect region.
[0069] The defect feature of each pixel on each potential defect edge is calculated according to the gray value of each pixel on the skeleton of each potential defect area and the difference in gray values of adjacent pixels on each potential defect edge.
[0070] The area within the edge of the i-th potential defect is marked as the i-th potential defect area.
[0071] Obtain the skeleton of the ith potential defect area; mark the pixel point on the skeleton of the ith potential defect area that has the shortest Euclidean distance to the jth pixel point on the ith potential defect edge as the corresponding point of the jth pixel point on the ith potential defect edge.
[0072] According to the gray value of the corresponding point of each pixel on each potential defect edge, and the difference in gray value between each pixel on each potential defect edge and the surrounding pixels, the defect feature of each pixel on each potential defect edge is calculated. The specific calculation formula is as follows:
[0073] defect feature i,j =max(0,|G i,j -G corresponding,i,j |);
[0074] Among them, defect feature i,j G represents the defect feature of the jth pixel on the i-th potential defect edge; i,jG represents the gray value of the jth pixel on the i-th potential defect edge; corresponding,i,j Represents the gray value of the corresponding point of the jth pixel on the i-th potential defect edge.
[0075] Step 5: Calculate the degree of defect manifestation.
[0076] According to the gradient direction of each pixel point on the skeleton of each potential defect region, the variance of the gradient direction of the pixel points on the skeleton of each potential defect region is calculated.
[0077] According to the sharpness of each edge pixel on each potential defect edge, the defect characteristics and the variance of the gradient direction of the pixel points on the skeleton of each potential defect area, the defect manifestation degree of each potential defect area is calculated. The specific calculation formula is as follows:
[0078]
[0079] Where α and β are weight coefficients, representing the importance of defect features and gradient direction variance respectively; σ represents the sigmoid function.
[0080] Among them, defect degree i Indicates the degree of defect performance of the i-th potential defect area; defectfeature i,j Represents the defect feature of the jth pixel on the i-th potential defect edge; sharpness i,j Indicates the sharpness of the jth pixel on the i-th potential defect edge; variance i represents the variance of the gradient direction of the pixel points on the skeleton of the i-th potential defect area; N i represents the number of pixels on the edge of the i-th potential defect; α and β are the weight coefficients of the defect feature and variance respectively; σ represents the sigmoid function, which is used to map the final result to a suitable range.
[0081] Step 6: Preset multiple performance level thresholds, and mark potential defect areas with defect performance levels greater than or equal to different thresholds as slight defects, medium defects, and severe defects, respectively.
[0082] A preset area ratio threshold is set. If the ratio of the sum of the number of pixels in all defect areas to the total number of pixels in the welding grayscale image is greater than or equal to the area ratio threshold, the quality of the welded part to be inspected is determined to be unqualified.
[0083] Step 7: Defect assessment and quality judgment.
[0084] Calculate the surface defect coefficient D, the calculation formula is as follows:
[0085]
[0086] Among them, ω i is the weight of the i-th defect point; s i is the severity of the i-th defect point; n is the number of defect points; the larger D is, the more serious the surface defect of the weld joint is.
[0087] Calculate the defect area change rate V, the calculation formula is as follows:
[0088]
[0089] Among them, A t A is the total defect area at the current time point t; t-1 is the total defect area at the previous time point t-1.
[0090] If V>0, it means the defect area increases;
[0091] If V < 0, it means the defect area is reduced;
[0092] If V=0, it means the defect area has not changed.
[0093] Calculate the defect location concentration C, the calculation formula is as follows:
[0094]
[0095] Among them, x i Represents the horizontal coordinate of the i-th defect point; y i Represents the ordinate of the i-th defect point; Represents the average value of the horizontal coordinates of all defect points; It represents the average value of the vertical coordinates of all defect points; n represents the number of defect points; A represents the total area of the weld joint; C represents the ratio of the variance of the defect point position relative to the average position to the total area of the weld joint. The larger the C value, the more dispersed the defect point distribution is, and the smaller the C value, the more concentrated the defect point distribution is.
[0096] Calculate the comprehensive evaluation coefficient, the calculation formula is as follows:
[0097] E = αD + βV + γC;
[0098] Wherein, D is the surface defect coefficient; V is the defect area change rate; C is the defect position concentration; α, β and γ are the preset proportional coefficients of the surface defect coefficient D, the defect area change rate V and the defect position concentration C respectively.
[0099] Basis for quality judgment: Determine whether the welded joint meets the quality standards based on the preset defect threshold X.
[0100] If E≤X, the welded joint is qualified;
[0101] If E>X; the weld joint is unqualified and a destruction mark is generated.
[0102] Step 8: Result output and troubleshooting.
[0103] Qualified welding joints: record and output qualified information.
[0104] Unqualified welded joints: Generate a destruction mark and record the unqualified information.
[0105] For welded joints that generate destruction marks, further production process data is obtained, including the production stage, welding equipment number used, and production time.
[0106] Analyze the failure conditions of welding equipment, calculate the proportion of the occurrence frequency of each equipment number to the total frequency, and sort them by proportion and store them in set S.
[0107] The number of welded joints marked for destruction and the total number of welded joints are counted, and a decision is made whether to initiate a troubleshooting or quality inspection procedure based on the preset production failure threshold and production quantity difference threshold.
[0108] Troubleshooting and quality inspection
[0109] Troubleshooting: When the conditions are met, troubleshoot the welding equipment according to the numbering order in set S.
[0110] Quality inspection: When all conditions are met at the same time, the welding equipment is quality inspected according to the order of numbers in set S.
[0111] Anomaly Analysis
[0112] Analysis of unqualified welded joints:
[0113] Count the number of rejected weld joints within a specific time period.
[0114] These numbers are compared to the preset thresholds for the number of defective weld joints to determine whether it is a normal or abnormal period.
[0115] The ratio of the number of marks in the abnormal period to the total number of unqualified welded joints in the same time period was calculated as the abnormal ratio, and the standard deviation of the number of all unqualified welded joints in this period was calculated.
[0116] If the anomaly ratio and standard deviation are both lower than their respective thresholds, it is considered an occasional anomaly; otherwise, it is considered a persistent anomaly and a fault warning is issued.
[0117] Generate visual inspection results, including marking of defect areas and annotation of defect severity, to facilitate manual review.
[0118] The beneficial effects of this embodiment are as follows: through multi-step image processing and feature extraction technology, the surface defects of the welded joints are identified and evaluated, and the accuracy and reliability of the detection are improved. Multi-dimensional indicators such as defect manifestation degree, surface defect coefficient, defect area change rate and defect location concentration are used to comprehensively evaluate the welding quality and effectively distinguish between minor, medium and severe defects. Combined with production data for troubleshooting and quality inspection, potential problems are discovered and resolved in a timely manner, product quality is guaranteed, production costs are reduced, and production efficiency is improved.
[0119] Embodiment 2:
[0120] See also Figure 2 As shown, a new energy welding quality detection system of this embodiment includes:
[0121] Image acquisition and preprocessing module: Use an industrial camera to capture high-resolution images of welded parts, convert the images into grayscale, obtain a welding grayscale image, perform denoising and contrast enhancement on the grayscale image to improve image quality.
[0122] Edge extraction module: Use Canny edge detection algorithm to extract welding edges, and use Hough line transform to extract welding lines and potential defect edges.
[0123] Gradient direction and sharpness calculation module: calculate the gradient direction of each pixel in the welding grayscale image; calculate the sharpness of each pixel on the edge of each potential defect; calculate the minimum angle between the gradient direction and the tangent of each pixel on the edge of each potential defect; calculate the sharpness of each pixel based on the minimum angle.
[0124] Skeleton extraction and defect feature calculation module: use the skeleton extraction algorithm to extract the skeleton of each potential defect area; calculate the gray value of each pixel on the skeleton of each potential defect area; calculate the defect feature of each pixel on the edge of each potential defect.
[0125] Defect manifestation degree calculation module: calculates the variance of the gradient direction of the pixel points on the skeleton of each potential defect area; calculates the defect manifestation degree of each potential defect area according to the defect characteristics, sharpness and gradient direction variance.
[0126] Defect classification and quality judgment module: preset multiple performance thresholds, and mark the potential defect areas with defect performance levels greater than or equal to different thresholds as minor defects, medium defects and severe defects respectively; preset area ratio thresholds to judge whether the quality of the welded parts is qualified.
[0127] Defect assessment and comprehensive evaluation module: calculate the surface defect coefficient, defect area change rate, defect location concentration and comprehensive evaluation coefficient; judge whether the welding joint is qualified according to the preset defect threshold.
[0128] Result output and troubleshooting module: record and output the information of qualified welding joints; generate destruction marks and record the information of unqualified welding joints; obtain the production process data of unqualified welding joints, including the production stage, welding equipment number used and production time, etc.; analyze the failure of welding equipment and calculate the proportion of the occurrence frequency of each equipment number to the total frequency; decide whether to start the troubleshooting or quality inspection procedure.
[0129] Abnormal analysis module: count the number of unqualified weld joints in a specific time period; compare these numbers with the preset threshold of the number of unqualified weld joints to determine whether it is a normal or abnormal period; calculate the ratio of the number of abnormal period marks to the total number of unqualified weld joints in the same time period as the abnormal ratio; calculate the standard deviation of the number of all unqualified weld joints in this period; determine the type of abnormality and generate a fault warning.
[0130] Visual inspection result generation module: Generates visual inspection results, including marking of defect areas and annotation of defect severity, and provides a convenient manual review interface.
[0131] The significance and effects of this embodiment are as follows: This system realizes automatic and accurate detection of welding quality by integrating image processing, edge detection, gradient calculation, defect feature analysis and comprehensive evaluation technologies. It can effectively identify and classify welding defects, improve detection efficiency and accuracy, reduce the influence of human factors, ensure product quality, and optimize production processes, reduce defective product rates and improve overall manufacturing levels through troubleshooting and abnormality analysis.
[0132] The weight coefficients of the present invention are used to measure the degree of influence of different factors or variables on a certain result or decision. The definition of weight coefficient refers to the value assigned to each factor when comparing and evaluating multiple factors to reflect its importance or priority. These weight coefficients can be determined according to specific circumstances and needs, and are usually jointly formulated and confirmed by professionals or relevant stakeholders. By reasonably setting the weight coefficients, it can help the program or system to make decisions or predictions more accurately.
[0133] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
[0134] The preferred embodiments of the present invention disclosed above are only used to help explain the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to only specific implementation methods. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.
Claims
1. A new energy welding quality detection method, characterized in that: The method comprises the following steps: Step 1: Obtain an image of the welded part to be inspected, perform grayscale processing, and obtain a grayscale image of the welded part; extract the welding edge from the welding grayscale image, and use Hough linear transformation to extract the welding line and potential defect edge from the welding edge; Step 2: Calculate the gradient direction of each pixel in the welding grayscale image, and calculate the sharpness of each pixel according to the gradient direction of each pixel on each potential defect edge; Step 3: Based on each potential defect edge, a skeleton extraction algorithm is used to obtain each potential defect area and its skeleton, and the defect feature of each pixel on each potential defect edge is calculated based on the gray value of each pixel on the skeleton and the difference in gray values of adjacent pixels on the potential defect edge; Step 4: Calculate the variance of the gradient direction according to the gradient direction of each pixel point on the skeleton of each potential defect area, and calculate the defect performance degree of each potential defect area according to the sharpness of each edge pixel point on each potential defect edge, the defect characteristics and the variance of the gradient direction; Step 5: Preset multiple expression degree thresholds, mark potential defect areas with defect expression degrees greater than or equal to different thresholds as slight defects, medium defects and severe defects respectively, and preset area ratio thresholds. If the ratio of the sum of the number of pixels in all defect areas to the total number of pixels in the welding grayscale image is greater than or equal to the area ratio threshold, the quality of the welded part to be inspected is determined to be unqualified; Step 6: Calculate the surface defect coefficient, defect area change rate, defect location concentration and comprehensive evaluation coefficient, and judge whether the weld joint meets the quality standard according to the preset defect threshold; Step 7: For unqualified welded joints, a destruction mark is generated and unqualified information is recorded, and further production process data is obtained to analyze the failure of the welding equipment, and decide whether to start the troubleshooting or quality inspection procedure based on the preset production failure threshold and production quantity difference threshold; The production process data, including the production stage, welding equipment number used and production time; Step 8: Generate visual inspection results, including marking of defect areas and annotation of defect severity.
2. A new energy welding quality detection method according to claim 1, characterized in that: The step 2 is specifically as follows: S21: Use the Sobel operator to calculate the gradient direction of each pixel in the welding grayscale image; S22: Calculate the sharpness of each pixel point according to the gradient direction of each pixel point on each potential defect edge; S23: Draw a tangent for each pixel on each potential defect edge, and obtain the minimum angle between the gradient direction of any pixel on any potential defect edge and the tangent of the pixel, which is marked as the minimum angle between the gradient direction of the pixel and the tangent; S24: Calculate the sharpness of each pixel point based on the minimum angle between the gradient direction of each pixel point on each potential defect edge and the tangent line. The specific calculation formula is as follows: Among them, sharpness i,j Indicates the sharpness of the jth pixel on the edge of the i-th potential defect; θ i,j It represents the minimum angle between the gradient direction of the jth pixel on the i-th potential defect edge and the tangent line. is a logarithmic function with base 2.
3. A new energy welding quality detection method according to claim 1, characterized in that: The step three is as follows: Mark the area within the edge of the i-th potential defect as the i-th potential defect area; Obtain the skeleton of the ith potential defect area; mark the pixel point on the skeleton of the ith potential defect area that has the shortest Euclidean distance to the jth pixel point on the ith potential defect edge as the corresponding point of the jth pixel point on the ith potential defect edge; According to the gray value of the corresponding point of each pixel on each potential defect edge, and the difference in gray value between each pixel on each potential defect edge and the surrounding pixels, the defect feature of each pixel on each potential defect edge is calculated. The specific calculation formula is as follows: defectfeature i,j =max(0,|G i,j -G corresponding,i,j |); among them, defectfeature i,j G represents the defect feature of the jth pixel on the i-th potential defect edge; i,j G represents the gray value of the jth pixel on the i-th potential defect edge; corresponding,i,j Represents the gray value of the corresponding point of the jth pixel on the i-th potential defect edge.
4. A new energy welding quality detection method according to claim 1, characterized in that: The defect performance degree of each potential defect area in step 4 is calculated by the following formula: Among them, α and β are weight coefficients, which represent the importance of defect features and gradient direction variance respectively; defectdegree i Indicates the degree of defect performance of the i-th potential defect area; defectfeature i,j Represents the defect feature of the jth pixel on the i-th potential defect edge; sharpness i,j Indicates the sharpness of the jth pixel on the i-th potential defect edge; variance i represents the variance of the gradient direction of the pixel points on the skeleton of the i-th potential defect area; N i represents the number of pixels on the edge of the i-th potential defect; α and β are the weight coefficients of the defect feature and variance respectively; σ represents the sigmoid function, which is used to map the final result to a suitable range.
5. A new energy welding quality detection method according to claim 1, characterized in that: The calculation formula of the surface defect coefficient D in step 6 is as follows: Among them, ω i is the weight of the i-th defect point; s i is the severity of the i-th defect point; n is the number of defect points; the larger D is, the more serious the surface defect of the weld joint is; The calculation formula of the defect area change rate V is as follows: Among them, A t A is the total defect area at the current time point t; t-1 is the total defect area at the previous time point t-1; If V>0, it means the defect area increases; if V<0, it means the defect area decreases; if V=0, it means the defect area does not change; The calculation formula of the defect location concentration C is as follows: Among them, x i Represents the horizontal coordinate of the i-th defect point; y i Represents the ordinate of the i-th defect point; Represents the average value of the horizontal coordinates of all defect points; It represents the average value of the ordinates of all defect points; n represents the number of defect points; A represents the total area of the weld joint; C represents the ratio of the variance of the defect point position relative to the average position to the total area of the weld joint. The larger the C value, the more dispersed the defect points are distributed, and the smaller the C value, the more concentrated the defect points are distributed. The calculation formula of the comprehensive evaluation coefficient E is as follows: E=αD+βV+γC; wherein D is the surface defect coefficient; V is the defect area change rate; C is the defect position concentration; α, β and γ are the preset proportional coefficients of the surface defect coefficient D, the defect area change rate V and the defect position concentration C respectively.
6. A new energy welding quality detection method according to claim 1, characterized in that: In step six, judging whether the weld joint meets the quality standard according to the preset defect threshold is specifically as follows: judging whether the weld joint meets the quality standard according to the preset defect threshold X, if E≤X; the weld joint is qualified; if E>X; the weld joint is unqualified, and a destruction mark is generated.
7. A new energy welding quality detection method according to claim 1, characterized in that: The step 7 also includes analyzing the fault conditions of the welding equipment, specifically: S61, calculate the frequency of each welding equipment number appearing in all unqualified welding joints, and convert these frequencies into proportions of the total frequency, and sort them from large to small according to the proportion to form a set S; S62. In a specific time period, the number of welding joints with destruction marks and the total number of welding joints are counted, and according to the preset production failure threshold and production quantity difference threshold, it is decided whether to start the troubleshooting or quality inspection procedure: Condition 1: The failure rate exceeds the preset production failure threshold; Condition 2: The difference between the actual production quantity and the planned production quantity exceeds the preset production quantity difference threshold; When condition one is met, the relevant welding equipment is troubleshooted according to the order of the equipment numbers in set S; when both conditions are met at the same time, in addition to troubleshooting, a comprehensive quality inspection of the welding equipment is also required according to the order in set S.
8. A new energy welding quality detection method according to claim 1, characterized in that: The step 7 also includes abnormal analysis: counting the number of destroyed marked weld joints and the total number of weld joints in a specific time period, comparing these numbers with a preset threshold value of the number of unqualified weld joints, and determining whether the period is an abnormal period; Calculate the ratio of the number of destroyed marks to the total number of unqualified welded joints during the abnormal period, i.e., the abnormal ratio, and the standard deviation of the number of all unqualified welded joints during this period; Judgment criteria: If the abnormal ratio and standard deviation are both lower than the respective set thresholds, it is considered an occasional abnormality; otherwise, it is considered a continuous abnormality and a fault warning is issued.
9. A new energy welding quality detection system, used to implement a new energy welding quality detection method as claimed in claim 1, characterized in that: The system includes an image acquisition and preprocessing module, an edge extraction module, a gradient and sharpness calculation module, a skeleton extraction and defect feature calculation module, a defect manifestation degree calculation module, a defect classification and quality judgment module, a defect assessment and comprehensive evaluation module, a result output and troubleshooting module, an abnormality analysis module and a visual detection result generation module.
Citation Information
Cited By
Pipeline construction weld joint quality automatic detection system based on machine vision
CN120876372A
Silicon wafer microdefect testing method and system
CN120927662A