An image enhancement method for GIS shell weld detection
By acquiring the grayscale difference feature values and gradient direction of the welded area image of the GIS shell, the weld edge is filtered and matched, solving the problem of blurred weld edge in complex backgrounds and achieving high-precision weld detection.
Patent Information
- Application Number
- CN202511316600.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-16
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2045-09-16
AI Technical Summary
In the inspection of weld seams in GIS shells, the edges of weld seams under complex backgrounds are easily blurred due to noise, changes in lighting, and texture interference. Furthermore, cracks in the weld seams can easily be mistaken for weld seam edges, leading to inspection errors.
By acquiring the grayscale difference feature values and gradient direction of the welded area image on the GIS shell surface, suspected weld edges are screened out. The actual weld edges are determined by using weld contrast and matching feature values. Combined with matching reliability analysis, the weld edges are obtained and the images are enhanced.
It improves the accuracy of GIS shell weld inspection, ensures the accuracy of weld edge identification, and reduces false detections and missed detections.
Smart Images

Figure CN120823142B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing. More particularly, the present application relates to an image enhancement method for GIS shell weld detection. BACKGROUND
[0002] In GIS shell weld detection, image enhancement methods play an important role, especially in improving image quality and highlighting key details. The shell structure usually has complex geometry and surface features, and the weld, as an important part of the structure, may affect the image quality due to environmental factors or deformation during use; and in a complex background, the weld edge may be blurred due to noise, changes in lighting, texture interference, etc., and cracks are often found in the joint area of the weld, which are cracks along the joint direction; which leads to cracks being mistaken for weld edges, resulting in errors in GIS shell weld detection. SUMMARY
[0003] In order to accurately identify the weld area and enhance it, the present application proposes an image enhancement method for GIS shell weld detection, which includes the following steps:
[0004] Obtain an image of the welded surface of the GIS shell;
[0005] Obtain the gray difference feature value of each edge in the image of the welded surface of the GIS shell; according to the gray difference feature value and the distribution of the gradient direction of the edge pixel points, obtain the weld contrast of each edge; according to the weld contrast, screen all edges to obtain suspected weld edges; according to the weld contrast, obtain the matching feature value between any two suspected weld edges; according to the matching feature value, obtain the to-be-matched suspected weld edge of each suspected weld edge;
[0006] According to the area formed between the suspected weld edge and the to-be-matched suspected weld edge, obtain the matching reliability between the suspected weld edge and the to-be-matched suspected weld edge; according to the matching reliability, obtain the authenticity of each suspected weld edge; according to the authenticity of the suspected weld edge, obtain the weld edge;
[0007] According to the weld contrast of the weld edge, perform image enhancement to obtain an enhanced image of the welded surface of the GIS shell.
[0008] Preferably, the gray difference feature value of each edge in the image of the welded surface of the GIS shell is obtained, including:
[0009] A neighborhood parameter U is preset, for any edge pixel point on any edge in the image of the GIS shell surface welding position, taking the edge pixel point as the window center, a window with a window size of UxU is obtained, and the window is recorded as a neighborhood pixel set of the edge pixel point;
[0010] wherein, represents the gray scale distribution characteristic value of the rth edge; represents the number of all edge pixel points on the rth edge; represents the number of all pixel points in the neighborhood pixel set of the ith edge pixel point on the rth edge; represents the gray scale value of the ith edge pixel point on the rth edge; represents the gray scale value of the jth edge pixel point in the neighborhood pixel set of the ith edge pixel point on the rth edge; represents a linear normalization function.
[0011] Preferably, the weld seam contrast of each edge is obtained according to the gray scale difference characteristic value and the distribution of the gradient direction of the edge pixel point, and the method comprises the following steps:
[0012] The sine value of the included angle between the gradient direction of the ith edge pixel point on the rth edge and the horizontal direction is recorded as the edge direction factor of the ith edge pixel point, and the calculation expression of the weld seam contrast of the rth edge is as follows:
[0013] ;
[0014] wherein, represents the weld seam contrast of the rth edge; represents the gray scale distribution characteristic value of the rth edge; represents the number of all edge pixel points on the rth edge; represents the edge direction factor of the ith edge pixel point on the rth edge; represents the edge direction factor of the (i+1)th edge pixel point on the rth edge; represents taking an absolute value; represents an exponential function with a natural constant as the base number.
[0015] Preferably, the all edges are screened according to the weld seam contrast to obtain the suspected weld seam edge, and the method comprises the following steps:
[0016] A significant threshold T1 is preset, if the weld seam contrast of the rth edge is greater than or equal to the significant threshold T1, the rth edge is recorded as a suspected weld seam edge.
[0017] Preferably, the specific formula for obtaining the matching feature value between any two suspected weld seam edges according to the weld seam contrast is as follows:
[0018] ;
[0019] In the formula, represents the matching feature value between the c1th suspected weld seam edge and the c2th suspected weld seam edge; represents the average value of the weld seam contrast between the c1th suspected weld seam edge and the c2th suspected weld seam edge; represents the number of all edge pixel points on the c1th suspected weld seam edge; represents the number of all edge pixel points on the c2th suspected weld seam edge; represents the Euclidean distance between the jth edge pixel point on the c1th suspected weld seam edge and the c2th suspected weld seam edge; represents an exponential function with a natural constant as the base number.
[0020] Preferably, the method further comprises the following steps of:
[0021] a matching parameter Z is preset, the matching feature values between the c1th suspected weld seam edge and all other suspected weld seam edges are obtained, and the first Z suspected weld seam edges with the largest matching feature values are regarded as the suspected weld seam edges to be matched with the c1th suspected weld seam edge.
[0022] Preferably, the method further comprises the following steps of:
[0023] A region formed by the vth suspected weld edge and the kth to-be-matched suspected weld edge is recorded as the kth to-be-matched suspected weld region; a sequence of all pixel points on a circumscribed rectangle of the kth to-be-matched suspected weld region is obtained and recorded as a background pixel point sequence of the kth to-be-matched suspected weld region; for an ath edge pixel point on the kth to-be-matched suspected weld region, distances between the ath edge pixel point and all pixel points in the background pixel point sequence of the kth to-be-matched suspected weld region are obtained, and a pixel point closest to the ath edge pixel point is recorded as a target pixel point of the ath edge pixel point; a straight line passing through a centroid position of the kth to-be-matched suspected weld region and parallel to the vth suspected weld edge is recorded as a target straight line; for all edge pixel points on the kth to-be-matched suspected weld region, a pixel point symmetrical to the ath edge pixel point with respect to the target straight line is obtained and recorded as a contrast pixel point of the ath edge pixel point; and a matching reliability between the suspected weld edge and the to-be-matched suspected weld edge is obtained according to the background pixel point sequence of the kth to-be-matched suspected weld region and distances between the edge pixel points, the contrast pixel points and the target pixel point.
[0024] Preferably, a specific formula for obtaining the matching reliability between the suspected weld edge and the to-be-matched suspected weld edge is as follows:
[0025] ;
[0026] In the formula, Rv,k represents the matching reliability between the vth suspected weld edge and the kth to-be-matched suspected weld edge; In the formula, Rv,k represents the matching reliability between the vth suspected weld edge and the kth to-be-matched suspected weld edge; In the formula, Rv,k represents a matching characteristic value between the vth suspected weld edge and the kth to-be-matched suspected weld edge, In the formula, Nk represents a number of all pixel points in the background pixel point sequence of the kth to-be-matched suspected weld region; In the formula, Gm represents a gray value of an mth pixel point in the background pixel point sequence of the kth to-be-matched suspected weld region; In the formula, G represents a mean value of gray values of all pixel points in the background pixel point sequence of the kth to-be-matched suspected weld region; In the formula, Nk represents a number of all edge pixel points on the kth to-be-matched suspected weld region; In the formula, Dv,k represents an Euclidean distance between the ath edge pixel point on the kth to-be-matched suspected weld region and the target pixel point; In the formula, Dv,k represents an Euclidean distance between the contrast pixel point of the ath edge pixel point on the kth to-be-matched suspected weld region and the target pixel point; In the formula, represents taking an absolute value; In the formula, represents an exponential function with a natural constant as a base number.
[0027] Preferably, a specific formula for obtaining the authenticity of each suspected weld edge according to the matching reliability is as follows:
[0028] ;
[0029] wherein, represents the authenticity of the vth suspected weld seam edge; represents all the suspected weld seam edges to be matched with the vth suspected weld seam edge; represents the maximum value of the matching reliability between the vth suspected weld seam edge and all the suspected weld seam edges to be matched; represents the matching reliability between the vth suspected weld seam edge and the bth suspected weld seam edge to be matched; represents taking the absolute value; represents a linear normalization function.
[0030] Preferably, the acquiring of the weld seam edge according to the authenticity of the suspected weld seam edge comprises:
[0031] A weld seam threshold T2 is preset, and if the authenticity of the vth suspected weld seam edge is greater than or equal to the weld seam threshold T2, the vth suspected weld seam edge is recorded as the weld seam edge.
[0032] The present application has the following beneficial effects: all edges are screened according to the weld seam contrast to obtain suspected weld seam edges; matching characteristic values between any two suspected weld seam edges are obtained according to the weld seam contrast; suspected weld seam edges to be matched for each suspected weld seam edge are obtained according to the matching characteristic values; matching reliabilities between suspected weld seam edges and suspected weld seam edges to be matched are obtained according to the regions formed between the suspected weld seam edges and the suspected weld seam edges to be matched; the authenticity of each suspected weld seam edge is obtained according to the matching reliabilities; the weld seam edge is obtained according to the authenticity of the suspected weld seam edge; the image of the GIS shell surface welding position is enhanced according to the weld seam contrast of the weld seam edge, so as to improve the accuracy of the GIS shell weld seam detection result. BRIEF DESCRIPTION OF DRAWINGS
[0033] Figure 1 is a step flow chart of an image enhancement method for GIS shell weld seam detection according to an embodiment of the present application. DETAILED DESCRIPTION
[0034] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments of the present application.
[0035] Please refer to Figure 1 which shows a step flow chart of an image enhancement method for GIS shell weld seam detection according to an embodiment of the present application. The method comprises the following steps:
[0036] S001. Obtain the image of the welding position on the surface of the GIS shell.
[0037] In the embodiment of the present application, the specific method for obtaining the image of the welding position on the surface of the GIS shell is as follows:
[0038] A high-resolution digital camera (such as an industrial camera, a digital single-lens reflex camera, etc.) is used to take an image of the welding position on the surface of the GIS shell, and a median filtering denoising and grayscale operation is performed to obtain the image of the welding position on the surface of the GIS shell.
[0039] The median filtering and grayscale operation are prior art, and will not be described in detail herein.
[0040] S002. Obtain the gray difference characteristic value of each edge in the image of the welding position on the surface of the GIS shell; obtain the weld seam contrast of each edge according to the gray difference characteristic value and the distribution of the gradient direction of the edge pixel points; screen all edges according to the weld seam contrast to obtain suspected weld seam edges; obtain the matching characteristic value between any two suspected weld seam edges according to the weld seam contrast; and obtain the to-be-matched suspected weld seam edge of each suspected weld seam edge according to the matching characteristic value.
[0041] It should be noted that the weld seam is usually the boundary between two metal surfaces, has a relatively clear edge feature, and has a significant contrast with the surrounding area, that is, the gray difference between each edge pixel point and the pixel points in its neighborhood is obvious, and the gradient directions between the edge pixel points are more consistent; when the gray difference between the edge pixel points and the pixel points in their neighborhood is obvious, it indicates that the edge has a clearer edge structure.
[0042] In the embodiment of the present application, the specific method for obtaining the gray difference characteristic value of each edge in the image of the welding position on the surface of the GIS shell is as follows:
[0043] A neighborhood parameter U is preset, and the embodiment is described taking U=10 as an example, which is not limited in the embodiment, and U is determined according to the specific implementation;
[0044] A CANNY edge detection algorithm is used to obtain a plurality of edges in the image of the welding position on the surface of the GIS shell; the CANNY edge detection algorithm is prior art, and will not be described in detail herein.
[0045] For any edge pixel point on any edge in the image of the welding position on the surface of the GIS shell, the edge pixel point is taken as the center of the window, a window with a size of UxU is obtained, and the window is recorded as the neighborhood pixel set of the edge pixel point.
[0046] The calculation formula for obtaining the gray distribution characteristic value of the rth edge is as follows:
[0047]
[0048] In the formula, denotes the gray scale distribution characteristic value of the rth edge; denotes the number of all edge pixel points on the rth edge; denotes the number of all pixel points in the neighborhood pixel set of the ith edge pixel point on the rth edge; denotes the gray scale value of the ith edge pixel point on the rth edge; denotes the gray scale value of the jth edge pixel point in the neighborhood pixel set of the ith edge pixel point on the rth edge; denotes a linear normalization function.
[0049] It should be noted that when the gradient directions between all pixel points on the edge tend to be consistent and stable, that is, the edge has a significant change, and the change is continuous and uniform, then the edge has a more obvious weld structure.
[0050] In the embodiment of the present application, according to the gray scale difference characteristic value and the distribution of the gradient direction of the edge pixel point, the specific method for obtaining the weld contrast of each edge is as follows:
[0051] The sine value of the included angle between the gradient direction of the ith edge pixel point on the rth edge and the horizontal direction is denoted as the edge direction factor of the ith edge pixel point, and the calculation expression for obtaining the weld contrast of the rth edge is as follows:
[0052]
[0053] In the formula, denotes the weld contrast of the rth edge; denotes the gray scale distribution characteristic value of the rth edge; denotes the number of all edge pixel points on the rth edge; denotes the edge direction factor of the ith edge pixel point on the rth edge; denotes the edge direction factor of the ith+1 edge pixel point on the rth edge; denotes taking an absolute value; denotes an exponential function with a natural constant as the base number.
[0054] In the embodiment of the present application, the specific method for obtaining the suspected weld edge by screening all edges according to the weld contrast is as follows:
[0055] A significant threshold T1 is preset, and in this embodiment, T1=0.75 is taken as an example for description, and the embodiment is not specifically limited, wherein T1 is determined according to the specific implementation;
[0056] If the weld contrast of the rth edge is greater than or equal to the significant threshold T1, the rth edge is marked as a suspected weld edge.
[0057] It should be noted that since the weld usually appears as a region with obvious edge contrast, that is, it is clearly delimited by two edges, each suspected weld edge corresponds to a matching weld edge, and the closer the number and distance of edge pixels between two suspected weld edges are, and the greater the weld contrast is, the more likely they are to match each other to form a suspected weld region.
[0058] In the embodiment of the present application, the specific formula for obtaining the matching feature value between any two suspected weld edges according to the weld contrast is:
[0059]
[0060] In the formula, The matching feature value between the c1th suspected weld edge and the c2th suspected weld edge is represented by c1c2; The average value of the weld contrast of the c1th suspected weld edge and the c2th suspected weld edge is represented by c1c2mean; The number of all edge pixels on the c1th suspected weld edge is represented by c1num; The number of all edge pixels on the c2th suspected weld edge is represented by c2num; The Euclidean distance between the jth edge pixel on the c1th suspected weld edge and the c2th suspected weld edge is represented by c1c2j; The exponential function with a natural constant as the base number is represented by exp.
[0061] In the embodiment of the present application, the specific method for obtaining the suspected weld edge to be matched for each suspected weld edge according to the matching feature value is:
[0062] A matching parameter Z is preset, and the embodiment is described by taking Z=10 as an example, which is not limited in the embodiment, and Z is determined according to the specific implementation;
[0063] The matching feature values between the c1th suspected weld edge and all other suspected weld edges are obtained, and the first Z suspected weld edges with the largest matching feature values are regarded as the suspected weld edges to be matched for the c1th suspected weld edge.
[0064] Thus, the suspected weld edges to be matched for each suspected weld edge are obtained.
[0065] S003. Obtain the matching reliability between the suspected weld seam edge and the suspected weld seam edge to be matched according to the area formed between the suspected weld seam edge and the suspected weld seam edge to be matched; obtain the authenticity of each suspected weld seam edge according to the matching reliability; and obtain the weld seam edge according to the authenticity of the suspected weld seam edge.
[0066] It should be noted that the crack of the weld seam area is usually easy to occur in the middle of the weld seam area, that is, the joint area of the weld seam, and is usually a crack along the joint direction; the crack can be matched with the edge of the weld seam area, resulting in an error in the detection of the suspected weld seam edge, that is, the suspected weld seam edge to be matched obtained at this time is inaccurate; therefore, the area formed by the suspected weld seam edge and each suspected weld seam edge to be matched needs to be further analyzed to obtain the real weld seam edge.
[0067] In the embodiment of the present application, when the edge pixel of the suspected weld seam area has a small difference in gray value with the peripheral area, it indicates that the edge of the weld seam is relatively smooth and the transition with the surrounding area is more natural, that is, the distance difference between the symmetric pixel point and the surrounding background pixel point at the edge position is closer, which conforms to the typical characteristics of the weld seam area; otherwise, the edge of the weld seam is matched with the crack edge, and it is usually found that the edge of the crack area has a large difference in gray value with the peripheral area, because the edge of the crack is more obvious and the transition with the metal surface is more abrupt; therefore, the specific method for obtaining the matching reliability between the suspected weld seam edge and the suspected weld seam edge to be matched according to the area formed between the suspected weld seam edge and the suspected weld seam edge to be matched is as follows:
[0068] The area formed by the vth suspected weld seam edge and the kth suspected weld seam edge to be matched is denoted as the kth suspected weld seam area to be matched;
[0069] A sequence of all pixel points on the circumscribed rectangle of the kth suspected weld seam area to be matched is obtained, which is denoted as the background pixel point sequence of the kth suspected weld seam area to be matched;
[0070] For the ath edge pixel point on the kth suspected weld seam area to be matched, the distance between the ath edge pixel point and all pixel points in the background pixel point sequence of the kth suspected weld seam area to be matched is obtained, and the pixel point closest to the distance is denoted as the target pixel point of the ath edge pixel point;
[0071] A straight line passing through the centroid position of the kth suspected weld seam area to be matched and parallel to the vth suspected weld seam edge is denoted as a target straight line; for all edge pixel points of the kth suspected weld seam area to be matched, a pixel point symmetrical to the ath edge pixel point with respect to the target straight line is obtained, which is denoted as the contrast pixel point of the ath edge pixel point;
[0072] The specific formula of the matching reliability between the suspected weld edge and the suspected weld edge to be matched is as follows:
[0073]
[0074] In the formula, indicates the matching reliability between the vth suspected weld edge and the kth suspected weld edge to be matched; indicates the matching characteristic value between the vth suspected weld edge and the kth suspected weld edge to be matched, indicates the number of all pixel points in the background pixel point sequence of the kth suspected weld region to be matched; indicates the gray value of the mth pixel point in the background pixel point sequence of the kth suspected weld region to be matched; indicates the mean value of the gray values of all pixel points in the background pixel point sequence of the kth suspected weld region to be matched; indicates the number of all edge pixel points on the kth suspected weld region to be matched; indicates the Euclidean distance between the ath edge pixel point on the kth suspected weld region to be matched and the target pixel point; indicates the Euclidean distance between the contrast pixel point of the ath edge pixel point on the kth suspected weld region to be matched and the target pixel point; indicates taking an absolute value; indicates an exponential function with a natural constant as the base number.
[0075] It should be noted that if the suspected weld edge is a weld edge, there is only one suspected weld edge that truly matches the suspected weld edge, and the maximum value of the matching reliability of the suspected weld edge is quite different from those of other suspected weld edges to be matched. Conversely, if the suspected weld edge is a crack edge, there is no suspected weld edge that matches the suspected weld edge, and the matching reliabilities of the suspected weld edge are all small and close to each other.
[0076] In the embodiment of the present application, the specific formula of the authenticity of each suspected weld edge according to the matching reliability is as follows:
[0077]
[0078] In the formula, indicates the authenticity of the vth suspected weld edge; indicates all suspected weld edges to be matched of the vth suspected weld edge; indicates the maximum value of the matching reliability between the vth suspected weld edge and all suspected weld edges to be matched; represents the matching reliability between the vth suspected weld seam edge and the bth suspected weld seam edge to be matched; represents taking an absolute value; represents a linear normalization function;
[0079] In the embodiment of the present application, the specific method for obtaining the weld seam edge according to the authenticity of the suspected weld seam edge is as follows:
[0080] A weld seam threshold T2 is preset, and the embodiment is described by taking T2 = 0.7 as an example, which is not limited in the embodiment, and T2 is determined according to the specific implementation;
[0081] If the authenticity of the vth suspected weld seam edge is greater than or equal to the weld seam threshold T2, the vth suspected weld seam edge is recorded as a weld seam edge.
[0082] Thus, the weld seam edges in the GIS shell surface welding image are obtained.
[0083] S004. Image enhancement is performed according to the weld seam contrast of the weld seam edge to obtain an enhanced GIS shell surface welding image.
[0084] In the embodiment of the present application, the specific method for obtaining an enhanced GIS shell surface welding image according to the weld seam contrast of the weld seam edge is as follows:
[0085] For any weld seam edge, the matching reliability between the weld seam edge and all other weld seam edges is obtained, the weld seam edge with the maximum matching reliability is taken as the matching weld seam edge of the weld seam edge, and the region formed by each weld seam edge and its matching weld seam edge is taken as a weld seam region;
[0086] The average value of the weld seam contrast of the two weld seam edges in each weld seam region is taken as the enhancement coefficient of each weld seam region, and the specific method for performing the enhancement processing on the GIS shell surface welding image based on the enhancement coefficient of the weld seam region and using the adaptive Laplacian sharpening algorithm is as follows:
[0087] The sharpening intensity of each pixel point not in the weld seam region is 0, and the sharpening intensity of each pixel point in each weld seam region is the enhancement coefficient of each weld seam region, so that the sharpening intensity of each pixel point in the GIS shell surface welding image is obtained.
[0088] The gray value of each pixel point in the GIS shell surface welding image after the adaptive Laplacian sharpening is taken as a sharpening enhanced image, which is recorded as the sharpening enhanced image of the GIS shell surface welding image.
[0089] The above merely provides the preferred embodiment of the present application, and is not used to limit the present application, and any modification, equivalent replacement, improvement, etc. made within the principle of the present application should be included in the protection scope of the present application.
Claims
1. An image enhancement method for GIS enclosure weld detection, characterized by, The method comprises the following steps: obtaining an image of a welded surface of a GIS shell; obtaining a gray difference characteristic value of each edge in the image of the welded surface of the GIS shell; obtaining a weld seam contrast of each edge according to the gray difference characteristic value and a distribution of a gradient direction of an edge pixel point; screening all edges according to the weld seam contrast to obtain a suspected weld seam edge; obtaining a matching characteristic value between any two suspected weld seam edges according to the weld seam contrast; obtaining a to-be-matched suspected weld seam edge of each suspected weld seam edge according to the matching characteristic value; obtaining a matching reliability between the suspected weld seam edge and the to-be-matched suspected weld seam edge according to a region formed between the suspected weld seam edge and the to-be-matched suspected weld seam edge; obtaining a authenticity of each suspected weld seam edge according to the matching reliability; and obtaining a weld seam edge according to the authenticity of the suspected weld seam edge; performing image enhancement on the weld seam contrast of the weld seam edge to obtain an enhanced image of the welded surface of the GIS shell.
2. The image enhancement method for GIS enclosure weld seam detection according to claim 1, characterized in that, The method for obtaining the gray difference characteristic value of each edge in the image of the welded surface of the GIS shell comprises the following steps: presetting a neighborhood parameter U, and taking any edge pixel point on any edge in the image of the welded surface of the GIS shell as a window center to obtain a window with a window size of UxU, and taking the window as a neighborhood pixel set of the edge pixel point; wherein, denotes the gray level distribution feature value of the rth edge; denotes the number of all edge pixel points on the rth edge; denotes the number of all pixel points in the neighborhood pixel set of the ith edge pixel point on the rth edge; denotes the gray level value of the ith edge pixel point on the rth edge; denotes the gray level value of the jth edge pixel point in the neighborhood pixel set of the ith edge pixel point on the rth edge; denotes a linear normalization function.
3. The image enhancement method for GIS enclosure weld seam detection according to claim 2, characterized in that, the method for obtaining the weld seam contrast of each edge according to the gray difference characteristic value and the distribution of the gradient direction of the edge pixel point comprises the following steps: taking a sine value of an included angle between a gradient direction of an ith edge pixel point on an rth edge and a horizontal direction as an edge direction factor of the ith edge pixel point; and obtaining a calculation expression of the weld seam contrast of the rth edge as follows: ; In the formula, represents the weld contrast of the rth edge; represents the gray distribution characteristic value of the rth edge; represents the number of all edge pixel points on the rth edge; represents the edge direction factor of the ith edge pixel point on the rth edge; represents the edge direction factor of the i+1th edge pixel point on the rth edge; represents taking an absolute value; represents an exponential function with a natural constant as the base.
4. The image enhancement method for GIS enclosure weld seam detection according to claim 3, characterized in that, the method for screening all edges according to the weld seam contrast to obtain a suspected weld seam edge comprises the following steps: presetting a saliency threshold T1, and taking the rth edge as a suspected weld seam edge if the weld seam contrast of the rth edge is greater than or equal to the saliency threshold T1.
5. The image enhancement method for GIS enclosure weld seam detection according to claim 3, characterized in that, a specific formula for obtaining the matching characteristic value between any two suspected weld seam edges according to the weld seam contrast is as follows: ; In the formula, represents the matching feature value between the c1st suspected weld seam edge and the c2nd suspected weld seam edge; represents the mean value of the weld seam contrast of the c1st suspected weld seam edge and the c2nd suspected weld seam edge; represents the number of all edge pixel points on the c1st suspected weld seam edge; represents the number of all edge pixel points on the c2nd suspected weld seam edge; represents the Euclidean distance between the jth edge pixel point on the c1st suspected weld seam edge and the c2nd suspected weld seam edge; represents an exponential function with a natural constant as the base number.
6. The image enhancement method for GIS enclosure weld seam detection according to claim 5, characterized in that, the method for obtaining the to-be-matched suspected weld seam edge of each suspected weld seam edge according to the matching characteristic value comprises the following steps: presetting a matching parameter Z, obtaining the matching characteristic value between the c1th suspected weld seam edge and all other suspected weld seam edges, and taking the first Z suspected weld seam edges with the largest matching characteristic values as the to-be-matched suspected weld seam edges of the c1th suspected weld seam edge.
7. The image enhancement method for GIS enclosure weld seam detection according to claim 6, characterized in that, the method for obtaining the matching reliability between the suspected weld seam edge and the to-be-matched suspected weld seam edge according to the region formed between the suspected weld seam edge and the to-be-matched suspected weld seam edge comprises the following steps: A region formed by the vth suspected weld seam edge and the kth to-be-matched suspected weld seam edge is recorded as the kth to-be-matched suspected weld seam region; a sequence of all pixel points on a circumscribed rectangle of the kth to-be-matched suspected weld seam region is obtained and recorded as a background pixel point sequence of the kth to-be-matched suspected weld seam region; for an ath edge pixel point on the kth to-be-matched suspected weld seam region, distances between the ath edge pixel point and all pixel points in the background pixel point sequence of the kth to-be-matched suspected weld seam region are obtained, and a pixel point with the shortest distance is recorded as a target pixel point of the ath edge pixel point; a straight line passing through a centroid position of the kth to-be-matched suspected weld seam region and parallel to the vth suspected weld seam edge is recorded as a target straight line; for all edge pixel points on the kth to-be-matched suspected weld seam region, a pixel point symmetrical to the ath edge pixel point with respect to the target straight line is obtained and recorded as a contrast pixel point of the ath edge pixel point; and a matching reliability between the suspected weld seam edge and the to-be-matched suspected weld seam edge is obtained according to the background pixel point sequence of the kth to-be-matched suspected weld seam region and distances between the edge pixel points, the contrast pixel points and the target pixel point.
8. The image enhancement method for GIS enclosure weld seam detection according to claim 7, characterized in that, A specific formula for obtaining the matching reliability between the suspected weld seam edge and the to-be-matched suspected weld seam edge is as follows: ; In the formula, represents the matching reliability between the vth suspected weld seam edge and the kth suspected weld seam edge to be matched; represents the matching feature value between the vth suspected weld seam edge and the kth suspected weld seam edge to be matched, represents the number of all pixel points in the background pixel point sequence of the kth suspected weld seam region to be matched; represents the gray value of the mth pixel point in the background pixel point sequence of the kth suspected weld seam region to be matched; represents the mean value of the gray values of all pixel points in the background pixel point sequence of the kth suspected weld seam region to be matched; represents the number of all edge pixel points on the kth suspected weld seam region to be matched; represents the Euclidean distance between the ath edge pixel point on the kth suspected weld seam region to be matched and the target pixel point; represents the Euclidean distance between the contrast pixel point of the ath edge pixel point on the kth suspected weld seam region to be matched and the target pixel point; represents taking the absolute value; represents the exponential function with a natural constant as the base.
9. The image enhancement method for GIS enclosure weld seam detection according to claim 8, characterized in that, A specific formula for obtaining the authenticity of each suspected weld seam edge according to the matching reliability is as follows: ; wherein represents the authenticity of the v-th suspected weld seam edge; represents all suspected weld seam edges to be matched to the v-th suspected weld seam edge; represents the maximum value of the matching reliability between the v-th suspected weld seam edge and all suspected weld seam edges to be matched; represents the matching reliability between the v-th suspected weld seam edge and the b-th suspected weld seam edge to be matched; represents taking the absolute value; represents a linear normalization function.
10. The image enhancement method for GIS enclosure weld seam detection according to claim 9, characterized in that, The obtaining of the weld seam edge according to the authenticity of the suspected weld seam edge comprises the following steps: A weld seam threshold T2 is preset, and if the authenticity of the vth suspected weld seam edge is greater than or equal to the weld seam threshold T2, the vth suspected weld seam edge is recorded as a weld seam edge.
Citation Information
Patent Citations
Welding image molten pool edge detection method
CN115330774A
Weld defect detection method based on threshold segmentation
CN116993744A