Intelligent detection method for air holes in surface of weld bead of high-pressure shell
Through light tracing and iterative optimization, the lighting correction model is constructed, which solves the inaccurate detection problems caused by self-occlusion and mutual reflection of high-pressure shell beads, and high-precision pore detection is achieved to meet safety detection requirements.
Patent Information
- Application Number
- CN202511052993.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-30
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2045-07-30
AI Technical Summary
When detecting concave weld beads of high-pressure shells, the existing photometric three-dimensional method cannot meet the strict requirements for high-pressure shell safety detection due to self-blocking and mutual reflection.
By obtaining images under multiple light sources in different directions, ray tracing and iterative optimization are carried out, lighting correction models are constructed, self-occlusion and mutual reflection artifacts are eliminated, and the real normal vector and albedo of the bead surface are gradually approached, and a correction albedo map is generated.
It improves the accuracy and reliability of pore detection on the surface of the weld bead, reduces the leakage detection and false alarm rates, and meets the requirements of high-pressure shell safety detection.
Smart Images

Figure CN120563503A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method for intelligently detecting pores on the surface of a high-pressure shell weld. Background Art
[0002] High-voltage housings, such as high-voltage switchgear and energy storage vessels, are critical components that bear high pressures. The quality of their welds is directly related to the safe operation of the entire equipment. Porosity is a common defect in welds, which can reduce the density and strength of the weld and pose a safety hazard.
[0003] Currently, existing technologies propose the use of photometric stereo for 3D surface reconstruction. This method analyzes the brightness variations at the same point on an object's surface under multiple lighting directions to separate the surface's geometric information (normal vector) and texture information (albedo). This eliminates shadows and reflections caused by curved shapes and lighting variations, allowing defect detection to be performed on the resulting albedo map. For example, patent application CN116518869A discloses the concept of using multi-angle lighting for metal surface inspection.
[0004] However, existing technologies have obvious technical defects when applied to high-pressure shell welds with complex geometries, especially structures such as concave corners and T-connections. The reason is that in these concave areas, the core assumption of the photometric stereo method: "each point on the surface only receives direct illumination from a single known light source" will be seriously violated. This is mainly due to two situations: self-occlusion (cast shadow), that is, one part of the structure will block the light directed to another part; and inter-reflection (inter-reflection), that is, light will reflect back and forth between the inner walls of the concave structure, causing certain points to receive secondary illumination from the surrounding surfaces with unknown direction and intensity. Therefore, these two phenomena will cause the three-dimensional morphology and albedo information calculated by the traditional photometric stereo method in these areas to be seriously distorted, resulting in a large number of missed detections and false alarms in critical corner weld areas, and unable to meet the strict requirements of high-pressure shell safety inspection. Summary of the Invention
[0005] In order to solve the technical problem of inaccurate defect detection due to self-occlusion and mutual reflection when detecting concave welds of high-pressure shells using the existing photometric stereo method, the present application provides an intelligent method for detecting pores on the surface of high-pressure shell welds, which can improve the accuracy and reliability of pore defect detection on weld structures.
[0006] The present application provides an intelligent detection method for pores on the surface of a high-pressure shell weld. The prevention and control method includes: obtaining multiple images of the weld surface to be detected under illumination from multiple light sources in different directions, and processing the multiple images to obtain an initial normal vector and an initial albedo map of the weld surface; based on the initial normal vector and the initial albedo map, modeling the self-occlusion effect and interreflection effect caused by the concave structure of the weld surface, the modeling includes: quantifying an interreflection influence potential related to the local geometric concavity for each pixel point; constructing a lighting correction model based on the interreflection influence potential, and repeatedly updating the normal vector and albedo of the weld surface through iterative optimization until convergence, to obtain a corrected albedo map with artifacts eliminated; based on the corrected albedo map, intelligent detection of pores on the surface of the high-pressure shell weld is achieved.
[0007] Starting from an initial reconstruction result with errors, this application gradually approximates the true weld surface properties through iterative optimization. In each iteration, the current more optimal geometric information is used to more accurately evaluate the effects of self-occlusion and interreflection. Then, a more accurate illumination correction model is used to solve for a more optimal geometry and albedo result, forming a positive feedback optimization closed loop. Ultimately, a high-precision corrected albedo map is obtained, enabling accurate detection of pores on the high-pressure shell weld surface.
[0008] In one embodiment, the modeling of the self-occlusion effect includes: using a ray tracing method to determine whether any pixel point on the weld surface is occluded by its own structure under the illumination of each light source based on the three-dimensional morphology obtained in the previous iteration, thereby constructing a self-occlusion mask, and ignoring the contribution of the occluded light source to the pixel point in subsequent solutions.
[0009] Ray tracing accurately identifies which pixels are in shadow under which light sources, eliminating this invalid lighting information that can introduce significant errors in the subsequent solution. This prevents the brightness information of self-occluded areas from seriously interfering with normal and albedo calculations, providing a stable and reliable calculation foundation for subsequent iterative corrections.
[0010] In one embodiment, the interreflection potential is used to quantify the potential degree to which a pixel is affected by secondary reflected light from surrounding surfaces, and the value of the interreflection potential is related to the degree of geometric concavity of the area where the pixel is located and the distance to the adjacent surface.
[0011] By constructing a quantitative indicator that is strongly correlated with the local geometric morphology, this application can effectively evaluate the intensity of interreflection at a low computational cost, providing key parameters for establishing a lighting correction model, making it possible to compensate for the interreflection effect.
[0012] In one embodiment, the degree of geometric concavity is determined based on the directional difference between the normal vector of the central pixel and the normal vectors of other pixels in its neighborhood window.
[0013] In one embodiment, the mutual reflection influence potential satisfies the relationship: ;in, Pixel The mutual reflection influence potential; Pixels The neighborhood window centered on and The center pixel and its neighboring pixels The initial normal vector of The center pixel and its neighboring pixels The Euclidean distance between is a very small positive number used to prevent the denominator from being zero.
[0014] In one embodiment, the iterative optimization method is specifically as follows: in each iteration, based on the normal vector and albedo obtained in the previous iteration, the self-occlusion mask and the interreflection influence potential are updated, and the normal vector and albedo of the current iteration are obtained by using the illumination correction model.
[0015] In one embodiment, the illumination correction model approximates the interreflection effect as an additional ambient light term that is proportional to the interreflection influence potential, thereby decomposing the observed brightness into the sum of direct illumination contribution and indirect illumination contribution.
[0016] By establishing a more complete mathematical model that is closer to the real physical process, this application can more accurately invert the normal vector and albedo representing the geometric and material properties of the object itself from the observed brightness containing errors, fundamentally improving the accuracy of reconstruction.
[0017] In one embodiment, the illumination correction model satisfies the relationship: ;in, It's a pixel In the Observed brightness under each light source; and Respectively The albedo and normal vector obtained in the iteration; For the The direction vector of the light source; Pixel The mutual reflection influence potential; C is the mutual reflection coefficient.
[0018] In one embodiment, the intelligent detection of pores on the surface of the high-pressure shell weld is achieved based on the corrected albedo map, specifically by inputting the corrected albedo map into a pre-trained semantic segmentation network, and the semantic segmentation network outputs the pore defect segmentation result.
[0019] In one embodiment, the convergence condition of the iterative optimization is: the number of iterations reaches a preset threshold, or the change in the normal vector or albedo calculated in two consecutive iterations is less than a preset convergence accuracy.
[0020] By providing high-quality, artifact-free input images to the deep learning network, the learning difficulty of the network is greatly reduced, enabling the network to more robustly and accurately identify micron-level pore defects. The final output segmentation result is more accurate than detection on the original albedo map.
[0021] The technical solution of this application has the following beneficial technical effects: This application constructs a more realistic illumination correction model based on the precise identification of self-occlusions through ray tracing and the quantification of the interreflection influence potential based on local geometry. Then, through iterative optimization, the precise normal vector and albedo of the weld surface are gradually approximated and solved, ultimately obtaining a highly accurate corrected albedo map, enabling accurate detection of pores on the weld surface of high-pressure shells.
[0022] Furthermore, by generating a clean corrected albedo map that effectively suppresses self-occlusion shadows and interreflection artifacts, the false alarm rate and missed detection rate of defects caused by artifacts in the concave weld area are greatly reduced, which can meet the strict requirements of high-voltage shell safety inspection. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 This is a flow chart of a method for intelligently detecting pores on the surface of a high-pressure shell weld according to an embodiment of the present application.
[0024] Figure 2 3D surface schematic diagram of a concave fillet weld according to an embodiment of the present application.
[0025] Figure 3 Schematic diagram of an initial two-dimensional image of a weld surface collected according to an embodiment of the present application.
[0026] Figure 4 is a corrected albedo map according to an embodiment of the present application. DETAILED DESCRIPTION
[0027] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments.
[0028] Figure 1 This is a flow chart of a method for intelligently detecting pores on the surface of a high-pressure shell weld according to an embodiment of the present application. Figure 1 As shown, the intelligent detection method for pores on the surface of the high-pressure shell weld includes steps S101 to S104, which are described in detail below.
[0029] S101, acquiring multiple images of the weld surface to be inspected under illumination from multiple light sources in different directions, and processing the multiple images to obtain an initial normal vector and an initial albedo map of the weld surface.
[0030] In one embodiment, an industrial camera at a fixed position and N calibrated and independently switchable LED light sources arranged around the weld area to be inspected can be used to capture images of the weld surface to be inspected. N can be 8, and the calibration process aims to obtain the direction vector of each light source relative to the camera coordinate system. (k=1, 2, ..., N).
[0031] In this optional embodiment, during the detection, the system controls the light source controller to turn on and off each light source in turn, and the camera synchronously captures a two-dimensional grayscale image. In this way, N images under different single light sources are obtained. Then, the classical photometric stereo method is used for calculation, and the pixel value of any pixel on the weld surface is obtained by solving the overdetermined equations. The initial normal vector and the initial albedo map .
[0032] like Figure 2 The figure shows a 3D surface diagram of a concave angle weld bead, which contains a specific porosity defect and a concave angle weld bead surface. It is worth noting that the initial normal vector obtained at this time is and the initial albedo map There are large errors in complex areas such as concave corners.
[0033] In this optional embodiment, if Figure 3 As shown, the initial normal vector is collected at this time. and the initial albedo map Schematic diagram of the initial 2D image of the weld surface. It can be seen from the figure that some areas are not directly illuminated by the light source, and there are artifact areas composed of highlights and shadows at the edges.
[0034] In this way, by adopting the classical photometric stereo method, benchmark data with initial errors but containing basic geometric and albedo information is provided for the subsequent calculation process.
[0035] S102, based on the initial normal vector and the initial albedo map, modeling the self-occlusion effect and interreflection effect caused by the concave structure of the weld surface, including: quantifying an interreflection influence potential related to the local geometric concavity for each pixel.
[0036] In one embodiment, the normal vector Integrate to get the depth map , thus obtaining the initial three-dimensional morphology information of the weld surface, and using it to perform ray tracing judgment. Specifically, for each pixel and each light source , starting from the three-dimensional coordinates of the pixel point, along the direction of the light source A virtual ray is emitted in the opposite direction of the light source and it is determined whether the ray intersects with other parts of the weld surface. If so, the pixel point is determined to be on the light source. Furthermore, a three-dimensional self-occlusion mask can be constructed. ,in, A value of 1 indicates occlusion. A value of 0 means no occlusion.
[0037] In this optional embodiment, the intensity of the interreflection phenomenon is directly related to the degree of local geometric depression. In order to avoid complex physical optics simulation, this application constructs the interreflection effect potential. , which is used to quantify the potential degree of each pixel being affected by interreflection. Its construction logic is that interreflection mainly occurs in areas with significant geometric depressions. The higher the depression of the area and the closer the distance to the surrounding surface, the stronger the interreflection effect. Therefore, the potential degree of interreflection is Satisfies the relationship:
[0038] in, Pixel The mutual reflection influence potential; Pixels The neighborhood window centered on ; and are the initial normal vectors of the central pixel and the neighborhood pixel respectively; is the Euclidean distance between the central pixel and the neighboring pixels; is a very small positive number, such as , used to prevent the denominator from being zero.
[0039] In this optional embodiment, Characterizes the difference between the normal vectors of the center point and the neighboring points. When the direction difference between the center normal vector and the neighboring normal vector is greater, that is, the more curved the surface is, the smaller the dot product between the two vectors is, which will lead to The larger the value of The higher the value, the more severe the depression is, and the greater the impact of interreflected light is. is the inverse square attenuation term, indicating that closer surfaces contribute more to interreflection. The higher the value, the more the point is in a concave area with a sharp curvature change formed by nearby surfaces, and the greater the possibility and intensity of the inter-reflected light it receives.
[0040] For example, in a At the concave corner, the normal vector of the center point is approximately perpendicular to the normal vectors of the adjacent points on both sides, and the dot product is close to 0, so that (1-0)=1; while on the flat surface, the normal vectors are almost parallel, and the dot product is close to 1, so that (1-1)=0. Therefore, at the concave corner The value is much higher than the plane.
[0041] In this way, by accurately mathematically modeling the self-occlusion and interreflection effects that lead to initial reconstruction errors, a physical and data foundation is laid for the subsequent construction of a lighting correction model that can compensate for these errors.
[0042] S103, constructing an illumination correction model based on the mutual reflection influence potential, and repeatedly updating the normal vector and albedo of the weld surface through iterative optimization until convergence, thereby obtaining a corrected albedo map with artifacts eliminated.
[0043] In one embodiment, for each pixel , a modified illumination model equation set can be constructed based on the mutual reflection potential to solve the new and For each light source , the corresponding lighting correction model is:
[0044] in, is the pixel observation brightness, which is the coordinate of the k-th image actually captured by the camera. The brightness value of the pixel point is the result of the entire lighting correction model equation, which serves as the basis for subsequent reverse solution.
[0045] Represents the pixel point obtained in the tth iteration calculation The albedo value; Represents the normal vector obtained in the tth iteration calculation; is the unit direction vector of the kth light source, which describes the incident direction of the light. It is worth noting that It is obtained by equipment calibration before the experiment begins and is a fixed known condition throughout the calculation process; C is the mutual reflection coefficient, which is used to convert the geometric The value is converted to light intensity and can be as low as 0.5.
[0046] In this optional embodiment, the first half of the above relationship It is the classic Lambertian lighting model, which describes the brightness of a diffuse reflecting surface when it is directly illuminated by a single light source in an ideal environment (no secondary reflections, no ambient light). The second half of the formula is This is the core correction term of this application. Because the classic model fails in concave structures because it ignores light reflected from surrounding surfaces (i.e., interreflection), this application constructs this correction term to describe and compensate for this illumination information.
[0047] In one embodiment, the logic of the entire formula can be understood as follows: the total brightness observed The brightness of the direct light reflected by the surface + the brightness of the indirect light received by the surface. In this way, we can get the total brightness from the known In the above example, the albedo can be solved more accurately. and normal vector .
[0048] In one embodiment, an iterative loop can be constructed, in which each pixel is Apply the illumination correction model to solve. In the tth iteration, use the normal vector obtained in the t-1th iteration and albedo To determine self-occlusion. Specifically: based on the 3D depth map obtained in the previous iteration , calculate the self-occlusion mask by ray tracing , marks the pixels that are blocked under the illumination of light source k; in the ray tracing method, the input is a two-dimensional array of depth map , each value in the two-dimensional array represents the depth of the object surface point from the camera at the image coordinate; the light source direction vector , is a three-dimensional vector, representing the The goal of the algorithm is to output a self-occlusion mask , which is a two-dimensional array whose values are usually binary, where 1 represents the Under illumination, pixels Obscured.
[0049] In this optional embodiment, if , then the corresponding light source Does not participate in the solution of this pixel and is directly ignored; if , then the corresponding light source Normal participation in the relationship calculation, in the formula, the model approximates the interreflection effect as an additional ambient light that is proportional to the local geometric concavity.
[0050] Furthermore, the detailed steps of a single iteration (from t−1th to tth) are: The input is the result normal vector of the previous iteration and albedo For the initial iteration (t=1), the input is the initial normal vector calculated by the classical photometric stereo method in step S1. and the initial albedo map .
[0051] After the iteration loop starts, for the tth iteration, it includes: Update the 3D shape: according to the input normal vector , calculate or update the current optimal surface 3D depth map by integration and other methods ; Update self-occlusion mask: utilize the updated depth map and the known directions of the light sources , re-calculate the ray tracing to get a more accurate self-occlusion mask Because the shape estimation is more accurate, the shadow judgment will also be more accurate; Update the interreflection potential: use the input normal vector field , recalculate a more accurate mutual reflection influence potential ; Traverse every pixel in the image ; For the current pixel, sort out its observed brightness under N light sources , ,..., ; According to the latest , remove the illumination correction model equations corresponding to the blocked light sources. For example, if the light source is blocked, then the equation was abandoned.
[0052] Using the illumination correction model equation corresponding to the unobstructed light source and the newly calculated The value is used to establish a system of equations. The form of the system of equations is:
[0053] Solve the equations to get the new solution for the current pixel at the tth iteration: and , In this optional embodiment, after completing the calculation of all pixel points, it is determined whether the convergence condition is met. If not, As the input of the next iteration (t+1), repeat the iterative process; if it is satisfied, the iteration stops and the current and As the final corrected normal vector and corrected albedo map.
[0054] Furthermore, the convergence condition that needs to be met can be a fixed number of iterations set in advance, such as 8 times, or a very small threshold value such as After each iteration, the change between the new solution and the previous solution is calculated to see if it is less than the threshold. If it is less than the threshold, the iteration is stopped. For example, the change in the normal vector calculated between the two iterations is When it is less than the threshold, the iteration stops.
[0055] See Figure 4 , and finally at the end of the iteration, a corrected albedo map with greatly eliminated artifacts can be obtained.
[0056] It can be understood that by repeatedly solving the lighting correction model in a closed loop from coarse to fine, the influence of artifacts can be gradually eliminated, and finally convergence is obtained to obtain a weld surface normal vector and albedo result that is closer to physical reality.
[0057] S104: Intelligently detect pores on the weld surface of the high-pressure shell based on the corrected albedo map.
[0058] In one embodiment, see Figure 4 As a sudden change in the material, pore defects will appear on the image as isolated points with significant grayscale differences from their surrounding background. In this application, this corrected albedo map is used as input and sent to a pre-trained deep learning semantic segmentation network (such as a U-Net model) for pore defect detection. After forward propagation, the network will output a defect probability map with the same size as the input image. The value of each pixel on the map represents the probability that the point is a pore. Finally, through threshold segmentation, a high-precision defect binary segmentation result can be obtained, and the position and contour of each pore on the weld can be accurately marked, thereby realizing intelligent detection of pores on the surface of the high-pressure shell weld.
[0059] In this way, by performing detection on the corrected albedo map with suppressed artifacts, the deep learning network can focus more on learning real defects, thereby ultimately achieving high-precision and high-reliability intelligent detection of pores on the surface of the high-pressure shell weld.
[0060] It should be noted that a person skilled in the art may make a number of modifications and improvements without departing from the concept of the present application, and these modifications and improvements are all within the scope of protection of the present application. Therefore, the scope of protection of the patent application shall be based on the appended claims.
Claims
1. An intelligent method for detecting pores on the surface of a high-pressure shell weld, characterized in that: include: Acquire multiple images of the weld surface to be inspected under illumination from multiple light sources in different directions, and process the multiple images to obtain an initial normal vector and an initial albedo map of the weld surface; Based on the initial normal vector and the initial albedo map, a self-occlusion effect and an interreflection effect caused by the concave structure of the weld bead surface are modeled, wherein the modeling includes: quantifying an interreflection influence potential related to the local geometric concavity for each pixel; An illumination correction model is constructed based on the mutual reflection influence potential, and the normal vector and albedo of the weld surface are repeatedly updated through iterative optimization until convergence, thereby obtaining a corrected albedo map with artifacts eliminated; Intelligent detection of pores on the weld surface of a high-pressure shell is achieved based on the corrected albedo map.
2. The intelligent detection method for pores on the weld surface of a high-pressure shell according to claim 1, characterized in that: The modeling of the self-occlusion effect includes: Based on the three-dimensional morphology obtained in the previous iteration, the ray tracing method is used to determine whether any pixel point on the weld surface is blocked by its own structure under the illumination of each light source, thereby constructing a self-occlusion mask and ignoring the contribution of the blocked light source to the pixel point in subsequent solutions.
3. The intelligent detection method for pores on the surface of a high-pressure shell weld according to claim 1, characterized in that: The interreflection influence potential is used to quantify the potential degree to which a pixel is affected by secondary reflected light from surrounding surfaces, and the value of the interreflection influence potential is related to the degree of geometric concavity of the area where the pixel is located and the distance to the adjacent surface.
4. The intelligent detection method for pores on the surface of a high-pressure shell weld according to claim 3, characterized in that: The degree of geometric concavity is determined based on the directional difference between the normal vector of the central pixel and the normal vectors of other pixels in its neighborhood window.
5. The intelligent detection method for pores on the surface of a high-pressure shell weld according to claim 1, characterized in that: The mutual reflection influence potential satisfies the relationship: in, Pixel The mutual reflection influence potential; Pixels The neighborhood window centered on and The center pixel and its neighboring pixels The initial normal vector of The center pixel and its neighboring pixels The Euclidean distance between is a very small positive number used to prevent the denominator from being zero.
6. A method for intelligently detecting pores on the surface of a high-pressure shell weld according to claim 1 or 2, characterized in that: The iterative optimization method is specifically as follows: in each iteration, based on the normal vector and albedo obtained in the previous iteration, the self-occlusion mask and the interreflection influence potential are updated, and the normal vector and albedo of the current iteration are solved using the illumination correction model.
7. The intelligent detection method for pores on the weld surface of a high-pressure shell according to claim 1, characterized in that: The illumination correction model approximates the interreflection effect as an additional ambient light term that is proportional to the interreflection influence potential, thereby decomposing the observed brightness into the sum of direct illumination contribution and indirect illumination contribution.
8. The intelligent detection method for pores on the weld surface of a high-pressure shell according to claim 1, characterized in that: The illumination correction model satisfies the relationship: in, It's a pixel In the Observed brightness under each light source; and Respectively The albedo and normal vector obtained in the iteration; For the The direction vector of the light source; Pixel The mutual reflection influence potential; C is the mutual reflection coefficient.
9. The intelligent detection method for pores on the weld surface of a high-pressure shell according to claim 1, characterized in that: The intelligent detection of pores on the surface of the high-pressure shell weld is achieved based on the corrected albedo map, specifically by inputting the corrected albedo map into a pre-trained semantic segmentation network, and the semantic segmentation network outputs the pore defect segmentation result.
10. The intelligent detection method for pores on the weld surface of a high-pressure shell according to claim 1, characterized in that: The convergence condition of the iterative optimization is: the number of iterations reaches a preset threshold, or the change in the normal vector or albedo calculated in two consecutive iterations is less than a preset convergence accuracy.
Citation Information
Patent Citations
Metal surface measurement method and system based on photometric stereo and binocular structured light
CN116518869A
Image highlight compensation method based on optical parameter estimation
CN109978793A
Tomography method for overcoming internal light path shielding
CN115018806A
Polarization three-dimensional imaging method and system of color target and application
CN115235369A
Detection method and system suitable for various types of metal surface defects
CN115308223A