A brazing defect detection method and system based on image recognition

CN122966602APending Publication Date: 2026-10-23SHENZHEN SHENGDA VACUUM BRAZING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611174145.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-04
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0003]然而,在现有的钎焊缺陷检测中,通常采用全局统一特征判定逻辑,使得成像过程产生的周期性纹理干扰信号与真实缺陷特征无法分层剥离,导致伪影像素被误判为缺陷区域、微小真实缺陷易被背景噪声掩盖,从而缺陷识别结果存在大范围漏检与误检现象,全域缺陷识别稳定性不足

Benefits of technology

[0015]由此可见本申请中,依据所述缺陷空间类别判别对应像素位置的缺陷归属状态,生成所述焊接表面图像的缺陷识别结果;其中,确定缺陷趋势走向即可获得像素层级连续化的缺陷特征演变规律,进而弥补现有技术仅依靠单点静态像素数值判定缺陷、无法捕捉特征连续波动变化的固有缺陷。依托全域连续的趋势演变信息能够区分随机噪声带来的特征突变与真实缺陷形成的连续特征偏移,有效过滤无规律离散干扰信号,规避单点像素分析造成的误识别问题。完整的缺陷趋势变化数据为后续特征差异量化运算提供连续稳定的基础输入,实现像素维度缺陷演变状态的精细化表征,从底层数据层面减少伪影干扰与真实缺陷的特征混淆程度。确定缺陷空间类别即可获得基于像素连通域空间分布形态的标准化缺陷分类结果,进而弥补现有技术未区分缺陷空间延展形态、统一化处理各类形貌缺陷的固有缺陷。依托标准化空间分类能够对不同延展范围的缺陷实施差异化特征约束,精准区分点状、线状、面状真实缺陷与成像伪影区域,避免伪影像素被归类为缺陷区域造成识别偏差。分层划分的缺陷空间类别可建立统一客观的缺陷判定基准,实现钎缝图像全域像素缺陷状态的规范化区分,弱化全局统一判别规则带来的漏检问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122966602A_ABST
    Figure CN122966602A_ABST
Patent Text Reader

Abstract

The application provides a brazing defect detection method and system based on image recognition, and relates to the technical field of image processing. A plurality of defect scanning lines parallel to each other and perpendicular to the brazing seam are arranged on the welding surface image in the extension direction of the brazing seam. The profile defect features of the pixel positions of each defect scanning line are extracted one by one. The defect trend direction of each pixel position on the defect scanning line is determined according to the profile defect features. The defect trend directions are subjected to difference fitting to obtain the difference response values on each defect scanning line. The artifact distribution attribute of the defect at any pixel position in the extension direction of the brazing seam is identified according to the difference response values. The defect space category of the corresponding pixel position is determined according to the artifact distribution attribute. The defect attribution state of the corresponding pixel position is determined according to the defect space category, and the defect identification result of the welding surface image is generated. The application can quantitatively identify the defect features at the pixel level of the brazing seam image, so as to improve the accuracy of the defect identification result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and more specifically, to a brazing defect detection method and system based on image recognition. Background Technology

[0002] Image processing, a branch of industrial visual inspection technology, uses images of the welded surface of brazed workpieces as the processing medium. It leverages low-level image features such as pixel grayscale, gradient, and spectrum to perform quantitative analysis of the brazed seam region. This technology is widely used in quality screening of brazed components in precision machinery and heat exchange devices. The general framework for this type of image processing includes four basic steps: image acquisition, brazed seam region localization, pixel feature extraction, and feature quantification and discrimination. It identifies internal morphological anomalies in the brazed seam by analyzing the changes in the image pixel profile. This technology replaces manual visual observation with digital computation of visualized images, enabling comprehensive, blind-spot-free quantitative inspection of the brazed seam. It is a mainstream digital technology in the field of non-destructive quality inspection of industrial brazed components.

[0003] However, current brazing defect detection methods typically employ a globally unified feature judgment logic. This makes it impossible to separate the periodic texture interference signals generated during the imaging process from the true defect features at different levels. Consequently, artifact pixels are misidentified as defect areas, and tiny real defects are easily masked by background noise. As a result, the defect identification results suffer from a large number of missed and false detections, and the stability of global defect identification is insufficient. Therefore, how to perform layered quantification and identification of pixel-level defect features in brazing seam images to improve the accuracy of defect identification results is a problem facing the industry. Summary of the Invention

[0004] This application provides a brazing defect detection method and system based on image recognition, which can perform hierarchical quantitative identification of pixel-level defect features in brazing seam images to improve the accuracy of defect identification results.

[0005] In a first aspect, this application provides a brazing defect detection method based on image recognition, the method comprising the following steps: Acquire images of the welded surface of the brazed joint to be inspected; Multiple parallel and perpendicular defect scanning lines are arranged on the welded surface image along the extension direction of the brazing seam. The cross-sectional defect features of each pixel position traversed by each defect scanning line are extracted one by one. The defect trend direction of each pixel position on the defect scanning line is determined based on the cross-sectional defect features. The defect trend is fitted with a difference to obtain the difference response value on each defect scan line. Based on the difference response value, the artifact distribution attribute of the defect at any pixel position in the brazing seam extension direction is identified. Then, the spatial category of the defect at the corresponding pixel position is determined by the artifact distribution attribute. Based on the defect spatial category, the defect attribution status of the corresponding pixel position is determined, and the defect recognition result of the weld surface image is generated.

[0006] In this embodiment, arranging multiple parallel and perpendicular defect scanning lines on the weld surface image along the brazing seam extension direction specifically includes: Gradient analysis is performed on the welded surface image to extract the gradient direction field of the brazed seam region, and the principal axis vector of the brazed seam extension direction is determined based on the consistency voting of the direction field. Based on the principal axis vector, a grayscale profile sequence perpendicular to the principal axis is constructed pixel by pixel along the extension direction of the brazing seam; Effective scan lines within the weld seam width range are extracted from the grayscale profile sequence, and defect scan lines are generated.

[0007] In this embodiment, extracting the cross-sectional defect features of each pixel location traversed by the defect scan line specifically includes: The grayscale profile of each defect scan line is adaptively segmented to separate the grayscale distribution range, including the solder continuous area, the diffusion transition area, and the base material reference area. Determine the local profile defect feature value of each pixel position relative to its corresponding grayscale distribution range; Phase verification is performed on the local profile defect feature values, and non-defect response components with the same frequency as the brazing seam boundary texture are removed to obtain the profile defect features of the pixel positions traversed by each defect scan line.

[0008] In this embodiment, determining the defect trend of each pixel position on the defect scan line based on the cross-sectional defect features specifically includes: The profile defect features are decomposed, the defect detail subband energy at each scale is extracted, and the defect feature energy spectrum vector corresponding to each pixel position is constructed. Determine the spatial gradient field of the defect feature energy spectrum vector along the scan line direction, and determine the trend of candidate defects at each pixel position; The defect trend direction of each pixel position on the defect scan line is determined based on the candidate defect trend direction and the discrete trend component whose deviation from the main direction of the neighborhood exceeds a preset angle.

[0009] In this embodiment, the difference fitting of the defect trend to obtain the difference response values ​​on each defect scan line specifically includes: The defect trend direction at each pixel position on each defect scan line is nonlinearly mapped to construct a feature signal sequence that responds with the intensity of the trend direction. Determine the trend estimate at each pixel location based on the characteristic signal sequence; The trend estimate is projected along the defect scan line to obtain the difference response value on the defect scan line.

[0010] In this embodiment, identifying the artifact distribution attributes of a defect at any pixel location along the brazing seam extension direction based on the difference response value specifically includes: Based on the arrangement of the difference response values ​​along the brazing seam extension direction, a time-frequency matrix is ​​constructed with the brazing seam position as the independent variable and the difference response values ​​as the amplitude values. The time-frequency matrix is ​​decomposed to obtain the pseudo-effect components at each pixel location; The artifact distribution properties of the defect at the corresponding pixel location are determined based on the energy proportion of the artifact response component in the difference response value.

[0011] In this embodiment, determining the spatial category of the defect at the corresponding pixel location based on the artifact distribution attributes specifically includes: The weld surface image is pixel-level annotated according to the artifact distribution attributes to construct an artifact spatial distribution map containing artifact-free areas, weak artifact areas, and strong artifact areas. The spatial distribution map of artifacts is logically fused with the profile defect features pixel by pixel, and the profile defect features in the weak artifact region and the strong artifact region are weighted and suppressed to obtain artifact removal and enhanced defect features. Connectivity analysis is performed on the artifact removal and enhancement defect features to determine the defect space category to which each pixel location belongs. The defect space category includes point defects, line defects, and area defects.

[0012] In this embodiment, the defect identification result of the weld surface image is generated by determining the defect attribution status of the corresponding pixel position based on the defect space category. Specifically, this includes: The topological adjacency graph of the defect space categories is determined based on the distribution and adjacency relationships of the defect space categories in the brazing extension direction; The defect attribution status of each pixel position is obtained by traversing and reasoning through the topological adjacency graph. The defect attribution status is mapped to the weld surface image to generate defect identification results that use color coding to identify different types of defect areas.

[0013] In this embodiment, the process of traversing and reasoning through the topological adjacency graph to obtain the defect attribution status of each pixel location specifically includes: Extract spectral feature descriptors of defect space category adjacency relationships from the topological adjacency graph; The posterior probability corresponding to each pixel position is determined based on the spectral feature descriptor, and the defect attribution status is determined by the posterior probability.

[0014] Secondly, this application provides a brazing defect detection method and system based on image recognition, used to execute a brazing defect detection method based on image recognition, the system comprising: The acquisition module is used to acquire images of the welded surface of the brazed joint to be inspected; The extraction module is used to arrange multiple mutually parallel and perpendicular defect scanning lines on the welded surface image along the extension direction of the brazing seam, extract the cross-sectional defect features of the pixel positions traversed by each defect scanning line one by one, and determine the defect trend direction of each pixel position on the defect scanning line based on the cross-sectional defect features. The processing module is used to perform difference fitting on the defect trend direction to obtain the difference response value on each defect scan line, identify the artifact distribution attribute of the defect at any pixel position in the brazing seam extension direction based on the difference response value, and then determine the defect spatial category at the corresponding pixel position based on the artifact distribution attribute. The execution module is used to determine the defect attribution status of the corresponding pixel position based on the defect space category, and generate the defect recognition result of the weld surface image.

[0015] Therefore, this application generates defect recognition results for the welded surface image by determining the defect attribution status of corresponding pixel positions based on the defect space category. Determining the defect trend allows for obtaining the continuous defect feature evolution law at the pixel level, thus overcoming the inherent shortcomings of existing technologies that rely solely on single-point static pixel values ​​to determine defects and cannot capture continuous feature fluctuations. Relying on continuous trend evolution information across the entire domain, it is possible to distinguish between feature mutations caused by random noise and continuous feature shifts formed by real defects, effectively filtering irregular discrete interference signals and avoiding misidentification problems caused by single-point pixel analysis. Complete defect trend change data provides a continuous and stable basic input for subsequent feature difference quantization operations, achieving a refined representation of the defect evolution state at the pixel dimension, reducing the degree of feature confusion between artifact interference and real defects from the underlying data level. Determining the defect space category yields standardized defect classification results based on the spatial distribution morphology of pixel connected domains, thus overcoming the inherent shortcomings of existing technologies that do not distinguish the extended morphology of defect space or uniformly process various morphological defects. Standardized spatial classification enables differentiated feature constraints on defects with varying extents, accurately distinguishing between point-like, linear, and planar defects and imaging artifact regions, thus preventing artifact pixels from being classified as defect areas and causing identification bias. Hierarchical defect spatial categories establish a unified and objective defect judgment benchmark, achieving standardized differentiation of defect states across the entire pixel domain of the weld seam image, mitigating the problem of missed detections caused by globally uniform discrimination rules.

[0016] In summary, the technical solution adopted in this application can perform layered quantitative identification of pixel-level defect features in the brazing seam image, thereby improving the accuracy of defect identification results. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only for this embodiment of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is an exemplary flowchart of a brazing defect detection method based on image recognition provided in this application; Figure 2 This is a flowchart illustrating the process of extracting profile defect features according to the present application; Figure 3 This is a schematic diagram of the brazing seam artifact partitioning principle provided in this application; Figure 4 This is a module structure diagram of a brazing defect detection method and system based on image recognition provided in this application. Detailed Implementation

[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0020] This application provides a brazing defect detection method and system based on image recognition. The core of the method is to acquire an image of the welded surface of the brazed joint to be detected; arrange multiple parallel and perpendicular defect scanning lines on the welded surface image along the brazing seam extension direction; extract the cross-sectional defect features of each pixel position traversed by each defect scanning line; determine the defect trend direction of each pixel position on the defect scanning line based on the cross-sectional defect features; perform difference fitting on the defect trend direction to obtain the difference response value of each defect scanning line; identify the artifact distribution attribute of the defect at any pixel position along the brazing seam extension direction based on the difference response value; determine the spatial category of the defect at the corresponding pixel position based on the artifact distribution attribute; and determine the defect attribution status of the corresponding pixel position based on the defect spatial category to generate the defect recognition result of the welded surface image.

[0021] Example 1: To better understand the above technical solution, the following will provide a detailed description of the technical solution in conjunction with the accompanying drawings and specific implementation methods. (Refer to...) Figure 1As shown in the figure, this is an exemplary flowchart of a brazing defect detection method based on image recognition according to this embodiment of the present application. The method includes the following steps: In step S1, an image of the welded surface of the brazed joint to be inspected is obtained.

[0022] In practice, firstly, the brazed joint that has completed brazing and is ready for defect detection is selected, and the workpiece is stably placed at the image acquisition station. The industrial imaging device and auxiliary lighting components are adjusted, fixing the imaging focal length, shooting angle, and illumination parameters to reduce imaging interference caused by light distortion and random stray light. The image acquisition device is then activated to capture images of the brazed joint's welded surface, ensuring the imaging field of view completely covers the main brazed section and the adjacent base material areas on both sides of the brazed joint, acquiring the original acquired image. The original acquired image is imported into the image processing unit for basic preprocessing operations. These preprocessing operations include noise filtering and pixel amplitude normalization, filtering out salt-and-pepper noise and Gaussian noise introduced during acquisition, and unifying the image pixel quantization range. The preprocessing process does not smooth or suppress defect-related pixel features such as brazed joint edges and abrupt grayscale changes, fully preserving pixel information that reflects surface morphology differences, ultimately obtaining the welded surface image.

[0023] It should be noted that the weld surface image refers to a visual image of the weld surface of the brazed joint, which includes pixel information of the brazing seam and the base material.

[0024] In step S2, multiple parallel and perpendicular defect scanning lines are arranged on the welded surface image along the extension direction of the brazing seam. The cross-sectional defect features of each pixel position traversed by each defect scanning line are extracted one by one, and the defect trend direction of each pixel position on the defect scanning line is determined based on the cross-sectional defect features.

[0025] In this embodiment, arranging multiple parallel and perpendicular defect scanning lines on the weld surface image along the brazing seam extension direction can be achieved using the following steps: Gradient analysis is performed on the welded surface image to extract the gradient direction field of the brazed seam region, and the principal axis vector of the brazed seam extension direction is determined based on the consistency voting of the direction field. Based on the principal axis vector, a grayscale profile sequence perpendicular to the principal axis is constructed pixel by pixel along the extension direction of the brazing seam; Effective scan lines within the weld seam width range are extracted from the grayscale profile sequence, and defect scan lines are generated.

[0026] In specific implementation, firstly, the grayscale matrix of the preprocessed weld surface image is read, and the predefined candidate brazing seam region within the image is selected as the computational object. A differential operator is used to calculate the horizontal and vertical grayscale partial derivatives pixel by pixel. Based on these two sets of partial derivatives, the gradient magnitude and gradient angle corresponding to each pixel are solved. Invalid background pixels with gradient magnitudes below the response threshold are removed, while the gradient angle information of the brazing seam-related pixels is retained. The gradient direction field is constructed from the gradient angles of all valid pixels. Fixed-size local computation windows are divided, and the frequency of gradient direction distribution within the window is statistically analyzed. Gradient directions with concentrated distributions are selected through a consistency voting process, and the principal axis vector of the overall extension direction of the brazing seam is fitted. Then, using the brazing seam extension direction represented by the principal axis vector as the reference direction, the positions of each reference pixel arranged sequentially along the brazing seam extension direction are traversed. Based on the vector orthogonality operation rule, the vertical direction of the principal axis vector is solved. A sampling path traversing the image is generated along this orthogonal direction, centered on each reference pixel. The grayscale values ​​of pixels along the sampling path are collected point by point, and the grayscale values ​​are arranged in spatial order to form a single grayscale profile. This process is repeated for all reference pixels along the weld seam extension direction, generating multiple grayscale profiles in sequence. All grayscale profiles together form a grayscale profile sequence. Finally, the weld seam width range is pre-determined based on the weld seam morphology characteristics, with the spatial boundaries of the two weld seam limits as the left and right sides. Each grayscale profile in the grayscale profile sequence is then iterated through, and pixel sampling segments falling within the weld seam width range are extracted. Invalid sampling portions containing only background pixels are discarded, and the resulting continuous pixel sampling segments are the valid scan lines. All the filtered valid scan lines are then combined, maintaining a spatial relationship of parallelism and perpendicularity to the weld seam extension direction, to form multiple defect scan lines.

[0027] It should be noted that, in this application, the brazing seam extension direction refers to the spatial direction of the continuous extension of the brazing seam, used to constrain the orientation of the grayscale profile layout; gradient analysis refers to solving the gradient magnitude and gradient angle based on the pixel grayscale change; gradient direction field refers to the set of gradient angles of all effective pixels within the brazing seam area; direction field consistency voting refers to the direction solution judgment mechanism that statistically analyzes the frequency of gradient direction distribution in local windows and filters concentrated directions to eliminate random disturbances; principal axis vector represents the vector representing the stable and continuous extension direction of the brazing seam; grayscale profile sequence refers to the set of multiple grayscale sampling curves collected along the direction perpendicular to the brazing seam; brazing seam width range refers to the lateral spatial interval defined between the two boundaries of the brazing seam; effective scan line refers to the pixel sampling segment where the grayscale profile falls within the brazing seam width range; defect scan line refers to multiple effective scan lines that are parallel to each other and perpendicular to the brazing seam extension direction.

[0028] Preferably, in this embodiment, the cross-sectional defect features of the pixels traversed by each defect scan line are extracted one by one, with reference to... Figure 2 As shown in the figure, this is a schematic flowchart of extracting cross-sectional defect features in some embodiments of this application. In this embodiment, the extraction of cross-sectional defect features can be achieved by the following steps: In step S21, the grayscale profile of each defect scan line is adaptively segmented to separate the grayscale distribution range including the solder continuous area, the diffusion transition area and the base material reference area. In step S22, the local profile defect feature value of each pixel position relative to its grayscale distribution range is determined; In step S23, phase verification is performed on the local profile defect feature values, and non-defect response components with the same frequency as the brazing seam boundary texture are removed to obtain the profile defect features of the pixel positions traversed by each defect scan line.

[0029] In practical implementation, firstly, the discrete grayscale sequence of the grayscale profile corresponding to a single defect scan line is retrieved, and an adaptive segmentation judgment criterion is constructed based on the rate of change of grayscale values. The grayscale difference between adjacent pixels is calculated point by point to identify the steady-state grayscale range and the range of continuous grayscale change. The range where the grayscale value remains stable over a long period is designated as the base material reference region, the range where the grayscale value changes gradually is designated as the diffusion transition region, and the range where the grayscale value is stable and has a significant grayscale difference from the base material is designated as the solder continuous region. The entire grayscale profile is continuously traversed, dividing it into three non-overlapping grayscale distribution ranges that completely cover the sampling path, thus completing the segmentation of the entire grayscale profile region, resulting in grayscale distribution ranges including the solder continuous region, diffusion transition region, and base material reference region. Then, using the divided grayscale distribution ranges as independent calculation units, feature solving is performed on each pixel position within the range. Within the corresponding grayscale distribution interval, the mean grayscale value and the grayscale fluctuation baseline range of the interval are statistically analyzed. The difference between the current pixel's grayscale parameter and the interval baseline parameter is calculated, and a weighted correction is applied based on the spatial distance of the pixel position from the interval boundary. This yields the deviation of the current pixel from the baseline state of its interval. This deviation quantization result is the local profile defect feature value corresponding to the current pixel position. The local profile defect feature values ​​corresponding to all pixels of the grayscale profile are calculated sequentially. Finally, a one-dimensional feature signal is constructed from the local profile defect feature values ​​corresponding to the entire grayscale profile. Spectral decomposition is performed along the sampling space dimension to extract periodic components corresponding to different spatial frequencies within the signal. The frequencies of each periodic component are compared with the inherent frequencies of the weld seam boundary texture, and signal components with matching frequencies are selected as non-defect response components. Component filtering is performed on the original local profile defect feature signal to remove periodic disturbance information caused by the boundary texture. The set of effective feature values ​​retained after filtering is the profile defect feature corresponding to each pixel position on the defect scan line.

[0030] It should be noted that in this application, adaptive segmentation refers to a segmentation method that automatically divides continuous segments based on the grayscale variation law of the grayscale profile; the brazing filler continuous area refers to the spatial segment in which the brazing filler is continuously distributed within the grayscale profile; the diffusion transition area refers to the transition segment formed by the mutual wetting of the brazing filler and the base material; the base material reference area refers to the segment far from the brazing seam and containing only the base material structure; the grayscale distribution interval refers to the independent segment obtained by dividing the grayscale profile according to the grayscale variation characteristics; the local profile defect feature value refers to the quantization deviation index of a pixel relative to the reference state of its own grayscale distribution interval; phase verification refers to the signal discrimination method that distinguishes between periodic texture signals and random defect signals; the non-defect response component refers to the periodic feature component generated by the inherent texture of the brazing seam boundary, which is not a feature signal caused by the defect of the brazed joint; the profile defect feature refers to the pixel quantization feature obtained after filtering out the non-defect response component.

[0031] In this embodiment, determining the defect trend of each pixel position on the defect scan line based on the cross-sectional defect features can be achieved using the following steps: The profile defect features are decomposed, the defect detail subband energy at each scale is extracted, and the defect feature energy spectrum vector corresponding to each pixel position is constructed. Determine the spatial gradient field of the defect feature energy spectrum vector along the scan line direction, and determine the trend of candidate defects at each pixel position; The defect trend direction of each pixel position on the defect scan line is determined based on the candidate defect trend direction and the discrete trend component whose deviation from the main direction of the neighborhood exceeds a preset angle.

[0032] In practical implementation, firstly, the one-dimensional sequence of profile defect features corresponding to all pixels of a single defect scan line is taken as input data. Multi-scale wavelet decomposition is used to perform feature layer-by-layer decomposition, obtaining multi-layer defect detail sub-bands corresponding to coarse and fine scales. The square integral is performed on the feature amplitude corresponding to the same pixel position within each defect detail sub-band; the integral result is the defect detail sub-band energy of that pixel at the corresponding scale. The defect detail sub-band energies of all scales of the same pixel are arranged in order from coarse to fine scale. The ordered energy values ​​are combined to form a defect feature energy spectrum vector specific to that pixel position, and the vector construction operation is completed pixel by pixel. Then, all pixels are traversed in a one-dimensional spatial arrangement order along the defect scan line, and the defect feature energy spectrum vectors of adjacent pixels before and after the target pixel are selected as reference samples. The difference along the scan line direction is calculated for the energy values ​​of each dimension within the vector. The normalized difference results are used to obtain single-dimensional gradient components. All dimensional gradient components are integrated to form the spatial gradient vector of that pixel position. The set of gradient vectors of all pixels along the entire scan line constitutes the spatial gradient field. The direction of feature energy increase or decrease is determined based on the spatial gradient vector. This direction represents the unfiltered candidate defect trend at the current pixel location, and candidate trends are extracted pixel by pixel. Finally, a fixed-length one-dimensional neighborhood window is defined centered on the target pixel. The vector distribution frequency of all candidate defect trend directions within the window is statistically analyzed, and the vector with the highest frequency is selected as the dominant neighborhood direction. The angle between the candidate defect trend vector of the target pixel and the dominant neighborhood direction vector is calculated; this angle value represents the deviation from the dominant neighborhood direction. A fixed angle threshold is pre-set based on the continuity characteristics of the weld seam morphology. Candidate trends with deviation values ​​exceeding the threshold are marked as discrete trend components and discarded. Trends that meet the threshold constraint in terms of deviation from the dominant neighborhood direction are retained as the final defect trend for that pixel. This process is repeated for all pixels to complete the determination.

[0033] It should be noted that in this application, pixel position refers to the two-dimensional coordinate point corresponding to an independent pixel in the weld surface image; defect detail sub-band refers to the integral quantization value of the defect feature amplitude of the energy pixel at a single decomposition scale; defect feature energy spectrum vector refers to the multi-dimensional vector formed by the orderly combination of the energy of the multi-scale defect detail sub-band of the same pixel; spatial gradient field refers to the set of energy spectrum gradient vectors of all pixels along the scanning direction of the defect scan line; candidate defect trend direction refers to the original feature change direction determined by the pixel energy spectrum gradient vector; neighborhood main direction deviation refers to the angle value between the candidate trend vector of the target pixel and the trend vector of most pixels in the neighborhood; discrete trend component refers to the candidate defect trend direction whose deviation from the neighborhood main direction exceeds a preset angle threshold; defect trend direction refers to the stable change direction of the pixel feature retained after removing the discrete trend component, which is used to quantify the defect evolution law at the pixel level.

[0034] In step S3, the defect trend direction is fitted with a difference to obtain the difference response value on each defect scan line. Based on the difference response value, the artifact distribution attribute of the defect at any pixel position in the brazing seam extension direction is identified, and then the spatial category of the defect at the corresponding pixel position is determined by the artifact distribution attribute.

[0035] In this embodiment, the difference fitting of the defect trend to obtain the difference response value on each defect scan line can be achieved by the following steps: The defect trend direction at each pixel position on each defect scan line is nonlinearly mapped to construct a feature signal sequence that responds with the intensity of the trend direction. Determine the trend estimate at each pixel location based on the characteristic signal sequence; The trend estimate is projected along the defect scan line to obtain the difference response value on the defect scan line.

[0036] In practice, firstly, the defect trend vector corresponding to all pixels of a single defect scan line is extracted as the input for computation. An S-shaped nonlinear mapping function is selected to complete the vector parameter transformation. The mapping function determines the interval constraint based on the saturation variation law of the weld seam defect characteristics. After the input vector angle parameter is processed by the function, a dimensionless quantized value is output. This output value is the trend intensity of the current pixel position, which can intuitively represent the significance of the defect trend. According to the pixel arrangement order of the defect scan line, the trend intensities corresponding to all pixels are arranged sequentially, and the ordered intensity values ​​are concatenated to form a complete and continuous feature signal sequence. Then, using the feature signal sequence generated by the entire defect scan line as the fitting sample, a sliding neighborhood fitting model is used to perform trend regression calculation pixel by pixel. A fixed-length one-dimensional sliding window is defined with the target pixel as the center, and all trend intensities within the window are extracted to form a local fitting sample set. Based on the least squares fitting rule, the continuous fitting curve corresponding to the sample set is solved. The coordinates of the target pixel are substituted into the fitting curve to complete the numerical solution, and a benchmark value that can represent the average variation law of the neighborhood is obtained. This benchmark value is the trend estimate corresponding to the current pixel position. The calculation is performed pixel-by-pixel along the scan line to obtain the trend estimate value for all pixels. Finally, a linear projection reference axis is constructed along the one-dimensional spatial direction extending from the defect scan line, and the trend estimate values ​​of all pixels are mapped to this reference axis to form discrete projection points. The overall deviation of all projection points from the mean of the entire sequence is calculated, and the absolute difference between the projection value of each pixel and the global mean is accumulated. The accumulated result is normalized and scaled, and the normalized comprehensive quantization result is the difference response value corresponding to the defect scan line. Each defect scan line corresponds to a unique set of trend estimation projection calculation processes, and each scan line independently generates its own unique difference response value, completing the numerical solution for the entire scan line.

[0037] It should be noted that, in this application, difference fitting refers to the entire quantitative calculation process of mapping, fitting, and projection based on the defect trend sequence; nonlinear mapping refers to the transformation of the defect trend vector using a nonlinear function; trend intensity characterizes the significance of the defect trend of a single pixel; feature signal sequence refers to the set of trend intensities arranged in the order of pixel arrangement along the defect scan line; trend estimate refers to the average defect change level in the region at the pixel location; and difference response value refers to the overall defect trend fluctuation of a single defect scan line.

[0038] In this embodiment, identifying the artifact distribution attributes of a defect at any pixel location along the brazing seam extension direction based on the difference response value can be achieved using the following steps: Based on the arrangement of the difference response values ​​along the brazing seam extension direction, a time-frequency matrix is ​​constructed with the brazing seam position as the independent variable and the difference response values ​​as the amplitude values. The time-frequency matrix is ​​decomposed to obtain the pseudo-effect components at each pixel location; The artifact distribution properties of the defect at the corresponding pixel location are determined based on the energy proportion of the artifact response component in the difference response value.

[0039] In practice, firstly, the differential response values ​​corresponding to all defect scan lines are collected. Each defect scan line is matched to the corresponding linear coordinate point along the weld seam extension direction. The spatial coordinates of continuously distributed pixels along the weld seam extension direction are used as the independent variable dimension of the matrix, and the differential response value output by a single scan line is used as the amplitude dimension. The differential response values ​​at different longitudinal positions are filled into the rows and columns of a two-dimensional matrix in spatial order. The matrix rows correspond to the pixel points along the weld seam extension direction, and the matrix columns correspond to the amplitude information of different transverse scan sections, thus completely mapping the variation law of the differential response across the entire weld seam as the weld seam extension position changes, generating a complete time-spectrum matrix. Then, a two-dimensional orthogonal frequency domain decomposition algorithm is used to perform a layered splitting operation on the complete time-spectrum matrix, distinguishing between periodic low-frequency components and randomly abrupt high-frequency components within the matrix. Based on the inherent interference frequency of the image acquisition optical path, the frequency band interval corresponding to the artifact is defined. All two-dimensional feature components within the frequency band interval are extracted and mapped back to the coordinate point corresponding to each pixel in the matrix, separating the feature information generated only by interference such as imaging stray light and lens distortion. This type of extracted component, which is unrelated to the real defect, is the artifact response component at the corresponding pixel position. Finally, for each individual pixel location, the total energy of the artifact response component and the total energy of all differential response signals for that pixel are calculated. The energy percentage is obtained by dividing the total artifact signal energy by the total global response energy. A fixed judgment threshold is pre-set based on the inherent interference level of the imaging system. If the energy percentage is higher than the threshold, the pixel location defect is determined to be dominated by imaging artifacts; if the energy percentage is lower than the threshold, the pixel location defect is determined to be dominated by abnormal real slit morphology. Based on the percentage judgment result, the artifact distribution attribute corresponding to that pixel location is defined, and the judgment is completed by traversing all pixels along the slit extension direction.

[0040] It should be noted that in this application, the time-frequency matrix refers to the spatial distribution law of the difference response extending along the slit; the artifact response component refers to the frequency domain feature component generated by the inherent interference of the image acquisition system; and the artifact distribution attribute refers to the pixel feature attribution attribute based on the proportion of artifact signal energy.

[0041] In this embodiment, determining the spatial category of the defect at the corresponding pixel location based on the artifact distribution attributes can be achieved through the following steps: The weld surface image is pixel-level annotated according to the artifact distribution attributes to construct an artifact spatial distribution map containing artifact-free areas, weak artifact areas, and strong artifact areas. The spatial distribution map of artifacts is logically fused with the profile defect features pixel by pixel, and the profile defect features in the weak artifact region and the strong artifact region are weighted and suppressed to obtain artifact removal and enhanced defect features. Connectivity analysis is performed on the artifact removal and enhancement defect features to determine the defect space category to which each pixel location belongs. The defect space category includes point defects, line defects, and area defects.

[0042] In practical implementation, firstly, all pixels in the weld surface image are traversed, and the pre-determined artifact distribution attributes of each pixel are retrieved as the labeling basis. Two levels of energy proportion thresholds are set to divide three types of regions: pixels with artifact energy proportions below the lower threshold are marked as artifact-free regions, pixels between the two thresholds are marked as weak artifact regions, and pixels above the upper threshold are marked as strong artifact regions. Using pixel coordinates as the positioning reference, the labeling information of the three types of regions is mapped one by one to the corresponding coordinate positions in the image. The region division results are completely recorded according to the pixel spatial arrangement, generating a two-dimensional artifact spatial distribution map of the full-coverage weld surface image, completely preserving the global pixel artifact level classification information. Then, the artifact partitioning labels corresponding to pixels with the same coordinates and the original profile defect features are retrieved simultaneously, establishing a one-to-one matching mapping relationship between pixel coordinates to complete pixel-by-pixel logical fusion. Two sets of fixed suppression weight coefficients are preset: strong artifact regions are matched with smaller weight coefficients, weak artifact regions are matched with medium weight coefficients, and artifact-free regions are matched with unit weight coefficients without attenuation. The partition weight coefficients are multiplied by the original profile defect features of the corresponding pixels to perform a weighted operation, compressing the false feature amplitudes caused by artifact interference and retaining the complete defect response in artifact-free areas. After weighted operation on all pixels, a unified-dimensional artifact-removed and enhanced defect feature dataset is output. Finally, based on the artifact-removed and enhanced defect features, a defect feature amplitude threshold is set to filter out valid defect pixels that exceed the threshold. The four-neighbor connectivity rule is used to aggregate spatially continuous defect pixels to form independent connected regions. The total number of pixels and the spatial span of pixels within a single connected region are counted. Based on the number of pixels and the span, morphological standards are defined: connected regions with few pixels and extremely small length and width spans are classified as point defects; long connected regions with a length and width span difference exceeding the standard threshold are classified as line defects; and connected regions with dense pixels and both length and width spans reaching the standard threshold are classified as area defects. The defect spatial category corresponding to the connected region to which each pixel belongs is marked.

[0043] It should be noted that in this application, pixel-level annotation refers to image partitioning and annotation operations that use a single pixel of the image as the smallest unit and mark the region level according to the artifact distribution attributes; an artifact-free region refers to an image region where the proportion of pixel artifact signal energy is lower than the lower threshold; a weak artifact region refers to an image region where the proportion of pixel artifact signal energy is in the middle range between two threshold levels; a strong artifact region refers to an image region where the proportion of pixel artifact signal energy is higher than the upper threshold; an artifact spatial distribution map refers to a two-dimensional spatial distribution map that records the results of the classification of all pixel artifact regions in the welded surface image; pixel-by-pixel logical fusion refers to data matching operations that synchronously associate artifact partitioning information with profile defect features using pixel coordinates as the matching benchmark; and weighted suppression refers to matching corresponding weight coefficients for regions of different artifact levels and attenuating the artifact level. Artifact-induced false feature amplitudes are processed using various methods. Artifact removal and defect feature enhancement refer to standardized pixel feature data that retains true defect information after filtering out artifact interference through partitioned weighted suppression. Connected component analysis refers to image morphology analysis methods that aggregate defect pixels based on pixel neighborhood association rules and statistically analyze regional spatial morphological parameters. Defect spatial categories refer to defect classifications based on the spatial extension morphology of defect pixel connected components. Point defects refer to the defect spatial category corresponding to independent defect connected components with a small number of pixels and a very small spatial extension range. Linear defects refer to the defect spatial category corresponding to long, continuous defect connected components with a spatial span in one direction much larger than in another dimension. Area defects refer to the defect spatial category corresponding to defect connected components with densely packed pixels and bidirectional spatial spans reaching standard thresholds.

[0044] In step S4, the defect attribution status of the corresponding pixel position is determined according to the defect space category, and the defect identification result of the weld surface image is generated.

[0045] In this embodiment, the defect identification result of the weld surface image can be generated by determining the defect attribution status of the corresponding pixel position based on the defect spatial category using the following steps: The topological adjacency graph of the defect space categories is determined based on the distribution and adjacency relationships of the defect space categories in the brazing extension direction; The defect attribution status of each pixel position is obtained by traversing and reasoning through the topological adjacency graph. The defect attribution status is mapped to the weld surface image to generate defect identification results that use color coding to identify different types of defect areas.

[0046] In practice, firstly, using the coordinates of all pixels in the welded surface image as a spatial reference, all pixel points are traversed along the brazing seam extension direction to extract the defect spatial category label corresponding to each pixel. An eight-neighborhood spatial determination rule is used to retrieve the category information of neighboring pixels around a single pixel, statistically analyzing three types of distributed adjacency relationships: continuous connectivity of pixels with the same type of defects, boundaries between pixels with different types of defects, and boundaries between defective and non-defective pixels. A two-dimensional topology is constructed using pixels as graph nodes and adjacency relationships between pixels as connecting edges. Nodes are bound to corresponding defect spatial category identifiers, and connecting edges record the distributed adjacency relationships between nodes, generating a topological adjacency graph covering all pixels in the brazing seam. Then, a depth-first traversal rule is used to completely retrieve all nodes in the topological adjacency graph. Using the defect spatial category bound to a single node as the initial determination benchmark, the distributed adjacency relationships recorded by all adjacent edges of the node are read simultaneously for consistency verification. If most of the neighboring nodes around a node are pixels with the same type of defects, the initial defect determination result for that node is maintained; if a node is surrounded by a large area of ​​non-defective pixels and only has a few isolated defective pixels, the node's determination is corrected to a non-defective state. After completing single-node inference, the algorithm jumps to iterative operations on unsearched adjacent nodes, traversing all nodes and outputting the unique defect status for each pixel, distinguishing between four types: no defect, point defect, line defect, and area defect. Finally, a one-to-one color coding mapping rule is established between defect status and fixed colors, assigning non-overlapping standard colors to pixels with no defects, point defects, line defects, and area defects. All pixel coordinates and corresponding defect statuses in the image are retrieved, and the corresponding coded colors are matched one-to-one according to the original pixel coordinates. The colors are then filled into the corresponding pixel positions on the welded surface image, completely reproducing the outline and weld seam structure of the original image. Simultaneously, accompanying status description text is generated to record the correspondence between colors and defect types. Integrating the colored image and description text forms a visualized result for welded surface image defect recognition.

[0047] It should be noted that, in this application, distributed adjacency relationship refers to the spatial adjacency association between adjacent pixel defect spatial categories along the weld seam extension direction; topological adjacency graph refers to a two-dimensional topological structure graph constructed with pixels as nodes and pixel spatial adjacency associations as edges; traversal reasoning refers to the global logical deduction operation of retrieving all nodes in the topological adjacency graph and verifying and correcting the pixel defect determination result in combination with adjacency relationship; defect attribution status refers to the state determined by the topological adjacency graph. Figure 1 The final pixel determination result after consistency verification includes four types: no defects, point defects, line defects, and area defects; color coding refers to the standardized mapping rule that binds the defect status to a specific display color; the defect identification result refers to the visual image of the welded surface after mapping the defect status and filling it with the corresponding coded color.

[0048] In addition, in this embodiment, the defect attribution status of each pixel position can be obtained by traversing and reasoning through the topological adjacency graph using the following steps: Extract spectral feature descriptors of defect space category adjacency relationships from the topological adjacency graph; The posterior probability corresponding to each pixel position is determined based on the spectral feature descriptor, and the defect attribution status is determined by the posterior probability.

[0049] In practical implementation, firstly, the node association matrix of the complete topological adjacency graph is read. The rows and columns of the matrix correspond one-to-one with image pixel nodes, and the matrix elements record the adjacency combination forms of defect spatial categories between each pair of nodes. Graph decomposition is performed on the association matrix to solve for the matrix eigenvalues ​​and eigenvectors. The eigenvalues ​​are sorted by numerical value to form a discrete spectrum sequence. The frequency of adjacency structures corresponding to eigenvalues ​​in different intervals within the spectrum sequence is statistically analyzed. The spectrum distribution pattern, adjacency combination ratio, and node connectivity parameters are integrated into a standardized one-dimensional array, which is the spectral feature descriptor corresponding to the current pixel node. Descriptor extraction is completed by traversing all pixel nodes in the topological adjacency graph. Then, a prior distribution model for various defect spatial categories is pre-constructed based on standard samples of weld seams. The pixel node spectral feature descriptors are substituted into the Bayesian inference framework, and the conditional likelihood values ​​corresponding to different defect categories are calculated using the spectral feature descriptors as observation variables. The Bayesian formula is solved by combining the prior distribution model and the conditional likelihood values, outputting the posterior probability values ​​for four scenarios: no defect, point defect, linear defect, and area defect. By comparing the posterior probabilities of all categories for the same pixel, the category with the largest value is selected as the final defect classification state of the pixel, and the global determination operation is completed pixel by pixel.

[0050] It should be noted that, in this application, the spectral feature descriptor refers to a standardized numerical array obtained by decomposing the topological adjacency graph; the posterior probability refers to the probability value of the various defect attribution results obtained based on the pixel spectral feature descriptor observation data.

[0051] In this embodiment, reference Figure 3 As shown, this figure is a schematic diagram of the brazed joint artifact partitioning principle. The diagram consists of two parts: a schematic diagram of the brazed joint image on the left and a magnified view of the artifact partitioning in the middle section of the brazed joint. The left rectangular frame is a simplified schematic diagram of the brazed joint surface image, dividing the image into a base material region and a brazed joint region. The brazed joint region contains point-like and cluster-like defect pixels, visually presenting the original brazed joint morphology and defect distribution obtained from the original image acquisition. The left schematic diagram is connected to the magnified view in the middle through perspective lines. The middle square frame is a schematic diagram of the spatial distribution of artifacts in the local area of ​​the brazed joint. Based on the pixel artifact energy ratio, it is divided into three independent partitions: an artifact-free region, a weak artifact region, and a strong artifact region. Each partition uses differentiated cross-sectional lines to distinguish the boundaries, showing the spatial distribution of different artifact interference levels in the local image of the brazed joint.

[0052] Therefore, this application generates defect recognition results for the welded surface image by determining the defect attribution status of corresponding pixel positions based on the defect space category. Determining the defect trend allows for obtaining the continuous defect feature evolution law at the pixel level, thus overcoming the inherent shortcomings of existing technologies that rely solely on single-point static pixel values ​​to determine defects and cannot capture continuous feature fluctuations. Relying on continuous trend evolution information across the entire domain, it is possible to distinguish between feature mutations caused by random noise and continuous feature shifts formed by real defects, effectively filtering irregular discrete interference signals and avoiding misidentification problems caused by single-point pixel analysis. Complete defect trend change data provides a continuous and stable basic input for subsequent feature difference quantization operations, achieving a refined representation of the defect evolution state at the pixel dimension, reducing the degree of feature confusion between artifact interference and real defects from the underlying data level. Determining the defect space category yields standardized defect classification results based on the spatial distribution morphology of pixel connected domains, thus overcoming the inherent shortcomings of existing technologies that do not distinguish the extended morphology of defect space or uniformly process various morphological defects. Standardized spatial classification enables differentiated feature constraints on defects with varying extents, accurately distinguishing between point-like, linear, and planar defects and imaging artifact regions, thus preventing artifact pixels from being classified as defect areas and causing identification bias. Hierarchical defect spatial categories establish a unified and objective defect judgment benchmark, achieving standardized differentiation of defect states across the entire pixel domain of the weld seam image, mitigating the problem of missed detections caused by globally uniform discrimination rules.

[0053] In summary, the technical solution adopted in this application can perform layered quantitative identification of pixel-level defect features in the brazing seam image, thereby improving the accuracy of defect identification results.

[0054] Example 2: This application provides a brazing defect detection method and system based on image recognition, referencing... Figure 4 As shown in the figure, this is a module structure diagram of a brazing defect detection method and system based on image recognition according to this embodiment of the present application. The system includes: The acquisition module 100 is used to acquire images of the welded surface of the brazed joint to be inspected; The extraction module 200 is used to arrange multiple mutually parallel and perpendicular defect scanning lines on the welded surface image along the extension direction of the brazing seam, extract the cross-sectional defect features of the pixel positions traversed by each defect scanning line one by one, and determine the defect trend direction of each pixel position on the defect scanning line based on the cross-sectional defect features. Processing module 300 is used to perform difference fitting on the defect trend direction to obtain the difference response value on each defect scan line, identify the artifact distribution attribute of the defect at any pixel position in the brazing seam extension direction based on the difference response value, and then determine the defect spatial category at the corresponding pixel position based on the artifact distribution attribute. The execution module 400 is used to determine the defect attribution status of the corresponding pixel position based on the defect space category, and generate the defect recognition result of the weld surface image.

[0055] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0056] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-Erasable Programmable Read-Only Memory (EEPROM), compactdisc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data.

[0057] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

Claims

1. A brazing defect detection method based on image recognition, characterized in that, The method includes the following steps: Acquire images of the welded surface of the brazed joint to be inspected; Multiple parallel and perpendicular defect scanning lines are arranged on the welded surface image along the extension direction of the brazing seam. The cross-sectional defect features of each pixel position traversed by each defect scanning line are extracted one by one. The defect trend direction of each pixel position on the defect scanning line is determined based on the cross-sectional defect features. The defect trend is fitted with a difference to obtain the difference response value on each defect scan line. Based on the difference response value, the artifact distribution attribute of the defect at any pixel position in the brazing seam extension direction is identified. Then, the spatial category of the defect at the corresponding pixel position is determined by the artifact distribution attribute. Based on the defect spatial category, the defect attribution status of the corresponding pixel position is determined, and the defect recognition result of the weld surface image is generated.

2. The brazing defect detection method based on image recognition as described in claim 1, characterized in that, The arrangement of multiple parallel and perpendicular defect scanning lines on the welded surface image along the brazing seam extension direction specifically includes: Gradient analysis is performed on the welded surface image to extract the gradient direction field of the brazed seam region, and the principal axis vector of the brazed seam extension direction is determined based on the consistency voting of the direction field. Based on the principal axis vector, a grayscale profile sequence perpendicular to the principal axis is constructed pixel by pixel along the extension direction of the brazing seam; Effective scan lines within the weld seam width range are extracted from the grayscale profile sequence, and defect scan lines are generated.

3. The brazing defect detection method based on image recognition as described in claim 1, characterized in that, Extracting the profile defect features of each pixel along the path of the defect scan line includes: The grayscale profile of each defect scan line is adaptively segmented to separate the grayscale distribution range, including the solder continuous area, the diffusion transition area, and the base material reference area. Determine the local profile defect feature value of each pixel position relative to its corresponding grayscale distribution range; Phase verification is performed on the local profile defect feature values, and non-defect response components with the same frequency as the brazing seam boundary texture are removed to obtain the profile defect features of the pixel positions traversed by each defect scan line.

4. The brazing defect detection method based on image recognition as described in claim 1, characterized in that, Determining the defect trend at each pixel position on the defect scan line based on the aforementioned cross-sectional defect features specifically includes: The profile defect features are decomposed, the defect detail subband energy at each scale is extracted, and the defect feature energy spectrum vector corresponding to each pixel position is constructed. Determine the spatial gradient field of the defect feature energy spectrum vector along the scan line direction, and determine the trend of candidate defects at each pixel position; The defect trend direction of each pixel position on the defect scan line is determined based on the candidate defect trend direction and the discrete trend component whose deviation from the main direction of the neighborhood exceeds a preset angle.

5. The brazing defect detection method based on image recognition as described in claim 1, characterized in that, The difference fitting of the defect trend to obtain the difference response values ​​on each defect scan line specifically includes: The defect trend direction at each pixel position on each defect scan line is nonlinearly mapped to construct a feature signal sequence that responds with the intensity of the trend direction. Determine the trend estimate at each pixel location based on the characteristic signal sequence; The trend estimate is projected along the defect scan line to obtain the difference response value on the defect scan line.

6. The brazing defect detection method based on image recognition as described in claim 1, characterized in that, Identifying the artifact distribution attributes of defects at any pixel location along the brazing seam extension direction based on the difference response value specifically includes: Based on the arrangement of the difference response values ​​along the brazing seam extension direction, a time-frequency matrix is ​​constructed with the brazing seam position as the independent variable and the difference response values ​​as the amplitude values. The time-frequency matrix is ​​decomposed to obtain the pseudo-effect components at each pixel location; The artifact distribution properties of the defect at the corresponding pixel location are determined based on the energy proportion of the artifact response component in the difference response value.

7. The brazing defect detection method based on image recognition as described in claim 1, characterized in that, Determining the spatial category of defects at corresponding pixel locations based on the artifact distribution attributes specifically includes: The weld surface image is pixel-level annotated according to the artifact distribution attributes to construct an artifact spatial distribution map containing artifact-free areas, weak artifact areas, and strong artifact areas. The spatial distribution map of artifacts is logically fused with the profile defect features pixel by pixel, and the profile defect features in the weak artifact region and the strong artifact region are weighted and suppressed to obtain artifact removal and enhanced defect features. Connectivity analysis is performed on the artifact removal and enhancement defect features to determine the defect space category to which each pixel location belongs. The defect space category includes point defects, line defects, and area defects.

8. The brazing defect detection method based on image recognition as described in claim 1, characterized in that, Based on the defect spatial category, the defect attribution status of the corresponding pixel position is determined, and the defect identification result of the weld surface image is generated, specifically including: The topological adjacency graph of the defect space categories is determined based on the distribution and adjacency relationships of the defect space categories in the brazing extension direction; The defect attribution status of each pixel position is obtained by traversing and reasoning through the topological adjacency graph. The defect attribution status is mapped to the weld surface image to generate defect identification results that use color coding to identify different types of defect areas.

9. The brazing defect detection method based on image recognition as described in claim 8, characterized in that, The specific steps for traversing and reasoning through the topological adjacency graph to obtain the defect attribution status of each pixel location include: Extract spectral feature descriptors of defect space category adjacency relationships from the topological adjacency graph; The posterior probability corresponding to each pixel position is determined based on the spectral feature descriptor, and the defect attribution status is determined by the posterior probability.

10. A brazing defect detection method and system based on image recognition, used to perform the brazing defect detection method based on image recognition as described in any one of claims 1 to 9, characterized in that, The system includes: The acquisition module is used to acquire images of the welded surface of the brazed joint to be inspected; The extraction module is used to arrange multiple mutually parallel and perpendicular defect scanning lines on the welded surface image along the extension direction of the brazing seam, extract the cross-sectional defect features of the pixel positions traversed by each defect scanning line one by one, and determine the defect trend direction of each pixel position on the defect scanning line based on the cross-sectional defect features. The processing module is used to perform difference fitting on the defect trend direction to obtain the difference response value on each defect scan line, identify the artifact distribution attribute of the defect at any pixel position in the brazing seam extension direction based on the difference response value, and then determine the defect spatial category at the corresponding pixel position based on the artifact distribution attribute. The execution module is used to determine the defect attribution status of the corresponding pixel position based on the defect space category, and generate the defect recognition result of the weld surface image.