X-ray based detection method for weld seams of composite plate cladding
By determining the reference pixel points and calculating parameter values of the target pixel points in the X-ray image of the weld area of the composite plate, distinguishing the normal melt pool and crack areas, the problem of inaccurate detection in the prior art is solved, and a higher level of detection is achieved Detection accuracy.
Patent Information
- Application Number
- CN202411388830.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-10-08
AI Technical Summary
The prior art is difficult to accurately detect crack defects in composite plate welds, and it is easy to misjudge the normal melt pool as a crack area, resulting in inaccurate detection results.
By obtaining the X-ray image of the weld area of the composite board, multiple reference pixel points of the target pixel point are determined, and the parameter values of the target pixel point are calculated based on the grayscale characteristic difference value and texture characteristic value, and the normal melt pool and crack are distinguished from normal melt pool and cracks. area, thereby achieving more accurate detection.
Effectively distinguish between normal molten pool and crack area in the weld area, improve the accuracy of detection, reduce the rate of error judgment, and obtain more accurate crack detection results.
Smart Images

Figure CN118887218B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of image data processing, and in particular to an X-ray-based composite plate cladding weld detection method. Background Art
[0002] Composite panels are panels made of two or more different materials combined together by physical or chemical methods; composite panels usually include a substrate and a covering material; the substrate is the main part of the composite panel, used to provide structural strength and stability; the covering material covers the surface of the substrate, used to provide decorative effects and protect the substrate.
[0003] In the process of welding metal composite plates, crack defects may exist on the surface of the weld obtained after welding, which affects the quality of the welded metal composite plate. In order to realize the defect detection of the weld, in the related art, for example, a Chinese patent application document with publication number CN113436168A provides a method for detecting crack defects in industrial weld X-ray images, including: performing adaptive histogram equalization processing with limited low contrast on the original X-ray image of the industrial weld to be detected; performing denoising processing on the image after equalization processing by using non-local mean filtering to obtain a denoised X-ray image; performing edge texture detection on the denoised X-ray image by using the Canny algorithm to obtain a preliminary detection result; and screening algorithms for welds in both horizontal and vertical directions are used to screen the preliminary results to obtain crack defect detection results.
[0004] In the related art, the defect of the weld is determined by the edge detection result of the X-ray image. The edge detection mainly reflects the edge features in the X-ray image, and the normal molten pool in the weld area may also have certain edge features, making it difficult to distinguish between the normal molten pool and the crack area. The normal molten pool may be misjudged as a crack area in the weld. Therefore, the related art is difficult to accurately detect crack defects in the weld of the composite plate. Summary of the invention
[0005] In order to overcome the problem that it is difficult to accurately detect crack defects in the weld of a composite plate in the related art, the present application provides an X-ray-based composite plate cladding weld detection method for detecting the weld of a metal composite plate, comprising: obtaining an X-ray image of the weld area of the composite plate, and determining a plurality of reference pixel points of a target pixel point in the X-ray image, the reference pixel point being adjacent to the target pixel point in a direction perpendicular to the welding direction of the weld area, the target pixel point being any pixel point in the X-ray image; determining a first grayscale feature difference value between the target pixel point and the weld area, and determining a reference pixel point of the target pixel point; The second grayscale feature difference value between the point and the weld area is determined to determine the first parameter value of the target pixel point according to the first grayscale feature difference value and the second grayscale feature difference value, and the first parameter value is used to characterize the probability that the target pixel point is located in the normal molten pool in the weld area; the texture feature value of the target pixel point is obtained, and the texture feature value is used to characterize the uniformity of the change of the texture feature of the neighborhood range where the target pixel point is located in the welding direction; the texture feature value of the target pixel point and the first parameter value are multiplied to obtain the second parameter value of the target pixel point, and the crack area is determined from the X-ray image according to the second parameter value of the target pixel point.
[0006] In this way, the pixel point adjacent to the target pixel point in the vertical direction of the welding direction of the weld area is used as the reference pixel point of the pixel point, and the grayscale of other pixel points in the vertical direction of the welding direction of the weld area can be considered, and the uniformity of the change of the texture characteristics of the neighborhood range of the pixel point in the welding direction is considered. Since there is a difference in the uniformity of the change of the texture characteristics of the pixel points located in the normal molten pool and the pixel points located in the crack in the welding direction, and the grayscale of other pixel points in the vertical direction of the pixel points located in the crack is different from the grayscale of other pixel points in the vertical direction of the pixel points located in the normal molten pool, it is possible to distinguish between the normal molten pool and the crack area in the weld area, thereby obtaining a more accurate crack detection result for the weld area.
[0007] Optionally, determining the first parameter value of the target pixel point according to the first grayscale feature difference value and the second grayscale feature difference value includes: ,in, is the first parameter value of the target pixel in the X-ray image, exp is an exponential function with a natural constant as the base, is the first grayscale feature difference value, is the second grayscale feature difference value, and norm is the normalization function.
[0008] Optionally, the first grayscale feature difference value between the target pixel point and the weld area is determined in the following manner: the average of the grayscale values of all pixels in the weld area in the X-ray image is taken as the first average grayscale value; the ratio of the grayscale value of the target pixel point to the first average grayscale value is taken as the first grayscale feature difference value.
[0009] Optionally, the second grayscale characteristic difference value between the reference pixel point of the target pixel point and the weld area is determined in the following manner: taking the average grayscale value of all pixel points in the weld area in the X-ray image as the first average grayscale value; taking the average grayscale value of all reference pixel points of the target pixel point as the second average grayscale value; taking the absolute value of the difference between the first average grayscale value and the second average grayscale value as the second grayscale characteristic difference value.
[0010] Optionally, the texture feature value is determined by: , where B is the texture feature value of the target pixel, is the number of other pixels in the neighborhood of the target pixel that have different grayscale values from the target pixel. is the number of all pixels in the neighborhood of the target pixel, exp is an exponential function with a natural constant as the base, L is the number of pixel columns along the welding direction in the neighborhood of the target pixel, A is the number of pixels in the pixel columns along the welding direction in the neighborhood of the target pixel, is the gray value of the a+1th pixel on the kth pixel column along the welding direction within the neighborhood of the target pixel, is the gray value of the a-th pixel on the k-th pixel column along the welding direction within the neighborhood of the target pixel, To take the absolute value operation.
[0011] In this way, by determining the number of other pixels in the neighborhood of the target pixel that have different grayscale values from the target pixel , thus determining and The ratio of is the number of all pixels in the neighborhood of the target pixel, which can be combined with the change of texture in the neighborhood of the target pixel in the column direction. The number of other pixels in the neighborhood with different grayscale values from the target pixel is high, indicating that the grayscale value in the neighborhood is richer. If the texture feature of the target pixel changes evenly in the column direction and the grayscale value in the neighborhood is richer, it means that the consistency between the neighborhood and the normal molten pool is high, and the target pixel is more likely to be located in the normal molten pool. Therefore, it is easy to distinguish the normal molten pool from the crack area in the X-ray image.
[0012] Optionally, determining a crack area from an X-ray image based on a second parameter value of a target pixel includes: taking pixels whose second parameter value is less than or equal to a preset parameter threshold as suspected crack pixels in the X-ray image; and determining crack pixels from the suspected crack pixels based on grayscale differences between the suspected crack pixels and other pixels in a neighborhood range, so as to obtain a crack area composed of crack pixels.
[0013] In this way, since the pixel points whose second parameter values are greater than the preset parameter threshold are more likely to be located in the normal molten pool, the pixel points whose second parameter values are less than or equal to the preset parameter threshold are taken as suspected crack pixel points. The determination range of the crack pixel points can be narrowed from the entire X-ray image to the set of suspected crack pixel points, thereby reducing the difficulty of determining the crack pixel points and avoiding the influence of the pixels with a higher probability of belonging to the normal molten pool on the crack detection results. Therefore, more accurate crack detection results can be obtained.
[0014] Optionally, the method of determining a crack pixel from suspected crack pixels based on the grayscale difference between the suspected crack pixel and other pixels in a neighborhood range includes: taking the average grayscale value of all pixels in the neighborhood range of the suspected crack pixel as a third average grayscale value; and taking the suspected crack pixel as a crack pixel when the grayscale value of the suspected crack pixel is less than or equal to the third average grayscale value.
[0015] Optionally, the X-ray image of the weld area of the composite plate is obtained in the following manner: obtaining an initial X-ray image including the weld area of the composite plate; inputting the initial X-ray image into a pre-trained weld area segmentation model to obtain an X-ray image output by the weld area segmentation model, wherein the X-ray image corresponds to the image area where the weld area is located in the initial X-ray image; wherein the weld area segmentation model is trained using the X-ray image of the composite plate after welding and a mask image obtained after marking the weld area in the X-ray image, and the grayscale value of other pixels in the mask image except the weld area is 0.
[0016] In this way, by inputting the initial X-ray image into the pre-trained weld area segmentation model, the X-ray image output by the weld area segmentation model is obtained. Since the weld area segmentation model is trained based on the X-ray image of the composite plate after welding and the mask image obtained after marking the weld area in the X-ray image, it can better avoid the adverse effects of other pixels other than the weld area in the X-ray image of the composite plate after welding on the crack detection results.
[0017] The technical solution provided by the embodiments of the present application may include the following beneficial effects: by using the pixel points adjacent to the target pixel points in the vertical direction of the welding direction of the weld area as the reference pixel points of the pixel points, the grayscale conditions of other pixel points in the vertical direction of the welding direction of the weld area can be considered, and the uniformity of the change of the texture features of the neighborhood range of the pixel points in the welding direction is considered. Since there is a difference in the uniformity of the change of the texture features of the pixel points located in the normal molten pool and the pixel points located in the crack in the welding direction, and the grayscale conditions of other pixel points of the pixel points located in the crack in the vertical direction of the welding direction are different from the grayscale conditions of other pixel points of the pixel points located in the normal molten pool in the vertical direction of the welding direction, it is possible to distinguish the normal molten pool from the crack area in the weld area, thereby obtaining a more accurate crack detection result for the weld area.
[0018] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0020] Figure 1 The present invention is a flow chart showing a method for detecting weld seams of composite plate cladding materials based on X-rays according to an exemplary embodiment. DETAILED DESCRIPTION
[0021] Here, exemplary embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application.
[0022] First, the application scenario of the embodiment of the present application is briefly introduced. In the application scenario of the present application, when welding a metal composite plate, since the bimetallic plate is made of two different metal materials, the thermal expansion coefficients of the two metals may be different. Therefore, during the cooling process of the weld after welding, due to the difference in thermal expansion coefficients of the two metals, the composite plate may generate stress in the direction perpendicular to the welding direction, thereby generating cracks in the weld, affecting the quality of the bimetallic composite plate after welding.
[0023] In the related art, edge detection can be performed on the weld image, so as to obtain the detection result of the defects in the weld based on the edge detection result. Since the welding process may be carried out in a manner other than linear welding, such as linear swing welding and arc swing welding, the normal molten pool area behind the weld may also have certain texture features. Edge detection is difficult to distinguish between the normal molten pool area and cracks, and the cracks in the weld may be confused with the normal molten pool, making it difficult to detect the cracks in the composite plate.
[0024] In order to detect cracks in the weld, the grayscale value of the pixel point can also be compared with the grayscale value of other pixel points in the neighborhood. However, the grayscale value of the weld molten pool and the texture of the crack pixel point are also complex to a certain extent. The difference in grayscale value between the pixel point where the molten pool is located and other pixel points in the neighborhood may also be large, making it difficult for existing defect detection technologies to distinguish between cracks and molten pools, and thus difficult to achieve effective detection of defects.
[0025] In view of the above technical problems, the embodiment of the present application provides a composite plate cladding weld detection method based on X-rays, which can be used to detect the welds of metal composite plates. Figure 1 is a flow chart of a composite plate cladding material weld detection method based on X-rays according to an exemplary embodiment. Figure 1 As shown, the method includes the following steps.
[0026] In step S101, an X-ray image of a weld area of a composite plate is acquired, and a plurality of reference pixel points of a target pixel point in the X-ray image are determined.
[0027] The reference pixel point is adjacent to the target pixel point in a direction perpendicular to the welding direction of the weld area, and the target pixel point is any pixel point in the X-ray image.
[0028] In order to achieve the connection of the composite plates, two different composite plates can be welded. The composite plates welded in the embodiment of the present application can be bimetallic composite plates such as titanium-steel composite plates, copper-steel composite plates and copper-aluminum composite plates. For example, two copper-steel composite plates are connected by welding.
[0029] For the welded composite plate, an initial X-ray image of the weld portion of the welded composite plate can be collected by an X-ray image acquisition device. When the initial X-ray image only contains the weld area, the initial X-ray image is directly used as the X-ray image for weld detection.
[0030] Alternatively, when the initial X-ray image includes other areas besides the weld, the initial X-ray image can be segmented to obtain the area where the weld is located in the initial X-ray image, and the area where the weld is located in the initial X-ray image can be used as the X-ray image for weld detection.
[0031] The weld area may be one of the multiple welds of the composite plate after welding. For example, the weld area may be a designated weld that has not been inspected yet among the multiple welds of the composite plate.
[0032] In one embodiment, the X-ray image of the weld area of the composite plate is obtained by: obtaining an initial X-ray image including the weld area of the composite plate; inputting the initial X-ray image into a pre-trained weld area segmentation model to obtain an X-ray image output by the weld area segmentation model, wherein the X-ray image corresponds to the image area where the weld area is located in the initial X-ray image; wherein the weld area segmentation model is trained using the X-ray image of the composite plate after welding and a mask image obtained after marking the weld area in the X-ray image, and the grayscale value of other pixels in the mask image except the weld area is 0.
[0033] For example, an X-ray image including the weld area of the composite plate may be acquired, and the pixel values of other pixels in the X-ray image except the weld area may be marked as 0 to obtain a mask image corresponding to the weld area in the X-ray image.
[0034] The X-ray image of the composite plate after welding can be used as input, and the mask image of the weld area in the corresponding X-ray image can be used as output. The pre-constructed initial network model can be trained, and the trained initial network model can be used as the weld area segmentation model so that the weld area in the X-ray image of the composite plate after welding can be segmented in the subsequent use of the weld area segmentation model.
[0035] In this way, by inputting the initial X-ray image into the pre-trained weld area segmentation model, the X-ray image output by the weld area segmentation model is obtained. Since the weld area segmentation model is trained based on the X-ray image of the composite plate after welding and the mask image obtained after marking the weld area in the X-ray image, it can better avoid the adverse effects of other pixels other than the weld area in the X-ray image of the composite plate after welding on the crack detection results.
[0036] The reference pixel point and the target pixel point are adjacent in the vertical direction of the welding direction of the weld area. For example, if the welding direction of the weld in the X-ray image is vertical, due to the different thermal expansion coefficients of the two different metals in the composite plate, transverse stress is generated during the cooling process of the weld, thereby generating transverse cracks on the surface of the weld. The direction of the transverse crack is perpendicular to the welding direction of the weld. When the welding direction in the X-ray image is along the vertical direction, the transverse cracks in the X-ray image usually appear in the horizontal direction.
[0037] For example, the direction in which the welding direction is located can be taken as the first direction, the direction perpendicular to the welding direction can be taken as the second direction, and the four other pixel points in the X-ray image located on one side of the pixel point in the second direction, and the four other pixel points in the X-ray image located on the other side of the pixel point in the second direction can be taken as multiple reference pixel points of the target pixel point; the embodiment of the present application does not impose any limitation on the number of reference pixel points selected for the same pixel point.
[0038] The pixel points adjacent to the target pixel point in the vertical direction of the welding direction of the weld area are used as references. Since the normal molten pool area in the weld has a certain texture in the vertical direction of the welding direction, and the texture of the crack in the weld is more random in the vertical direction of the welding direction, determining multiple reference pixel points of the target pixel point in the X-ray image is helpful to distinguish the crack from the molten pool area and avoid confusing the crack with the molten pool during threshold segmentation.
[0039] In step S102, a first grayscale feature difference value between a target pixel and a weld area is determined, and a second grayscale feature difference value between a reference pixel of the target pixel and the weld area is determined, so as to determine a first parameter value of the target pixel based on the first grayscale feature difference value and the second grayscale feature difference value.
[0040] The first parameter value is used to characterize the probability that the target pixel point is located in the normal molten pool in the weld area. The larger the first parameter value of the target pixel point, the greater the probability that the target pixel point is located in the normal molten pool in the weld area; conversely, the smaller the first parameter value of the target pixel point, the smaller the probability that the target pixel point is located in the normal molten pool in the weld area.
[0041] Since the target pixel point and the reference pixel point of the target pixel point are adjacent in the vertical direction of the welding direction, and the pixel points located in the molten pool have a certain similarity in the vertical direction of the welding direction, the first grayscale feature difference value between the target pixel point and the multiple reference pixel points is determined. The first grayscale feature difference value can characterize the degree of difference in grayscale features between the target pixel point and the multiple reference pixel points.
[0042] The smaller the first grayscale feature difference value is, the smaller the difference in grayscale features between the target pixel and multiple reference pixels is, and the pixel has a higher probability of being located in the normal molten pool in the weld; on the contrary, the larger the first grayscale feature difference value is, the greater the difference in grayscale features between the target pixel and multiple reference pixels is, and the pixel has a lower probability of being located in the molten pool in the weld.
[0043] The normal molten pool in the weld in the embodiment of the present application refers to the area formed after the molten metal mixture in the welding process is cooled, and the normal molten pool includes the area where the normal weld is located except for the crack.
[0044] Determine the second grayscale feature difference value between the target pixel point and the weld area. Since the reference pixel point is selected in the vertical direction of the welding direction, there is a certain difference between the grayscale value of the adjacent pixel points in the vertical direction of the welding direction and the grayscale value of the weld area, which makes there a certain difference between the grayscale value of the weld area and the grayscale value of the reference pixel point of the pixel point.
[0045] The second grayscale feature value is used to characterize the degree of difference between the grayscale characteristics of the reference pixel point of the target pixel point and the overall grayscale characteristics of the weld area, wherein the larger the second grayscale feature difference value is, the greater the difference between the grayscale characteristics of the reference pixel point and the overall grayscale characteristics of the weld area is, and the pixel point has a higher probability of being located in the area where the normal molten pool is located.
[0046] In one embodiment, determining the first parameter value of the target pixel point according to the first grayscale feature difference value and the second grayscale feature difference value includes: ,in, is the first parameter value of the target pixel in the X-ray image, exp is an exponential function with a natural constant as the base, is the first grayscale feature difference value, is the second grayscale feature difference value, and norm is the normalization function.
[0047] The first grayscale feature difference value is used to characterize the degree of difference in grayscale features between the target pixel and multiple reference pixels, and the second grayscale feature value is used to characterize the degree of difference between the grayscale features of the reference pixels of the target pixel and the overall grayscale features of the weld area; the smaller the first grayscale feature difference value, the higher the probability that the pixel is located in the molten pool in the weld, and the larger the second grayscale feature difference value, the higher the probability that the pixel is located in the area where the normal molten pool is located.
[0048] The exponential function operation value is obtained by processing the first grayscale feature difference value through the exponential function, and the reciprocal of the exponential operation value is used to participate in the calculation of the first parameter value, so that the normalization processing of the first grayscale feature difference value can be realized; and because the smaller the first grayscale feature difference value, the higher the probability that the pixel point is located in the molten pool in the weld, the reciprocal of the exponential function of the first grayscale feature difference value is multiplied by the normalized second grayscale feature difference value, which can ensure that the smaller the first grayscale feature difference value, the larger the first parameter value of the target pixel point, and therefore it can also ensure that the changing direction of the first grayscale feature difference value corresponds to the changing direction of the first parameter value.
[0049] In one embodiment, the first grayscale feature difference value between the target pixel point and the weld area is determined in the following manner: the average grayscale value of all pixels in the weld area in the X-ray image is used as the first average grayscale value; the ratio of the grayscale value of the target pixel point to the first average grayscale value is used as the first grayscale feature difference value.
[0050] The average grayscale value of all pixels in the weld area in the X-ray image can be calculated to obtain a first average grayscale value. The first average grayscale value can reflect the grayscale characteristics of the weld area as a whole. The ratio of the grayscale value of the target pixel to the first average grayscale value is used as the first grayscale feature difference value. The first grayscale feature difference value can better characterize the degree of difference in grayscale characteristics between the target pixel and the weld area.
[0051] In one embodiment, the second grayscale feature difference value between the reference pixel point of the target pixel point and the weld area is determined in the following manner: the average grayscale value of all pixel points in the weld area in the X-ray image is used as the first average grayscale value; the average grayscale value of all reference pixel points of the target pixel point is used as the second average grayscale value; the absolute value of the difference between the first average grayscale value and the second average grayscale value is used as the second grayscale feature difference value.
[0052] By determining the average grayscale value of all pixels in the weld area in the X-ray image, a first average grayscale value can be obtained, which can reflect the grayscale characteristics of the weld area as a whole; by calculating the average grayscale value of all reference pixels of the target pixel, a second average grayscale value can be obtained.
[0053] The pixel points located in the normal molten pool area have certain texture characteristics in the direction perpendicular to the welding direction, so that there is a certain difference between the grayscale characteristics of the reference pixel points of the pixel points located in the normal molten pool and the grayscale characteristics of the weld area. The second grayscale feature difference value can be determined according to the first average grayscale value and the second average grayscale value. The second grayscale feature difference value is used to characterize the degree of difference in grayscale characteristics between the reference pixel points of the target pixel points and the weld area.
[0054] According to the first grayscale feature difference value and the second grayscale feature difference value, the first parameter value of the target pixel point is determined. The probability that the target pixel point is located in the normal molten pool in the weld area can be represented by the first parameter value to avoid confusing the normal molten pool with the crack during defect detection.
[0055] In step S103, the texture feature value of the target pixel is obtained.
[0056] The texture feature value is used to characterize the uniformity of the change of the texture features in the neighborhood of the target pixel point in the welding direction; since the normal molten pool is formed by the cooling of the molten metal mixture during the welding process, the texture change of the normal molten pool in the welding direction is more coherent compared to the transverse cracks formed after welding in the weld.
[0057] Since the texture change of the normal molten pool in the welding direction is more coherent, compared with the transverse cracks formed in the weld, the overall change of the texture of the normal molten pool in the welding direction at the same distance is smaller. Therefore, by obtaining the texture feature value that can characterize the change speed of the texture features in the neighborhood range of the target pixel point in the welding direction, it can help to distinguish the transverse cracks in the weld from the normal molten pool, so as to obtain more accurate crack defect detection results.
[0058] In one embodiment, the texture feature value of the target pixel point can be determined in the following manner: , where B is the texture feature value of the target pixel, is the number of other pixels in the neighborhood of the target pixel that have different grayscale values from the target pixel. is the number of all pixels in the neighborhood of the target pixel, exp is an exponential function with a natural constant as the base, L is the number of pixel columns along the welding direction in the neighborhood of the target pixel, A is the number of pixels in the pixel columns along the welding direction in the neighborhood of the target pixel, is the a+1th pixel point on the kth pixel column along the welding direction within the neighborhood of the target pixel point, is the a-th pixel point on the k-th pixel column along the welding direction within the neighborhood of the target pixel point, To take the absolute value operation.
[0059] The neighborhood range of the target pixel point may refer to a preset range centered on the target pixel point. For example, the neighborhood range may be a 7×7 range centered on the target pixel point, or a 5×5 range centered on the target pixel point, or a 3×3 range centered on the target pixel point.
[0060] When there is a crack in the neighborhood range of the target pixel point, or when the target pixel point is located in the crack area in the X-ray image, due to the presence of the crack pixel point in the neighborhood range, the texture change speed of the pixel point in the welding direction is increased compared to the normal molten pool, including the texture features of the neighborhood range of the crack pixel point. The uniformity of the change of the texture features of the neighborhood range of the crack pixel point in the welding direction is reduced, for example, the uniformity of the change of the texture features of the neighborhood range on one or more columns is reduced.
[0061] In the calculation formula of the texture eigenvalue of the target pixel point in the embodiment of the present application, the texture eigenvalue is determined based on the grayscale difference of adjacent pixels on the same pixel column in the neighborhood range. According to the multiple grayscale difference values corresponding to multiple adjacent pixels, the overall uniformity of the change in the texture of the pixel point in the column direction can be reflected; the grayscale difference of adjacent pixels is equal to the difference between the two grayscale values of two adjacent pixels.
[0062] For example, when the texture of the neighborhood range of the target pixel point does not change in the column direction, or when the texture of the neighborhood range of the target pixel point shows a relatively uniform change in the column direction, the value of the texture eigenvalue is larger. Therefore, the texture eigenvalue can better characterize the texture characteristics of the neighborhood range where the target pixel point is located, and the higher the degree of uniformity of the change in the welding direction.
[0063] The larger the texture feature value of the target pixel, the more uniform the change of the texture features in the neighborhood of the pixel in the welding direction, and the pixel has a higher probability of being located in the normal molten pool area, or the pixel has a lower probability of being located in the crack area.
[0064] On the contrary, the smaller the texture feature value of the target pixel, the less uniform the change of the texture features in the neighborhood of the target pixel in the welding direction, and the target pixel has a lower probability of being located in the normal molten pool area, or the target pixel has a higher probability of being located in the crack area.
[0065] By determining the number of other pixels in the neighborhood of the target pixel that have different grayscale values from the target pixel , thus determining and The ratio of is the number of all pixels in the neighborhood of the target pixel, which can be combined with the texture change of the neighborhood of the target pixel in the column direction to determine whether the target pixel is located in a normal molten pool.
[0066] For example, the number of other pixels in the neighborhood with different grayscale values from the target pixel is high, indicating that the grayscale values in the neighborhood are richer; if the texture features of the target pixel change evenly in the column direction and the grayscale values in the neighborhood are richer, it means that the consistency between the neighborhood and the normal molten pool is high, and the target pixel is more likely to be located in the normal molten pool, which can facilitate the distinction between the normal molten pool and the crack area in the X-ray image.
[0067] In step S104, the texture feature value of the target pixel and the first parameter value are multiplied to obtain a second parameter value of the target pixel, and the crack area is determined from the X-ray image according to the second parameter value of the target pixel.
[0068] Since the texture feature value can characterize the uniformity of the change of texture features in the neighborhood range of the target pixel point in the welding direction, the first parameter value can characterize the probability that the target pixel point is located in the normal molten pool in the weld area, and there are differences in the texture features in the column direction of the pixels in the normal molten pool and the crack area, therefore, the crack area where the crack pixel point is located is determined from the X-ray image through the texture feature value of the target pixel point and the first parameter value.
[0069] The first parameter value can reflect the grayscale characteristics of the pixel point, and the texture feature value can characterize the uniformity of the change of the texture characteristics of the neighborhood range of the target pixel point in the welding direction. Therefore, the texture feature value of the target pixel point and the first parameter value are multiplied together. Through the obtained second parameter value of the target pixel point, the feature description of the two dimensions of the grayscale characteristics and texture characteristics of the pixel point can be realized through the second parameter value, so as to determine the crack area existing in the X-ray image.
[0070] In one embodiment, determining a crack area from an X-ray image based on a second parameter value of a target pixel includes: taking pixels whose second parameter value is less than or equal to a preset parameter threshold as suspected crack pixels in the X-ray image; and determining crack pixels from the suspected crack pixels based on grayscale differences between the suspected crack pixels and other pixels in a neighborhood range to obtain a crack area composed of crack pixels.
[0071] When the second parameter value of the target pixel is greater than the preset parameter threshold, it means that the texture feature value of the target pixel is high and the first parameter value is high. Wherein, when the second parameter value of the target pixel is between 0 and 1, the preset parameter threshold can be set between 0.3 and 0.5.
[0072] When the second parameter value of the target pixel point is less than or equal to the preset parameter threshold, it means that the probability that the pixel point belongs to a normal molten pool is low. In order to achieve more accurate screening of pixels in the X-ray image, pixels whose second parameter values are less than or equal to the preset parameter threshold can be regarded as suspected crack pixels, and crack pixels can be determined from the suspected crack pixels.
[0073] In this way, since the pixel points whose second parameter values are greater than the preset parameter threshold are more likely to be located in the normal molten pool, the pixel points whose second parameter values are less than or equal to the preset parameter threshold are taken as suspected crack pixel points. The determination range of the crack pixel points can be narrowed from the entire X-ray image to the set of suspected crack pixel points, thereby reducing the difficulty of determining the crack pixel points and avoiding the influence of the pixels with a higher probability of belonging to the normal molten pool on the crack detection results. Therefore, more accurate crack detection results can be obtained.
[0074] In one embodiment, the method of determining the crack pixel from the suspected crack pixels based on the grayscale difference between the suspected crack pixel and other pixels in the neighborhood includes: taking the average grayscale value of all pixels in the neighborhood of the suspected crack pixel as the third average grayscale value; and taking the suspected crack pixel as the crack pixel when the grayscale value of the suspected crack pixel is less than or equal to the third average grayscale value.
[0075] Since the pixels in the normal molten pool are mainly manifested by the second parameter value being greater than the preset parameter threshold, the obtained suspected crack pixels have tried their best to avoid the pixels of the normal molten pool existing in the X-ray image, and compared with the positions where no cracks appear in the weld, the positions where cracks appear in the weld have different degrees of absorption of X-rays, resulting in a certain difference between the crack pixels and the surrounding pixels in the X-ray image. The crack pixels are mainly manifested by differences in grayscale values from the surrounding pixels.
[0076] Therefore, the average grayscale value of all pixels within the neighborhood of the suspected crack pixel is taken as the third average grayscale value; when the grayscale value of the suspected crack pixel is less than or equal to the third average grayscale value, the suspected crack pixel is taken as the crack pixel, which can effectively determine the crack pixel existing in the X-ray image.
[0077] In this way, compared with directly comparing the grayscale value of the target pixel with the grayscale values of other surrounding pixels, since the range of crack pixels is determined as suspected pixels, the suspected pixels contain fewer pixels of the normal molten pool. Therefore, the influence of the normal molten pool on the crack detection results can be avoided, and the confusion of the pixels of the normal molten pool with the crack pixels can be avoided, so that more accurate crack detection results can be obtained.
[0078] By using the X-ray-based composite plate cladding weld detection method provided in the embodiment of the present application, the pixel points adjacent to the target pixel points in the vertical direction of the welding direction of the weld area are used as reference pixel points of the target pixel points, and the grayscale conditions of other pixel points in the vertical direction of the welding direction of the weld area can be considered, and the uniformity of the change of the texture characteristics of the neighborhood range where the target pixel point is located in the welding direction is considered. Since there is a difference in the uniformity of the change of the texture characteristics of the pixel points located in the normal molten pool and the pixel points located in the crack in the welding direction, and the grayscale conditions of other pixel points in the vertical direction of the pixel points located in the crack are different from the grayscale conditions of other pixel points in the vertical direction of the pixel points located in the normal molten pool, it is possible to distinguish between the normal molten pool and the crack area in the weld area, thereby obtaining a more accurate crack detection result for the weld area.
[0079] It should be understood that the features of some embodiments of the various applications described herein may be combined with each other, unless specifically stated otherwise.
[0080] Although terms such as "first", "second", and "third" may be used herein to describe various components, parts, regions, layers, or sections, these components, parts, regions, layers, or sections are not limited to these terms. Instead, these terms are only used to distinguish one component, part, region, layer, or section from another component, part, region, layer, or section. Therefore, without departing from the teachings of the examples described herein, the first component, part, region, layer, or section mentioned in the examples may also be referred to as the second component, part, region, layer, or section.
[0081] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description herein, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0082] In addition, the word "exemplary" is used herein to mean serving as an example, instance, or diagram. Any aspect or design described herein as "exemplary" is not necessarily to be understood as being advantageous over other aspects or designs. Instead, the use of the word exemplary is intended to present concepts in a concrete manner. As used herein, the term "or" is intended to mean an inclusive "or" rather than an exclusive "or".
[0083] Likewise, although the present application has been shown and described with respect to one or more implementations, equivalent variations and modifications will occur to those skilled in the art upon reading and understanding this specification and the accompanying drawings. With particular regard to the various functions performed by the components (e.g., elements, resources, etc.) described above, unless otherwise noted, the terms used to describe such components are intended to correspond to any component (functionally equivalent) that performs the specific functions of the described components, even if not structurally equivalent to the disclosed structures.
[0084] Additionally, while particular features of the present application may have been disclosed with respect to only one of several implementations, such features may be combined with one or more other features of other implementations as may be desired and advantageous for any given or particular application.
[0085] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary technical means in the art that are not disclosed in the present application, and the specification and embodiments are only considered as exemplary.
[0086] It should be understood that the present application is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof.
Claims
1. A composite plate cladding weld detection method based on X-rays, used to detect the weld of a metal composite plate, characterized in that: include: Acquire an X-ray image of a weld area of the composite plate, and determine a plurality of reference pixel points of a target pixel point in the X-ray image, wherein the reference pixel points are adjacent to the target pixel point in a direction perpendicular to a welding direction of the weld area, and the target pixel point is any pixel point in the X-ray image; Determining a first grayscale feature difference value between a target pixel and a weld area includes: taking an average of grayscale values of all pixels in the weld area in the X-ray image as a first average grayscale value; taking a ratio of the grayscale value of the target pixel to the first average grayscale value as a first grayscale feature difference value, and determining a second grayscale feature difference value between a reference pixel of the target pixel and the weld area, and determining a first parameter value of the target pixel according to the first grayscale feature difference value and the second grayscale feature difference value includes: ,in, is the first parameter value of the target pixel in the X-ray image, is the first grayscale feature difference value, is the second grayscale feature difference value, and the first parameter value is used to characterize the probability that the target pixel point is located in the normal molten pool in the weld area; Obtaining the texture feature value of the target pixel point, the texture feature value is used to characterize the uniformity of the change of the texture feature of the neighborhood range where the target pixel point is located in the welding direction; The texture feature value of the target pixel and the first parameter value are multiplied to obtain a second parameter value of the target pixel, and the crack area is determined from the X-ray image according to the second parameter value of the target pixel.
2. The X-ray based composite plate cladding weld detection method according to claim 1, characterized in that: The second grayscale feature difference value between the reference pixel point of the target pixel point and the weld area is determined in the following manner: The average grayscale value of all pixels in the weld area in the X-ray image is taken as the first average grayscale value; Taking the average grayscale value of all reference pixels of the target pixel as the second average grayscale value; The absolute value of the difference between the first average grayscale value and the second average grayscale value is used as the second grayscale feature difference value.
3. The X-ray based composite plate cladding weld detection method according to claim 1, characterized in that: The texture feature value is determined in the following manner: , where B is the texture feature value of the target pixel, is the number of other pixels in the neighborhood of the target pixel that have different grayscale values from the target pixel. is the number of all pixels in the neighborhood of the target pixel, exp is an exponential function with a natural constant as the base, L is the number of pixel columns along the welding direction in the neighborhood of the target pixel, A is the number of pixels in the pixel columns along the welding direction in the neighborhood of the target pixel, is the gray value of the a+1th pixel on the kth pixel column along the welding direction within the neighborhood of the target pixel, is the gray value of the a-th pixel on the k-th pixel column along the welding direction within the neighborhood of the target pixel, To take the absolute value operation.
4. The X-ray based composite plate cladding weld detection method according to claim 1, characterized in that: Determining the crack area from the X-ray image according to the second parameter value of the target pixel point includes: The pixel points whose second parameter value is less than or equal to the preset parameter threshold are regarded as the suspected crack pixel points in the X-ray image; According to the grayscale difference between the suspected crack pixel and other pixels in the neighborhood, the crack pixel is determined from the suspected crack pixels to obtain the crack area composed of the crack pixels.
5. The X-ray based composite plate cladding weld detection method according to claim 4, characterized in that: The step of determining the crack pixel from the suspected crack pixel according to the grayscale difference between the suspected crack pixel and other pixel points in the neighborhood range includes: The average grayscale value of all pixels in the neighborhood of the suspected crack pixel is taken as the third average grayscale value; When the grayscale value of the suspected crack pixel point is less than or equal to the third average grayscale value, the suspected crack pixel point is taken as the crack pixel point.
6. The X-ray based composite plate cladding weld detection method according to claim 1, characterized in that: The X-ray image of the weld area of the composite plate is obtained by: acquiring an initial X-ray image of a weld region including the composite plate; Inputting the initial X-ray image into a pre-trained weld region segmentation model to obtain an X-ray image output by the weld region segmentation model, wherein the X-ray image corresponds to an image region where the weld region in the initial X-ray image is located; The weld area segmentation model is trained using an X-ray image of the composite plate after welding and a mask image obtained by marking the weld area in the X-ray image, and the grayscale value of other pixels in the mask image except the weld area is 0.
Citation Information
Patent Citations
Crack defect detection method used in industrial welding seam X-ray image
CN113436168A
X-ray ship body welding seam image detection method for ship maintenance
CN115984284A
