Bridge welding quality detection method based on gray scale-relative depth fitting visual technology
Through the bridge welding quality detection method based on grayscale-relative depth fitting vision technology, high-resolution cameras and grayscale processing technology, the problems of unstable image quality and high computational complexity in the existing technology are solved, and bridges are realized High precision, rapid detection and real-time monitoring of welding quality.
Patent Information
- Application Number
- CN202411209368.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-06
AI Technical Summary
The existing gray-relative depth fitting technology is difficult to achieve high-precision and high-efficiency detection in bridge welding quality inspection due to the complex environment and high computational complexity, and cannot meet the needs of modern bridge construction.
The bridge welding quality detection method based on grayscale-relative depth fitting vision technology is adopted to capture multi-dimensional images through a high-resolution camera, and combine grayscale processing and relative depth calculation to generate a three-dimensional surface to conduct a comprehensive evaluation of welding quality. Specific steps include multi-dimensional image capture, grayscale processing, relative depth calculation, grayscale-relative depth fitting and quality detection.
It effectively enhances image contrast and clarity, improves the accuracy of three-dimensional surface construction, shortens the detection cycle, realizes rapid feedback and real-time monitoring of welding quality, and meets the high-precision and high-efficiency detection needs.
Smart Images

Figure CN119086589A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of bridge engineering quality detection, and in particular to a bridge welding quality detection method based on grayscale-relative depth fitting vision technology. Background Art
[0002] As an important infrastructure for transportation, the quality and safety of bridges are of vital importance. In bridge construction, welding is a commonly used connection method. The quality of welding directly affects the structural safety and service life of the bridge. Therefore, accurate and efficient testing of bridge welding quality is a key link in ensuring bridge quality.
[0003] However, when the existing grayscale-relative depth fitting technology is applied to bridge welding quality inspection, the quality of the collected images is unstable due to the complex environment and changeable lighting conditions of the bridge welding area, which affects the accuracy of subsequent grayscale processing and depth calculation. The surface morphology of the welding area is complex, and there are a large number of interference factors such as reflection and shadow, which increases the difficulty of feature point extraction and matching, and thus affects the construction accuracy of the three-dimensional surface. The existing grayscale-relative depth fitting algorithm has high computational complexity when processing large-scale data and is difficult to meet the needs of real-time detection.
[0004] In summary, the traditional bridge welding quality inspection method can no longer meet the needs of modern bridge construction for high-precision and high-efficiency inspection. Therefore, it is particularly important to develop a new method based on grayscale-relative depth fitting visual technology to overcome the shortcomings of the existing technology and achieve efficient and accurate inspection of bridge welding quality. Summary of the invention
[0005] The purpose of the present invention is to make up for the shortcomings of the prior art and to provide a bridge welding quality detection method based on grayscale-relative depth fitting visual technology. It can achieve a comprehensive and accurate evaluation of the bridge welding quality by optimizing the steps of multi-dimensional image capture, grayscale processing, relative depth calculation and grayscale-relative depth fitting, thereby providing strong support for improving the quality of bridge construction.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions: a bridge welding quality detection method based on grayscale-relative depth fitting visual technology, the bridge welding quality detection method comprises the following steps:
[0007] S100, multi-dimensional image capture: using high-resolution cameras to control lighting and shoot at multiple angles, it can comprehensively capture images of bridge welding parts, providing rich raw data for subsequent inspections;
[0008] S200, grayscale processing: grayscale processing operations are performed on the collected images, including histogram equalization, stretching, filtering and edge enhancement, to enhance image contrast and clarity and highlight key features;
[0009] S300, relative depth calculation: using binocular vision principle, after camera calibration, feature point extraction and matching, triangulation and depth optimization, the relative depth information of the welding part can be accurately calculated;
[0010] S400, grayscale-relative depth fitting: The grayscale image is fused with the relative depth information to generate point cloud data. After filtering and denoising, the three-dimensional surface of the welding part is constructed using the surface fitting algorithm;
[0011] S500, quality inspection: Based on the constructed 3D surface, it comprehensively evaluates the bridge welding quality by analyzing surface flatness, measuring weld width and depth, and detecting defects, and generates a detailed quality report.
[0012] Furthermore, the specific steps of the S200 grayscale processing are:
[0013] S201, histogram equalization preprocessing: pre-processing the grayscale image obtained from the multi-dimensional image capture to improve the overall contrast, calculate the histogram of the grayscale image, and dynamically adjust the cumulative distribution function of the histogram according to the grayscale distribution characteristics of the welding area, so that the image maintains the detail information of the welding area while enhancing the contrast;
[0014] S202, grayscale stretching and detail enhancement: After histogram equalization, the grayscale range of the welding area is expanded to the entire available grayscale level to improve the contrast of the local area.
[0015] Furthermore, the histogram equalization preprocessing step S201 calculates the histogram of the collected grayscale image, that is, counts the frequency of occurrence of each grayscale level in the image. The grayscale range of the image is [0, L-1], where L is the number of grayscale levels, the total number of pixels in the image is N, and the number of pixels with grayscale level i is n. i , then the probability of gray level i appearing is The new gray value is calculated by the cumulative distribution function. Here, k traverses the grayscale levels from 0 to i, and maps the grayscale value i of each pixel in the original image to a new grayscale value int((L-1)×F(i)+0.5), thereby achieving histogram equalization and enhancing the overall contrast of the image.
[0016] Furthermore, the grayscale stretching and detail enhancement in S202 determines the range of grayscale stretching, determines the grayscale range of the original image to be [a, b], and the target stretching range to be [c, d]. For each pixel grayscale value x in the image, grayscale stretching is performed, that is, the calculation formula is: Further emphasize specific grayscale areas in the image.
[0017] Furthermore, the S200 grayscale processing takes a neighborhood window with a size of m×n as the center for each pixel in the image, calculates the grayscale average of all pixels in the window as the new grayscale value of the central pixel, and the grayscale values of the pixels in the window are g1, g2, ..., g nn, , then the new gray value of the center pixel is Use the Sobel operator to detect edges and enhance the edge parts. The Sobel operator is divided into horizontal and vertical directions, which are and For each pixel in the image, use G x and G y Perform convolution operation with its neighboring pixels to obtain the gradient components G in the horizontal and vertical directions x (p) and G y (p), then the gradient amplitude of the pixel is Pixels with larger gradient amplitudes are enhanced to highlight edge information.
[0018] Furthermore, the specific steps of the relative depth calculation in S300 are:
[0019] S301, binocular camera calibration: using feature point targets of known size and position, the binocular camera is used to photograph them respectively, and the targets are clearly captured at different angles and distances;
[0020] S302, feature point extraction and matching: on the grayscale image processed in S200, feature points in the left and right camera images are respectively extracted using a feature point detection algorithm, and matching is performed through feature descriptors to find corresponding points in the left and right images;
[0021] S303, triangulation and depth optimization: according to the coordinates of the feature point pairs and the parameters of the camera, the relative depth information of the corresponding points is calculated using the triangulation principle, and the depth optimization is performed using the image information of multiple perspectives.
[0022] Furthermore, before performing relative depth calculation, S301 calibrates the binocular cameras to determine the internal and external parameters of the two cameras. The left camera coordinate system is O1-X1Y1Z1, and the right camera coordinate system is O2-X2Y2Z2. The coordinates of the feature point in the left camera coordinate system are P1 (X1, Y1, Z1), and the coordinates in the right camera coordinate system are P2 (X2, Y2, Z2). By shooting multiple feature point targets, a series of coordinates of corresponding points in the two camera coordinate systems are obtained, and a set of equations is established to solve the internal parameters of the two cameras, namely, the focal lengths f1 and f2, the principal point coordinates C1 (x 01 ,y 01 )、C2(x 02 ,y 02 ) and external parameters, for the coordinates of the feature point in the coordinate system is P (X, Y, Z), then: Among them, (u1, v1) and (u2, v2) are the pixel coordinates of the feature points in the left and right images respectively, s1 and s2 are scale factors, and the least squares method is used to establish an overdetermined set of equations based on the known positions of the feature point targets in the world coordinate system and the corresponding image pixel coordinates. The camera parameters are obtained by minimizing the error function, that is, the difference between the actual pixel coordinates and the pixel coordinates calculated according to the camera parameters.
[0023] Furthermore, the feature point extraction and matching in S302 adopts a feature point extraction algorithm based on local grayscale changes. For each pixel in the image, the grayscale change value in a certain neighborhood around it is calculated. The grayscale value of the pixel (i, j) is I(i, j), and the size of its neighborhood is m×n. Then the grayscale change value of the pixel is: The pixel with the largest grayscale change value is taken as the feature point. For the feature points in the left and right images, the grayscale patterns of their surrounding neighborhoods are compared for matching. The grayscale pattern of the neighborhood of the feature point P1 in the left image is G1, and the grayscale pattern of the neighborhood of the feature point P2 in the right image is G2. The similarity between the two is calculated as: Among them, r and s are the ranges of neighborhood comparison. During the matching process, similar matching point pairs are preliminarily screened out according to the similarity, and incorrect matching point pairs are removed.
[0024] Furthermore, the triangulation and depth optimization in S303 calculates the relative depth information of the feature points based on the camera parameters and the triangulation principle for the known optical centers O1 and O2 of the left and right cameras and the pixel coordinates (u1, v1) and (u2, v2) of the matched feature point pairs in the left and right images. For the focal length of the left camera being f1 and the coordinates of the principal point being (x 01 ,y 01 ), the focal length of the right camera is f2, and the coordinates of the principal point are (x 02 ,y 02), the distance between the optical centers of the two cameras is B, then the depth of the feature point Wherein, d=u1-u2 is the disparity of the feature point in the left and right images. In the triangulation process, the accuracy of depth calculation and depth resolution are improved by performing triangulation on multiple feature points.
[0025] Furthermore, the S400 grayscale-relative depth fitting fuses the grayscale image processed by S200 and the relative depth information calculated by S300. For the pixel point coordinates in the grayscale image (x, y), the corresponding grayscale value is G(x, y), and the relative depth value is D(x, y). The grayscale value and the depth value are associated to form point cloud data containing grayscale and depth information, that is, the point coordinates in the point cloud data are P(x, y, D(x, y)), then the coordinates of each point in the point cloud data are P(X, Y, Z), Z is the relative depth D(x, y), and the least squares surface fitting algorithm is used to fit the point cloud data into a three-dimensional surface. For a set of point cloud data with a point coordinate of P i (X i ,Y i ,Z i ), the fitting surface equation is Z = aX 2 +bY 2 +cXY+dX+eY+f, the coefficients of the surface equation are determined by minimizing the objective function, that is, By solving the optimal coefficients a, b, c, d, e, and f, the best fitting surface can be obtained.
[0026] Compared with the prior art, the bridge welding quality detection method based on grayscale-relative depth fitting vision technology has the following beneficial effects:
[0027] 1. The present invention captures multi-dimensional images through a high-resolution camera, combined with fine grayscale processing, effectively enhancing image contrast and clarity, highlighting the key features of the welding part, and further using the binocular vision principle to perform relative depth calculation to accurately obtain the relative depth information of the welding part. It not only overcomes the problems of unstable image quality and difficulty in feature point extraction and matching in traditional methods, but also significantly improves the accuracy of three-dimensional surface construction, thereby providing a solid foundation for comprehensive and accurate evaluation of welding quality.
[0028] 2. The present invention uses grayscale-relative depth fitting technology to efficiently fuse grayscale images with relative depth information, generate point cloud data, and quickly construct a three-dimensional surface of the welding part. This process not only shortens the detection cycle, but also realizes rapid feedback on welding quality, providing strong support for real-time monitoring and efficient management of bridge construction quality.
[0029] Other advantages, objectives and features of the present invention will be set forth in part in the following description and, in part, will be apparent to those skilled in the art based on an examination of the following or may be taught from the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without creative work.
[0031] Figure 1 It is an operation flow chart of a bridge welding quality inspection method based on grayscale-relative depth fitting vision technology;
[0032] Figure 2 This is a flow chart of the steps of S300 relative depth calculation in a bridge welding quality inspection method based on grayscale-relative depth fitting vision technology. DETAILED DESCRIPTION
[0033] The technical solutions in the embodiments of the present invention are described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0034] Embodiment 1
[0035] This embodiment provides a specific implementation process of a bridge welding quality detection method based on grayscale-relative depth fitting visual technology. Multi-dimensional images are captured by a high-resolution camera, and the steps of grayscale processing, relative depth calculation, grayscale-relative depth fitting and quality detection are combined to comprehensively evaluate the bridge welding quality. This method not only improves the image contrast and clarity, but also realizes the precise construction of the three-dimensional surface of the welding part, providing a scientific basis for the detection of welding quality.
[0036] First, enter the multi-dimensional image capture stage (S100), use an industrial camera with high resolution, low noise, and high dynamic range to capture clear and delicate images of the welding parts, ensure that no details are missed, and meet the detection needs of tiny welding defects. In order to ensure the consistency of image quality, set a stable lighting environment, adjust the lighting intensity and angle according to different welding parts and environmental conditions to highlight the welding features and reduce shadows and reflections. In order to obtain more comprehensive welding part information, a multi-angle acquisition method is adopted, using multiple cameras to shoot from different angles at the same time. During the acquisition process, the position and angle information of the camera are recorded for subsequent image processing and three-dimensional model construction. The acquired images are stored in a high-quality format to retain image details.
[0037] Then, enter the grayscale processing stage (S200), by adjusting the grayscale distribution of the image, the contrast of the image is enhanced, the grayscale histogram of the image is stretched, the grayscale value is distributed more evenly in the entire grayscale range, the dark and bright details in the image are highlighted, and the readability of the image is improved. According to the specific situation of the image, the grayscale value is linearly stretched, the part with lower grayscale value is enhanced to highlight the dark defects of the welding part, and the part with higher grayscale value is compressed to reduce the influence of reflection on the image and remove the noise in the image. In order to highlight the edge information of the welding part, the edge enhancement algorithm is used for processing, the image is edge detected, and then the edge part is enhanced to improve the detection accuracy of the weld edge.
[0038] Next, the relative depth calculation stage (S300) is entered. Before performing the relative depth calculation, the binocular camera needs to be calibrated. The purpose of calibration is to determine the internal parameters (such as focal length, principal point position, etc.) and external parameters (such as the relative position and posture between the cameras) of the two cameras. A standard calibration board is used for calibration. By taking multiple calibration board images at different angles, the camera parameters are calculated using the calibration algorithm, and feature points are extracted from the left and right images to extract feature points with scale invariance and rotation invariance. The corresponding feature point pairs in the left and right images are found, and the relative depth information of the corresponding points is calculated based on the coordinates of the feature point pairs and the camera parameters using the triangulation principle. The basic principle of triangulation is to form a triangle through the optical centers of the two cameras and the corresponding points, and the depth of the corresponding points is calculated based on the geometric relationship of the triangle to improve the accuracy of the depth calculation. In order to improve the accuracy of the relative depth calculation, the depth information is optimized.
[0039] Secondly, enter the grayscale-relative depth fitting stage (S400), fuse the grayscale image and relative depth information to obtain point cloud data containing color and depth information. The specific operation is to use the grayscale value and depth value of each pixel as the coordinates and attribute information of the point cloud to generate a three-dimensional point cloud. Since there may be noise and abnormal points in the collected point cloud data, filtering and denoising are required to improve the quality of the point cloud. The surface fitting algorithm is used to fit the point cloud data into a three-dimensional surface to obtain an accurate three-dimensional model of the welding part.
[0040] Finally, the quality inspection stage (S500) is entered. By calculating the surface curvature and roughness of the three-dimensional model of the welding part, it is determined whether the surface flatness meets the requirements. The three-dimensional surface is analyzed. If the surface flatness exceeds the allowable range, it may indicate that the welding part has uneven defects. The width and depth of the weld are measured on the three-dimensional model. The width of the weld can be calculated by extracting the edge information of the weld. The depth of the weld is calculated by measuring the distance between the lowest point and the highest point of the weld. The measurement result is compared with the design requirements to determine whether the weld size meets the standard. The grayscale and depth information of the three-dimensional model is used to detect whether there are defects such as cracks and pores in the welding part. For example, cracks can be detected by analyzing color changes and depth mutations; pores can be detected by analyzing the depth anomalies in local areas. According to the results of the quality inspection, a welding quality report is generated. The report should include information on the image of the welding part, the three-dimensional surface, the inspection parameters, the inspection results and the evaluation conclusions. The quality report can provide a basis for the quality evaluation and acceptance of the bridge project, and can also provide a reference for subsequent maintenance and repair.
[0041] In summary, by implementing the bridge welding quality detection method based on grayscale-relative depth fitting visual technology described in the present invention, a comprehensive and accurate evaluation of the bridge welding quality is successfully carried out. This method not only overcomes the problems of unstable image quality and difficulty in feature point extraction and matching in traditional methods, but also significantly improves the accuracy of three-dimensional surface construction. In addition, the application of grayscale-relative depth fitting technology greatly shortens the detection cycle, realizes rapid feedback on welding quality, and provides strong support for real-time monitoring and efficient management of bridge construction quality.
[0042] Embodiment 2
[0043] This embodiment describes in detail a bridge welding quality inspection method based on grayscale-relative depth fitting visual technology, with particular emphasis on the specific implementation process of grayscale processing, relative depth calculation and grayscale-relative depth fitting. Through precise operating procedures and algorithm calculations, a three-dimensional surface of the welding part is ultimately constructed, and a comprehensive evaluation of the welding quality is performed based on this three-dimensional surface, thereby achieving accurate and efficient evaluation of the welding quality.
[0044] Firstly, a high-resolution camera is used to shoot the bridge welding parts at multiple angles and under multiple lighting conditions. During the shooting process, the direction and intensity of the light source are precisely controlled to minimize the impact of shadows and reflections on the image quality. Histogram equalization is performed to adjust the grayscale distribution of the image so that the grayscale levels of the image appear more evenly throughout the entire range. The grayscale range of the image is [0, L-1], where L is the number of grayscale levels, the total number of pixels in the image is N, and the number of pixels with grayscale level i is n. i , then the probability of gray level i appearing is The new gray value is calculated by the cumulative distribution function. Among them, k traverses the grayscale levels from 0 to i, and maps the grayscale value i of each pixel in the original image to a new grayscale value int((L-1)×F(i)+0.5), thereby realizing histogram equalization, enhancing the overall contrast of the image, and further highlighting the key features of the welding part.
[0045] Then, after completing the histogram equalization, grayscale stretching and detail enhancement were performed. In order to improve the contrast of the local area, the grayscale range of the welding area was extended to the entire available grayscale level. The grayscale range of the original image was determined to be [a, b], and the target stretching range was [c, d]. For each pixel grayscale value x in the image, grayscale stretching was performed, that is, the calculation formula is: To further highlight the specific grayscale area in the image, a neighborhood window is taken for each pixel in the image with the pixel as the center. The window size is m×n, and the grayscale average value of all pixels in the window is calculated as the new grayscale value of the central pixel. The grayscale values of the pixels in the window are g1, g2, ..., g nn, , then the new gray value of the center pixel is Use the Sobel operator to detect edges and enhance the edge parts. The Sobel operator is divided into horizontal and vertical directions, which are and For each pixel in the image, use G x and G y Perform convolution operation with its neighboring pixels to obtain the gradient components G in the horizontal and vertical directions x (p) and G y (p), then the gradient amplitude of the pixel is Pixels with larger gradient amplitudes are enhanced to highlight edge information, thereby enhancing the edge part and improving the accuracy and resolution of depth calculation.
[0046] Using the binocular vision principle, the relative depth of the welding part is calculated. First, the binocular camera is calibrated to determine the internal and external parameters of the two cameras. By shooting multiple feature point targets, the coordinates of a series of corresponding points in the two camera coordinate systems are obtained. Suppose the left camera coordinate system is O1-X1Y1Z1, the right camera coordinate system is O2-X2Y2Z2, the coordinates of the feature points in the left camera coordinate system are P1 (X1, Y1, Z1), and the coordinates in the right camera coordinate system are P2 (X2, Y2, Z2). By shooting multiple feature point targets, a series of corresponding points in the two camera coordinate systems are obtained. The internal parameters of the two cameras are solved by establishing a set of equations, namely the focal lengths f1 and f2, the principal point coordinates C1 (x 01 ,y 01 )、C2(x 02 ,y 02 ) and external parameters, for the coordinates of the feature point in the coordinate system is P (X, Y, Z), then: Among them, (u1, v1) and (u2, v2) are the pixel coordinates of the feature point in the left and right images respectively, s1 and s2 are scale factors, and the least squares method is used to establish an overdetermined set of equations based on the known position of the feature point target in the world coordinate system and the corresponding image pixel coordinates. The camera parameters are obtained by minimizing the error function, that is, the difference between the actual pixel coordinates and the pixel coordinates calculated according to the camera parameters. For each pixel in the image, the grayscale change value in a certain neighborhood around it is calculated. The grayscale value of the pixel point (i, j) is I(i, j), and its neighborhood size is m×n. Then the grayscale change value of the pixel point is: The pixel with the largest grayscale change value is taken as the feature point. For the feature points in the left and right images, the grayscale patterns of their surrounding neighborhoods are compared for matching. The grayscale pattern of the neighborhood of the feature point P1 in the left image is G1, and the grayscale pattern of the neighborhood of the feature point P2 in the right image is G2. The similarity between the two is calculated as: Among them, r and s are the ranges of neighborhood comparison. In the matching process, similar matching point pairs are preliminarily screened out according to the similarity, and the wrong matching point pairs are removed. For the known optical centers O1 and O2 of the left and right cameras, and the pixel coordinates (u1, v1) and (u2, v2) of the matching feature point pairs in the left and right images, the relative depth information of the feature points is calculated according to the camera parameters and the triangulation principle. For the focal length of the left camera is f1, the coordinates of the principal point are (x 01 ,y 01 ), the focal length of the right camera is f2, and the coordinates of the principal point are (x 02 ,y 02 ), the distance between the optical centers of the two cameras is B, then the depth of the feature point Wherein, d=u1-u2 is the disparity of the feature point in the left and right images. In the triangulation process, the accuracy of depth calculation and depth resolution are improved by performing triangulation on multiple feature points.
[0047] Finally, the processed grayscale image and the calculated relative depth information are fused. For the pixel coordinates in the grayscale image (x, y), the corresponding grayscale value is G(x, y), and the relative depth value is D(x, y). The grayscale value and the depth value are associated to form point cloud data containing grayscale and depth information. That is, the point coordinates in the point cloud data are P(x, y, D(x, y)), then the coordinates of each point in the point cloud data are P(X, Y, Z), and Z is the relative depth D(x, y). The least squares surface fitting algorithm is used to fit the point cloud data into a three-dimensional surface. For a set of point cloud data with point coordinates P i (X i ,Y i ,Z i ), the fitting surface equation is Z = aX 2 +bY 2 +cXY+dX+eY+f, the coefficients of the surface equation are determined by minimizing the objective function, that is, The optimal coefficients a, b, c, d, e, and f are obtained by solving the problem, and then the best fitting surface is obtained. This surface not only contains the geometric information of the welding part, but also reflects the grayscale distribution characteristics of its surface. Based on the constructed three-dimensional surface, the bridge welding quality is comprehensively evaluated by analyzing the surface flatness, measuring the weld width and depth, and detecting defects. By setting reasonable quality evaluation standards, a detailed quality report is automatically generated, providing a scientific basis for the safety and durability of the bridge structure.
[0048] In summary, this embodiment realizes the automated and high-precision detection of bridge welding quality through the effective combination of grayscale processing, relative depth calculation and grayscale-relative depth fitting technology. This method not only improves the detection efficiency and accuracy, but also reduces the influence of human factors, providing strong support for the quality control of bridge projects.
[0049] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
Claims
1. A bridge welding quality detection method based on grayscale-relative depth fitting visual technology, characterized in that: The bridge welding quality detection method comprises the following steps: S100, multi-dimensional image capture: using high-resolution cameras to control lighting and shoot at multiple angles, it can comprehensively capture images of bridge welding parts, providing rich raw data for subsequent inspections; S200, grayscale processing: grayscale processing operations are performed on the collected images, including histogram equalization, stretching, filtering and edge enhancement, to enhance image contrast and clarity and highlight key features; S300, relative depth calculation: using binocular vision principle, after camera calibration, feature point extraction and matching, triangulation and depth optimization, the relative depth information of the welding part can be accurately calculated; S400, grayscale-relative depth fitting: The grayscale image is fused with the relative depth information to generate point cloud data. After filtering and denoising, the three-dimensional surface of the welding part is constructed using the surface fitting algorithm; S500, quality inspection: Based on the constructed 3D surface, it comprehensively evaluates the bridge welding quality by analyzing surface flatness, measuring weld width and depth, and detecting defects, and generates a detailed quality report.
2. According to claim 1, a bridge welding quality detection method based on grayscale-relative depth fitting visual technology is characterized in that: The specific steps of the S200 grayscale processing are: S201, histogram equalization preprocessing: pre-processing the grayscale image obtained from the multi-dimensional image capture to improve the overall contrast, calculate the histogram of the grayscale image, and dynamically adjust the cumulative distribution function of the histogram according to the grayscale distribution characteristics of the welding area, so that the image maintains the detail information of the welding area while enhancing the contrast; S202, grayscale stretching and detail enhancement: After histogram equalization, the grayscale range of the welding area is expanded to the entire available grayscale level to improve the contrast of the local area.
3. According to claim 2, a bridge welding quality detection method based on grayscale-relative depth fitting visual technology is characterized in that: The histogram equalization preprocessing in S201 calculates the histogram of the collected grayscale image, that is, counts the frequency of occurrence of each grayscale level in the image. The grayscale range of the image is [0, L-1], where L is the number of grayscale levels, the total number of pixels in the image is N, and the number of pixels with grayscale level i is n i , then the probability of gray level i appearing is The new gray value is calculated by the cumulative distribution function. Here, k traverses the grayscale levels from 0 to i, and maps the grayscale value i of each pixel in the original image to a new grayscale value int((L-1)×F(i)+0.5), thereby achieving histogram equalization and enhancing the overall contrast of the image.
4. According to claim 2, a bridge welding quality detection method based on grayscale-relative depth fitting visual technology is characterized in that: The grayscale stretching and detail enhancement in S202 determines the range of grayscale stretching, determines the grayscale range of the original image to be [a, b], and the target stretching range to be [c, d]. For each pixel grayscale value x in the image, grayscale stretching is performed, that is, the calculation formula is: Further emphasize specific grayscale areas in the image.
5. According to claim 2, a bridge welding quality detection method based on grayscale-relative depth fitting visual technology is characterized in that: The S200 grayscale processing takes a neighborhood window with a size of m×n as the center for each pixel in the image, calculates the grayscale average of all pixels in the window as the new grayscale value of the central pixel, and the grayscale values of the pixels in the window are g1, g2, ..., g nn, , then the new gray value of the center pixel is Use the Sobel operator to detect edges and enhance the edge parts. The Sobel operator is divided into horizontal and vertical directions, which are and For each pixel in the image, use G x and G y Perform convolution operation with its neighboring pixels to obtain the gradient components G in the horizontal and vertical directions x (p) and G y (p), then the gradient amplitude of the pixel is Pixels with larger gradient amplitudes are enhanced to highlight edge information.
6. According to claim 1, a bridge welding quality detection method based on grayscale-relative depth fitting visual technology is characterized in that: The specific steps of the relative depth calculation in S300 are: S301, binocular camera calibration: using feature point targets of known size and position, the binocular camera is used to photograph them respectively, and the targets are clearly captured at different angles and distances; S302, feature point extraction and matching: on the grayscale image processed in S200, feature points in the left and right camera images are respectively extracted using a feature point detection algorithm, and matching is performed through feature descriptors to find corresponding points in the left and right images; S303, triangulation and depth optimization: according to the coordinates of the feature point pairs and the parameters of the camera, the relative depth information of the corresponding points is calculated using the triangulation principle, and the depth optimization is performed using the image information of multiple perspectives.
7. The bridge welding quality detection method based on grayscale-relative depth fitting visual technology according to claim 6 is characterized in that: Before performing relative depth calculation, S301 calibrates the binocular cameras to determine the internal and external parameters of the two cameras. The left camera coordinate system is O1-X1Y1Z1, and the right camera coordinate system is O2-X2Y2Z2. The coordinates of the feature point in the left camera coordinate system are P1 (X1, Y1, Z1), and the coordinates in the right camera coordinate system are P2 (X2, Y2, Z2). By shooting multiple feature point targets, a series of coordinates of corresponding points in the two camera coordinate systems are obtained, and a set of equations is established to solve the internal parameters of the two cameras, namely, the focal lengths f1 and f2, the principal point coordinates C1 (x 01 ,y 01 )、C2(x 02 ,y 02 ) and external parameters, for the coordinates of the feature point in the coordinate system is P (X, Y, Z), then: Among them, (u1, v1) and (u2, v2) are the pixel coordinates of the feature points in the left and right images respectively, s1 and s2 are scale factors, and the least squares method is used to establish an overdetermined set of equations based on the known positions of the feature point targets in the world coordinate system and the corresponding image pixel coordinates. The camera parameters are obtained by minimizing the error function, that is, the difference between the actual pixel coordinates and the pixel coordinates calculated according to the camera parameters.
8. The bridge welding quality detection method based on grayscale-relative depth fitting visual technology according to claim 6 is characterized in that: The feature point extraction and matching in S302 adopts a feature point extraction algorithm based on local grayscale changes. For each pixel in the image, the grayscale change value in a certain neighborhood around it is calculated. The grayscale value of the pixel (i, j) is I(i, j), and the size of its neighborhood is m×n. Then the grayscale change value of the pixel is: The pixel with the largest grayscale change value is taken as the feature point. For the feature points in the left and right images, the grayscale patterns of their surrounding neighborhoods are compared for matching. The grayscale pattern of the neighborhood of the feature point P1 in the left image is G1, and the grayscale pattern of the neighborhood of the feature point P2 in the right image is G2. The similarity between the two is calculated as: Among them, r and s are the ranges of neighborhood comparison. During the matching process, similar matching point pairs are preliminarily screened out according to the similarity, and incorrect matching point pairs are removed.
9. The bridge welding quality detection method based on grayscale-relative depth fitting visual technology according to claim 6 is characterized in that: The S303 triangulation and depth optimization is for the known optical centers O1 and O2 of the left and right cameras, and the pixel coordinates (u1, v1) and (u2, v2) of the matched feature point pairs in the left and right images, and the relative depth information of the feature points is calculated according to the camera parameters and the triangulation principle. For the focal length of the left camera is f1, the coordinates of the principal point are (x 01 ,y 01 ), the focal length of the right camera is f2, and the coordinates of the principal point are (x 02 ,y 02 ), the distance between the optical centers of the two cameras is B, then the depth of the feature point Wherein, d=u1-u2 is the disparity of the feature point in the left and right images. In the triangulation process, the accuracy of depth calculation and depth resolution are improved by performing triangulation on multiple feature points.
10. The bridge welding quality detection method based on grayscale-relative depth fitting visual technology according to claim 1 is characterized in that: The S400 grayscale-relative depth fitting fuses the grayscale image processed by S200 and the relative depth information calculated by S300. For the pixel point coordinates in the grayscale image (x, y), the corresponding grayscale value is G(x, y), and the relative depth value is D(x, y). The grayscale value and the depth value are associated to form point cloud data containing grayscale and depth information. That is, the point coordinates in the point cloud data are P(x, y, D(x, y)), then the coordinates of each point in the point cloud data are P(X, Y, Z), and Z is the relative depth D(x, y). The least squares surface fitting algorithm is used to fit the point cloud data into a three-dimensional surface. For a set of point cloud data with a point coordinate of P i (X i ,Y i ,Z i ), the fitting surface equation is Z = aX 2 +bY 2 +cXY+dX+eY+f, the coefficients of the surface equation are determined by minimizing the objective function, that is, By solving the optimal coefficients a, b, c, d, e, and f, the best fitting surface can be obtained.
Citation Information
Cited By
Light alloy casting flaw detection shooting, evaluation and positioning marking full-process detection method
CN119643602A
2.5 D imaging and AI combined safety buckle full-appearance visual detection method and system
CN119715569A
Cover plate welding seam fusion width measuring method and device based on ultrasonic image
CN120254050A
Method and device for measuring the width of a cap weld based on an ultrasonic image
CN120254050B
Method for detecting welding position of axle workpiece
CN120333303A
