Hollow precast pile welding crack measurement method and terminal based on ai machine vision

CN122901206APending Publication Date: 2026-10-13CHANGZHOU ARCHITECTUAL RES INST GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611392796.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-09
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0007]本发明要解决的技术问题是:针对现有空心预制桩焊接接头孔内检测技术所存在的检测效率低下、主观误差显著、定量精度不足、终端智能化程度低、无法现场出结果以及姿态校正缺失等技术缺陷,本发明提供一种基于AI机器视觉的空心预制桩焊接裂缝测量方法及终端,旨在实现焊接接头裂缝的自动化、高精度、定量化检测与现场即时评定

Benefits of technology

(1)检测效率大幅提升,结果客观一致

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122901206A_ABST
    Figure CN122901206A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on AI machine vision's hollow precast pile welding crack measurement method and terminal, belong to pile foundation engineering nondestructive testing technical field.Method includes: system calibration;FPGA synchronous acquisition panoramic image, four-way laser ranging, IMU attitude and depth data;Two-stage cascaded AI locates weld and divides crack, and pseudo-defect is removed by connected domain multi-threshold screening;S4Zernike matrix subpixel extraction edge, combined with laser ranging real-time solution eccentric parameter and equivalent internal diameter, fusion IMU attitude angle is carried out to tilt correction and local point-by-point scale correction;Calculate crack width, length, ring proportion and depth and correct error.Terminal uses four-level hardware architecture, and all algorithms are deployed in edge computing unit.The application proposes four-way laser ranging and IMU attitude double-constraint scale correction model, realizes 0.1mm level crack high-precision measurement and 5 minutes report on site, and is superior to specification ±10% accuracy requirement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of non-destructive testing technology for pile foundation engineering, and in particular to a method and terminal for measuring welding cracks in hollow precast piles based on AI machine vision. Background Technology

[0002] Prestressed concrete hollow precast piles are one of the most widely used pile types in my country's building foundation engineering, with an annual application exceeding 300 million meters. They are widely used in industrial plants, high-rise residential buildings, municipal bridges, and port projects. Pile splicing is the core process in precast pile construction. Currently, over 90% of on-site pile splicing uses steel end plate welding technology. The quality of the welded joint directly determines the vertical bearing capacity and horizontal load resistance of the pile. According to the "Technical Specification for Testing Building Foundation Piles" (JGJ 106-2014), pile integrity testing is a mandatory acceptance inspection item, and welded joint cracks are one of the main causes of cracks in Class II, III, and IV piles.

[0003] Currently, the internal quality inspection of welded joints in hollow precast piles mainly relies on in-hole optical imaging, a branch of borehole television technology. Traditional in-hole imaging systems consist of three parts: a downhole probe, a depth encoder, and a surface-based main unit. Some simpler devices use a lowered panoramic probe to acquire images of the pile's inner wall, which are then manually interpreted frame by frame by inspectors to mark crack locations and estimate dimensions. This technical approach suffers from the following four major drawbacks: I. Low detection efficiency and significant subjective errors: manual interpretation is slow, requiring a long time for a single long pile, resulting in high labor costs and long cycles; the detection results are highly dependent on personnel experience, with a high rate of missed detection for microcracks less than 0.5mm in width, and the size estimation deviations of different inspectors are extremely large, resulting in poor consistency and failing to meet the timeliness and quality requirements of large-scale engineering inspections.

[0004] Second, insufficient quantitative accuracy and lack of absolute dimensional benchmarks: Traditional borehole imaging often uses the designed pile diameter as the sole benchmark for dimensional conversion, estimating the actual size through the pixel circumferential ratio. However, in actual engineering, there are manufacturing tolerances and laitance on the inner wall of the pile, and the probe inevitably becomes eccentric and tilted inside the borehole, resulting in uneven scale at different locations in the image. An eccentricity of 10mm can introduce more than 15% dimensional error, making it difficult to meet the accuracy requirement of "defect width error ≤10% (width ≥2mm)" in the "Standard for Borehole Imaging Inspection of Foundations". The error is even greater in the detection of microcracks.

[0005] Third, the terminal has a low level of intelligence and cannot produce results on site: the existing in-hole imaging equipment only has the functions of image acquisition, storage and playback, and has no edge artificial intelligence computing capabilities. All identification and measurement work must be completed in the office, and the quality of the joint cannot be determined on site in real time; in addition, there is a lack of dedicated identification algorithms for welded circumferential seams, which cannot automatically distinguish between normal weld texture, weld slag, porosity, rust and structural cracks, resulting in a high misjudgment rate.

[0006] IV. Lack of attitude correction and weak environmental adaptability: Most devices do not integrate high-precision attitude sensors, making it impossible to correct image distortion and dimensional deviation caused by probe roll and pitch; the illumination inside the hole is not adjustable, resulting in poor imaging quality and low effective detection rate under humid, condensation, and slightly floating conditions. Summary of the Invention

[0007] The technical problem to be solved by this invention is: addressing the technical defects of existing hollow precast pile welded joint hole detection technology, such as low detection efficiency, significant subjective error, insufficient quantitative accuracy, low terminal intelligence, inability to produce results on site, and lack of posture correction. This invention provides a hollow precast pile welded crack measurement method and terminal based on AI machine vision, aiming to achieve automated, high-precision, quantitative detection and on-site real-time evaluation of welded joint cracks.

[0008] The technical solution adopted by this invention to solve its technical problem is as follows: This invention provides a method for measuring welding cracks in hollow precast piles based on AI machine vision, comprising the following steps: S1: System calibration and testing preparation, including in-camera distortion calibration, laser ranging unit calibration, attitude sensor calibration, multi-sensor spatial calibration, and overall system accuracy verification; S2: Synchronous acquisition of multi-source data within the borehole. The probe is lowered along the axis of the pile hole by a servo winch mechanism. A hardware synchronous triggering system is built with FPGA as the core to synchronously acquire circumferential panoramic image sequences, laser ranging sequences, and attitude and depth sequences. Adaptive supplementary lighting control ensures stable illumination on the borehole wall. During the detection process, steps S2 to S5 are executed cyclically until the probe reaches the designed depth at the bottom of the pile, at which point the full borehole scan is considered complete. S3: AI-powered intelligent localization and crack segmentation of weld seam areas employs a cascaded AI processing architecture. This includes first performing coarse localization of the weld seam area using a target detection network, then performing pixel-level fine segmentation of cracks within the weld seam area using a semantic segmentation network, and eliminating false defect connected components through connected component labeling and joint filtering using multiple thresholds, outputting a pixel-level mask of the remaining crack connected components after filtering; if no valid cracks are detected, the probe is then deployed to perform detection of subsequent regions. S4: Subpixel edge extraction and multi-constraint scale correction. Based on the pixel-level mask of the crack connected domain retained after screening, the subpixel precision edge points on both sides of the crack are extracted. The probe eccentricity parameters and the equivalent inner diameter of the current cross section are solved in real time according to the synchronously acquired laser ranging values. The probe attitude angle obtained by the IMU is combined to perform tilt correction. The global scale factor is calculated and local point-by-point scale correction is performed to establish a precise mapping from pixel coordinates to physical size. S5: Quantitative calculation and error correction of crack parameters. Based on the sub-pixel edge coordinates and the corrected local scale factor, calculate the geometric parameters of the crack and perform systematic error correction. After the crack parameter calculation is completed, if it is determined to be a suspicious or key area, perform close-range retest verification. S6: Output and Report Generation. After the full well inspection is completed, the full well data is spliced ​​and summarized to generate an inspection report and supporting data files.

[0009] In step S1: (1) The distortion calibration in the camera is performed using Zhang's calibration method. After calibration, a mapping lookup table between pixel coordinates and distortion correction coordinates is established for real-time image correction during the detection process. (2) The laser ranging unit is calibrated by building a calibration platform using first-level standard blocks, and calibration is performed at multiple standard distance points. The zero-point deviation and proportional correction coefficient of each ranging channel are obtained by linear fitting using the least squares method. (3) The attitude sensor calibration is performed using a hexahedral high-precision turntable to correct the zero bias, scaling factor and non-orthogonal error of the accelerometer and gyroscope. (4) Multi-sensor spatial calibration includes: completing the extrinsic parameter calibration of the camera and the four-way laser rangefinder, obtaining the direction vector and optical center offset of each rangefinder beam in the camera coordinate system; and completing the time offset calibration of the IMU and the camera. (5) The overall accuracy of the system is verified by repeatedly measuring the annular simulated defects of various widths using a standard calibration tube. When the relative error of the width measurement of all specifications of defects and the standard deviation of repeated measurements meet the preset threshold, the calibration is deemed qualified.

[0010] In step S2: (1) The circumferential panoramic image sequence is acquired using a 360° reflex panoramic lens with a global shutter CMOS image sensor. The acquisition frame rate is adaptively adjusted according to the downscaling speed to ensure that the axial overlap of two adjacent frames is ≥70% and the optical resolution of the aperture wall imaging is ≥25pix / cm. (2) The laser ranging sequence is acquired by four TOF laser ranging sensors evenly arranged at 0°, 90°, 180° and 270° along the circumference of the probe. Each frame of the image corresponds to multiple sets of ranging data, and the image timestamp is matched by time interpolation. (3) Attitude and depth sequences are acquired by a six-axis MEMS IMU and a draw-wire photoelectric depth encoder. Depth data and IMU data are fused by Kalman filtering. (4) Adaptive lighting control is performed by a ring LED light source. The system uses a PID control algorithm to adjust the LED driving current in real time based on the average gray value of the previous frame image.

[0011] In step S3, the cascaded AI processing architecture specifically includes: (1) Coarse localization of weld area: An improved lightweight YOLOv8-nano target detection network is adopted, and special optimization is performed on the long strip shape feature of the circumferential weld, including: re-performing k-means clustering based on the training set to generate multiple sets of anchor boxes; adding a small target detection head to the Neck module; introducing the CBAM attention mechanism into the backbone network; adopting the SIoU bounding box loss function; the network outputs the pixel coordinates of the weld bounding box, and the depth range of the weld is obtained by combining the depth data mapping. (2) Fine segmentation of cracks: The ROI image of the weld area is cropped according to the weld boundary box. The lightweight DeepLabV3+ semantic segmentation network is used to extract the cracks at the pixel level. MobileNetV2 is used as the feature extraction backbone. Grouped convolution is used in the ASPP module. Edge supervision loss is introduced at the decoding end. The network output is a binary mask image of cracks with the same size as the original image. (3) Connected component screening and pseudo-defect removal: The binary mask image of the crack is marked with 8 neighbor connected components. The area, aspect ratio, circularity and gray mean variance of each connected component are extracted. Pseudo-defects are removed by multi-threshold joint screening. The area retained after screening is determined as the crack connected component retained after screening. Its pixel-level mask, bounding rectangle and corresponding depth position are output.

[0012] In step S4, the Zernike moment algorithm with a 7×7 template is used to extract edge points with sub-pixel accuracy; multi-constraint scale correction is performed based on the laser ranging value and the IMU attitude angle, specifically including: (1) Eccentricity parameter solution: Let the circumferential angles corresponding to the four ranging channels be 0°, 90°, 180°, and 270°, and the corresponding ranging values ​​be... Then the eccentricity component of the probe center relative to the pile hole center is: The magnitude of the eccentricity and the eccentricity azimuth are: In the formula, This is the horizontal eccentricity component. This represents the vertical eccentricity component. For the total eccentricity, The azimuth angle is the direction of the eccentricity. (2) Calculation of equivalent inner diameter: the equivalent actual inner diameter of the current section This value reflects the true inner diameter of the current cross-section of the pile hole and does not depend on the design value; (3) Tilt correction and global scale factor calculation: The roll angle of the probe is obtained through IMU. Using the pitch angle β, a rotation matrix is ​​constructed to perform tilt correction on the imaging plane, and a circumferential global scale factor is applied. Axial global scale factor ,in This represents the total number of pixels in the circumferential direction of the panoramic image. This represents the total number of pixels along the axis. , The camera's axial field of view; (4) Local scale point-by-point correction: For any point on the crack, its column coordinates in the image correspond to the circumferential azimuth angle. Then the actual radial distance from the probe to the borehole wall at that point is Corrected local scale factor By correcting point by point, the dimensional calculation error at different positions in the circumference can be controlled within 1%.

[0013] In step S5, the quantitative calculation of crack parameters includes: extracting the crack centerline with a single pixel width using the Zhang-Suen skeleton extraction algorithm; calculating the tangent direction for each point on the centerline, with its perpendicular direction being the crack normal; searching for matching sub-pixel edge points on both sides along the normal; for each normal cross section, calculating the Euclidean pixel distance between the paired sub-pixel edge points on both sides, multiplying it by the local scale factor of that point to obtain the actual crack width of that cross section; traversing all normal cross sections, taking the maximum width as the maximum crack width; taking the arithmetic mean of the widths of all cross sections as the average crack width; and using the 3σ criterion to remove outliers in width; based on the sub-pixel discrete points of the crack centerline, calculating the actual spatial length of the crack through piecewise arc length integration; calculating the circumferential proportion of the crack based on the circumferential azimuth angle of the crack start and end points; calibrating the depth position of the crack in conjunction with depth encoder data; and introducing lens distortion correction coefficients and system zero-point error for system error correction.

[0014] This invention provides an intelligent terminal for measuring welding cracks in hollow precast piles based on AI machine vision, comprising: The in-hole detection unit is a waterproof detection probe that integrates a panoramic imaging module, a ring-shaped supplementary lighting module, a laser ranging module, an attitude sensing module, and a depth measurement interface. The multi-source synchronous acquisition unit, with FPGA as the main control core, is responsible for the synchronous triggering and data encapsulation and transmission of multiple sensors; The edge computing processing unit is deployed in the ground control box and adopts an embedded AI computing platform. It has built-in weld positioning module, crack segmentation module, sub-pixel extraction module, scale correction module and parameter calculation module to realize the real-time processing of steps S3 to S5 in the method of the present invention. The terminal main control unit is used for parameter setting, real-time preview, device control, data storage, and report generation.

[0015] In the in-hole detection unit: the panoramic imaging module adopts a 360° catadioptric panoramic lens, paired with a global shutter CMOS photosensitive element, and a band-blocking filter is mounted at the front end; the laser ranging module has 4 TOF laser ranging sensors distributed along the circumference; the attitude sensing module integrates a six-axis MEMS IMU chip; and the depth measurement interface is externally connected to a pull-wire photoelectric depth encoder.

[0016] The multi-source synchronous acquisition unit uses an FPGA as the main control core to generate a master clock and output trigger signals from each sensor through frequency division, thereby achieving time synchronization between camera triggering, laser ranging, and IMU sampling; it also encapsulates image data, ranging data, IMU data, and depth data into a standard data frame and binds it with a timestamp. The edge computing processing unit adopts an embedded AI computing platform, equipped with the Ubuntu operating system and the TensorRT inference acceleration framework; the weld seam positioning module deploys an improved lightweight YOLOv8-nano model, the crack segmentation module deploys a lightweight DeepLabV3+ model, the sub-pixel extraction module is based on the Zernike moment algorithm, the scale correction module integrates laser ranging data and attitude data to perform eccentricity calculation, tilt correction and scale factor solution, and the parameter calculation module automatically calculates all parameters of the crack and performs error correction and outlier removal.

[0017] It also includes a calibration unit, which consists of a standard calibration cylinder and calibration software: the standard calibration cylinder has a variety of inner diameter specifications, and each cylinder has multiple annular standard cracks machined on its inner wall; the calibration software has a built-in calibration program, automatically collects standard defect data, calculates system errors, generates calibration coefficients and writes them to the terminal, and outputs a calibration report.

[0018] Compared with the prior art, the present invention has the following significant advantages: (1) Detection efficiency has been greatly improved and the results are objective and consistent. The two-level AI algorithm automatically completes weld location and crack identification, replacing manual frame-by-frame interpretation. This significantly reduces the workload of single-pile inspection and improves overall inspection efficiency. AI recognition is not affected by human experience, resulting in a significant decrease in the rate of missed crack detection and a small deviation in the consistency of inspection results, thus completely solving the efficiency and subjectivity problems of manual interpretation.

[0019] (2) The quantitative accuracy is significantly improved, exceeding the standard requirements. Employing a dual-constraint scale correction model combining laser ranging and IMU attitude, the probe eccentricity and tilt errors are corrected in real time. Combined with Zernike moment sub-pixel edge extraction, the accuracy reaches 0.04 pixels. The relative error of crack width measurement is better than the ±10% accuracy requirement of the "Standard for In-hole Imaging Inspection of Foundations". It can stably identify micro-cracks at the 0.1mm level, meeting the inspection needs of high-standard projects.

[0020] (3) Real-time processing at the edge, with immediate results on-site. All algorithms are deployed on embedded edge computing units, enabling real-time identification and measurement during the inspection process. A standardized inspection report can be generated within 5 minutes after the full hole scan is completed, eliminating the need for subsequent internal processing, significantly shortening the inspection cycle, and facilitating on-site immediate assessment of joint quality and guidance for construction.

[0021] (4) Strong scene adaptability and high environmental robustness The AI ​​algorithm is specifically optimized for welded joints, which can effectively distinguish weld texture, slag, porosity, rust and structural cracks; the adaptive lighting system is adapted to various working conditions such as dry holes, wet holes and light laitance, with a high effective detection rate; it supports various types of hollow precast piles with various inner diameters, covering the vast majority of engineering application scenarios.

[0022] (5) Results are standardized and compliant, and data is traceable. The testing process, performance indicators, and report format fully comply with the requirements of the "Standard for In-hole Imaging Testing of Foundations". The test results can be directly used for project quality acceptance and pile integrity assessment. The original data of the entire process is automatically archived, supporting full traceability and meeting the requirements of project quality management.

[0023] (6) Overall costs are significantly reduced The integrated terminal has a high degree of integration and does not require additional supporting workstations; automated testing reduces manual input and significantly lowers the labor cost of testing a single pile; the equipment can be reused, and the overall testing cost is far lower than that of traditional manual solutions. Attached Figure Description

[0024] Figure 1 This is a simplified flowchart of the method for measuring welding cracks in hollow precast piles according to the present invention.

[0025] Figure 2 This is a flowchart of step S3.

[0026] Figure 3 This is the flowchart for step S4.

[0027] Figure 4 This is the flowchart for step S5.

[0028] Figure 5 This is an architecture diagram of the intelligent terminal for measuring welding cracks in hollow precast piles according to the present invention. Detailed Implementation

[0029] The present invention will now be described in further detail with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustrative and explanatory purposes only and are not intended to limit the scope of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention. The principles and features of the present invention are described below with reference to the accompanying drawings; the examples given are for illustrative purposes only and are not intended to limit the scope of the invention.

[0030] like Figure 1 As shown, the AI ​​machine vision-based method for measuring welding cracks in hollow precast piles provided by this invention follows a technical route of "multi-source synchronous acquisition - AI intelligent recognition - multi-constraint scale correction - high-precision quantitative calculation - compliant result output", specifically including six steps from S1 to S6. Figure 1 The following is a simplified flowchart of the intelligent measurement process for weld cracks (S1-S6). The specific implementation methods for each step are described in detail below with reference to the above-mentioned attached diagram.

[0031] Step S1, System Calibration and Testing Preparation: This step consists of two parts: laboratory calibration and on-site preparation, to ensure that the system measurement accuracy meets the specifications.

[0032] 1. Laboratory / Factory Calibration (1) Camera intrinsic parameter distortion calibration: A 12×9 checkerboard calibration board with a grid size of 5mm was used. At least 20 sets of calibration images with different poses were collected, and the camera intrinsic parameter matrix was solved using Zhang's calibration method. Radial distortion coefficient With tangential distortion coefficient After calibration, reprojection error verification is performed. The average reprojection error of the entire field of view is ≤0.05 pixels, and the reprojection error of the edge area within 100 pixels from the four edges of the image is ≤0.08 pixels. If the above indicators are met, the calibration is deemed qualified. After calibration, a mapping lookup table between pixel coordinates and distortion correction coordinates is established for real-time image correction during the detection process.

[0033] (2) Calibration of laser ranging unit: A calibration platform was built using first-level standard blocks. Calibration was performed at 9 standard distance points: 100mm, 150mm, 200mm, 250mm, 300mm, 350mm, 400mm, 450mm, and 500mm. No less than 1,000 sets of data were collected at each point. Linear fitting was performed using the least squares method to obtain the zero-point deviation and proportional correction coefficient of each ranging channel. After calibration, the full-range ranging error was ≤ ±1mm, and the repeatability accuracy was ≤ 0.3mm.

[0034] (3) Attitude sensor calibration: a six-sided high-precision turntable is used for six-sided calibration to correct the zero bias, scale factor and non-orthogonal error of the accelerometer and gyroscope; after calibration, the static attitude angle measurement error is ≤ ±0.1° and the dynamic angle error is ≤ ±0.3° / s.

[0035] (4) Multi-sensor spatial calibration: Complete the external parameter calibration of the camera and the 4-channel laser rangefinder, obtain the direction vector and optical center offset of each rangefinder beam in the camera coordinate system, and the calibration spatial error is ≤0.1mm; complete the time offset calibration of the IMU and the camera, and the data synchronization error is ≤10μs.

[0036] (5) System overall accuracy verification: Using a standard calibration cylinder with an inner diameter tolerance of ±0.05mm, perform 10 repeated measurements on four types of annular simulated defects with widths of 0.5mm, 1mm, 2mm and 5mm. When the relative error of the width measurement of all specifications of defects is ≤5% and the standard deviation of repeated measurement is ≤0.03mm, the calibration is deemed qualified; otherwise, the calibration process is repeated.

[0037] 2. On-site preparation (1) Hole wall cleaning: High-pressure water flushing is preferred, with water pressure controlled between 0.5MPa and 2.0MPa. The hole wall is flushed from bottom to top, and the cleaning depth exceeds the detection depth by more than 0.5m. For firmly attached debris, a contact brush head is used for cleaning. After cleaning, the turbid water in the hole is replaced with clean water. After cleaning, the hole wall is confirmed to be free of large-area obstruction and the imaging clarity meets the detection requirements by pre-acquiring images.

[0038] (2) Parameter input: Enter basic parameters such as project name, pile number, pile type, design inner diameter, design pile length, joint design depth, testing standard, testing unit, and testing personnel in the terminal main control unit; the system will automatically match the initial testing parameters corresponding to the pile diameter.

[0039] (3) Equipment debugging: When powered on, perform a full module self-test, and check the status of the imaging module, ranging module, attitude module, depth module, storage module and power supply module in sequence; confirm that the remaining battery power is ≥80% and the storage space is ≥10GB; perform probe zero-position calibration and confirm that the depth count is 0; test the stability of the hoisting mechanism's lifting speed, and the speed fluctuation is ≤±5%.

[0040] In step S1, after the overall system accuracy verification is completed, if the relative error of the width measurement and the standard deviation of repeated measurements of all specification defects meet the preset threshold, the calibration is deemed qualified and the process proceeds to step S2 to perform on-site testing. If the preset threshold is not met, the calibration is deemed unqualified and all or part of the processes of camera calibration, laser ranging calibration, attitude calibration and multi-sensor spatial calibration must be re-executed until the calibration is qualified before the on-site testing stage can be entered.

[0041] Step S2: Synchronous acquisition of multi-source data within the borehole: A servo winch mechanism controls the probe to descend at a constant speed along the axis of the pile hole, employing a top-down continuous scanning mode. A hardware synchronization triggering system is built around an FPGA to generate a unified master clock signal, which is then output to the camera, laser rangefinder, IMU, and depth encoder via frequency-divided trigger signals, achieving microsecond-level time synchronization. All data frames are bound with high-precision timestamps and transmitted in real-time to the edge computing unit via armored coaxial cables. The data source and technical requirements for synchronous acquisition are as follows: 1. Circular panoramic image sequence: Utilizing a 360° reflex panoramic lens paired with... The 1.5-inch global shutter CMOS image sensor has 8 million effective pixels and outputs an image resolution of 3200×1800 pixels. The acquisition frame rate is adaptively adjusted according to the downslope speed. The frame rate is 5fps at a downslope speed of 0.1m / s, ensuring that the axial overlap between two adjacent frames is ≥70%. The aperture wall imaging optical resolution is ≥25pix / cm, meeting the minimum requirement of 20pix / cm in the specification.

[0042] 2. Four-way laser ranging sequence: Four 905nm TOF laser ranging sensors are evenly arranged along the probe circumference at 0°, 90°, 180°, and 270°, with a beam divergence angle ≤0.5mrad and a sampling frequency of 50Hz; five sets of ranging data are collected for each frame of image, and the image timestamp is matched by time interpolation; the measurement range covers 100~500mm, the ranging accuracy is ±1mm, and the repeatability is 0.3mm.

[0043] 3. Attitude and Depth Sequence: Integrated six-axis MEMS IMU with an accelerometer range of ±16g, a gyroscope range of ±2000° / s, and a sampling frequency of 200Hz; adopts a drawstring photoelectric depth encoder with a resolution of 0.1mm and a relative depth measurement error of ≤1% of the detected depth; depth data and IMU data are fused through Kalman filtering to improve the dynamic accuracy and anti-interference capability of depth measurement.

[0044] 4. Adaptive lighting control: The ring light source consists of 24 high color rendering index LEDs, with illuminance continuously adjustable from 0 to 500 lx. The system uses a PID control algorithm to adjust the LED drive current in real time based on the average gray value of the previous frame image, ensuring that the average illuminance on the hole wall surface is stable between 150 and 200 lx, with an illuminance uniformity deviation of ≤20%, avoiding local overexposure or underexposure.

[0045] In step S2, the probe continuously scans from top to bottom under the drive of the servo winch mechanism. During the scanning process, steps S2 to S5 are executed cyclically. After completing the acquisition, identification, measurement, and evaluation of each depth interval, the system determines whether the probe has reached the designed depth of the pile bottom. If it has not reached the pile bottom, the probe continues to be lowered to perform the detection of the next depth interval. If it has reached the designed depth of the pile bottom, the full hole scan is determined to be complete, and the system automatically exits the acquisition mode and proceeds to step S6.

[0046] Step S3: AI-powered intelligent positioning and crack segmentation of weld seam area: like Figure 2 As shown, this step adopts a two-stage cascaded AI processing architecture of "coarse localization - fine segmentation - post-screening". All algorithm models are deployed on the edge computing unit after TensorRT INT8 quantization to achieve end-to-end real-time processing. The specific process is as follows: 1. Coarse positioning of the weld area An improved, lightweight YOLOv8-nano target detection network was adopted, and specific optimizations were performed for the elongated shape characteristics of circumferential welds. (1) Anchor frame optimization: k-means clustering was performed again based on the training set to generate 6 anchor frames. Two new slender anchor frames with aspect ratios of 12:1 and 15:1 were added to adapt to the morphological characteristics of the circumferential fine weld. (2) Network structure improvement: A small target detection head is added to the Neck module to integrate shallow detail features and deep semantic features to improve the detection recall rate of long-distance and fine welds; the CBAM attention mechanism is introduced into the backbone network to strengthen the extraction weight of weld features; (3) Loss function optimization: SIoU bounding box loss function is adopted, and an angle penalty term is introduced to improve the bounding box positioning accuracy of long targets; (4) Training and Performance: The training dataset covers various pile diameters from PHC300 to PHC600, including various working conditions such as dry holes, wet holes, light laitance, and rust, with a total sample size of ≥25,000 images. Data augmentation strategies such as Mosaic, MixUp, and random rotation are adopted. After training, the weld detection accuracy is ≥99.2%, the recall rate is ≥98.8%, and the single-frame inference time is ≤12ms. The network outputs the pixel coordinates of the upper left and lower right corners of the weld bounding box, and the depth range of the weld is obtained by combining the depth data mapping.

[0047] 2. Fine segmentation of cracks The weld region ROI image is cropped based on the weld seam bounding box, and pixel-level crack extraction is performed using a lightweight DeepLabV3+ semantic segmentation network. (1) Lightweight backbone network: MobileNetV2 is used as the feature extraction backbone, standard convolution is replaced with depthwise separable convolution, and grouped convolution is used in the ASPP module to compress the number of model parameters to 28% of the original model; (2) Edge optimization: An edge supervision loss is introduced at the decoding end to enhance the segmentation accuracy of crack edges and reduce the missegmentation rate of edge pixels; (3) Training strategy: The training set includes positive and negative samples such as normal welds, porosity, slag, rust, and cracks, with pixel-level annotation accuracy reaching sub-pixel level; the class balance loss function is used to solve the sample imbalance problem where the crack pixel ratio is low. (4) Performance indicators: Crack segmentation Intersection over Union (IoU) ≥ 0.93, edge pixel segmentation error ≤ 1 pixel, single ROI inference time ≤ 8ms. The network outputs a binary mask image of cracks with the same size as the original image, with crack pixel value of 1 and background pixel value of 0.

[0048] 3. Connectivity Component Filtering and False Defect Removal The binary mask image of the crack is labeled with 8-neighbor connected components. Four types of geometric and gray-level features are extracted for each connected component: area, aspect ratio, circularity, and gray-level mean and variance. False defects are eliminated through multi-threshold joint screening. (1) Area threshold: Remove tiny connected regions with a pixel area < 15 to eliminate salt and pepper noise in the image; (2) Aspect Ratio Threshold: Eliminate connected components with an aspect ratio < 2.5, and exclude near-circular defects such as point pores and welding slag; (3) Circularity threshold: Connected components with a circularity > 0.65 are removed. The formula for calculating circularity is as follows: , where A is the area of ​​the connected region and P is the perimeter of the connected region; (4) Gray-scale variance threshold: A gray-scale profile with a width of 7 pixels is extracted along the normal of each point in the connected region. The variance of gray-scale values ​​within the profile is calculated, and connected regions with a normal gray-scale variance < 300 are eliminated to remove low-contrast pseudo-defects such as scratches and stains. This threshold is determined by statistical calibration of standard samples using a standard calibration tube. The factory default value is 300, and it can be adjusted in the range of 200 to 500 on-site according to the actual imaging illumination of the hole wall and the background contrast. The area retained after screening is determined as the crack connected region retained after screening, and its pixel-level mask, bounding rectangle, and corresponding depth position are output.

[0049] After completing the connected component screening and false defect removal, if there is a connected component that satisfies all four threshold conditions, it is determined that a valid crack has been detected. The pixel-level mask, bounding rectangle, and corresponding depth position of the crack connected component are used as the input for step S4. If there is no connected component that satisfies all four threshold conditions, it is determined that there is no valid crack in the depth interval. The probe is then lowered to perform the detection of the subsequent interval, i.e., the loop from step S2 to step S3 is entered.

[0050] Step S4, Subpixel Edge Extraction and Multi-Constraint Scale Correction: like Figure 3 As shown, this step is the core of achieving high-precision quantitative analysis, and it consists of three stages: sub-pixel edge localization, eccentricity correction and global scale calculation, and local scale point-by-point correction, achieving a precise mapping from pixel coordinates to physical dimensions. The following section combines... Figure 3 Each step is explained in detail.

[0051] 1. Zernike subpixel edge positioning For each remaining crack connected component after filtering, the Zernike moment algorithm with a 7×7 template is used to extract sub-pixel precision edge points. The specific process is as follows: (1) Perform distance transformation on the binary mask of the crack to extract the initial edge with a single pixel width; (2) Take each initial edge point as the center and extract a 7×7 pixel neighborhood image block; (3) Calculate the 0th, 1st, and 2nd order Zernike moments of the image patch, align the edges to the x-axis direction by coordinate rotation, and obtain the magnitude of the rotated moments. , ; (4) Solve for the sub-pixel coordinates of the edge. The calculation formula is as follows:

[0052] In the formula, The coordinates of the center point of the pixel-level edge; The pixel step size of the Zernike moment detection template, under a 7×7 template. ; , These are the first and second order Zernike moment amplitudes after rotation and alignment, respectively.

[0053] (5) The extracted sub-pixel edge points are smoothed and filtered to remove outliers, resulting in continuous sub-pixel edge curves on both sides of the crack. The algorithm achieves an edge positioning accuracy of 0.04 pixels, providing high-precision input for subsequent width calculation.

[0054] 2. Eccentricity Correction and Global Scale Factor Calculation Based on the synchronously acquired four-directional laser ranging values, the probe eccentricity state and the equivalent inner diameter of the current cross section are solved in real time to establish an absolute dimensional benchmark, and tilt correction is performed in combination with attitude data.

[0055] (1) Coordinate system definition: The center of the pile hole is defined as the origin of the world coordinate system, the vertical downward is the Z axis, the horizontal right is the X axis, and the vertical upward is the Y axis; the center of the probe is the origin of the camera coordinate system, and the optical axis direction is the Zc axis.

[0056] (2) Eccentricity parameter solution: Let the circumferential angles corresponding to the four ranging channels be 0°, 90°, 180°, and 270°, and the corresponding ranging values ​​be... Then the eccentricity component of the probe center relative to the pile hole center is: ; The magnitude of the eccentricity and the eccentricity azimuth are: ; In the formula, This is the horizontal eccentricity component. This represents the vertical eccentricity component. For the total eccentricity, The azimuth angle is the eccentric direction.

[0057] (3) Calculation of equivalent inner diameter: The equivalent actual inner diameter of the current section is the sum of the four-way distance measurements, that is: This value reflects the true inner diameter of the current cross-section of the pile hole, without relying on the design value, and can eliminate the reference error caused by pile diameter manufacturing tolerance and laitance adhesion from the root.

[0058] (4) Tilt correction and global scale factor: The roll angle of the probe is obtained through IMU. (Rotation around the Z-axis), pitch angle (Rotation around the X-axis) Construct a rotation matrix to correct the tilt of the imaging plane, and then calculate the global scale factor: ①Circular global scale factor s h (Unit: mm / pixel): Characterizes the actual arc length corresponding to a single pixel in the circumferential direction of the image. .

[0059] ②Axial global scale factor (Unit: mm / pixel): Characterizes the actual axial length corresponding to a single pixel in the image axis. .

[0060] In the formula, This represents the total number of pixels in the circumferential direction of the panoramic image. This represents the total number of pixels along the axis. This represents the average radial distance from the probe to the borehole wall; The camera's axial field of view; and The tilt correction coefficient is used to eliminate the dimensional stretching errors caused by probe roll and pitch, respectively.

[0061] 3. Local-scale point-by-point correction Because of probe eccentricity, the object distance varies at different circumferential positions on the borehole wall, resulting in differences in pixel scale. Therefore, local scale correction is required for each point on the crack. For any point on the crack, its column coordinates in the image correspond to the circumferential azimuth angle. (Calculated by combining column index / total number of columns × 360° with roll angle), the actual radial distance from the probe to the borehole wall at that point is: .

[0062] Based on the principle of similar triangles, the corrected local scale factor for: .

[0063] By correcting point by point, the error in dimensional calculation at different positions in the circumference can be controlled within 1%, ensuring consistent measurement accuracy throughout the entire circumference.

[0064] Step S5: Quantitative calculation and error correction of crack parameters: like Figure 4 As shown, this step accurately calculates the various geometric parameters of the crack based on sub-pixel edge coordinates and the corrected local scale factor, performs systematic error correction, and outputs quantitative results that meet the specifications. The following section combines... Figure 4 The calculation methods for each parameter are explained in detail.

[0065] 1. Crack centerline extraction and normal calculation (1) The Zhang-Suen skeleton extraction algorithm is used to process the binary mask of the crack to obtain the center line of the crack with a width of one pixel; (2) For each point on the center line, the tangent direction is calculated using the 3×3 neighborhood gradient method, and its perpendicular direction is the crack normal. (3) Search along the normal direction to both sides, match the corresponding sub-pixel edge points, and form a one-to-one edge point pair.

[0066] 2. Maximum and average crack width (1) Calculation of single cross-section width: For each normal cross-section, calculate the Euclidean pixel distance between the paired sub-pixel edge points on both sides and multiply it by the local scale factor of that point. The actual crack width of the cross section is obtained. : .

[0067] In the formula, , These are the coordinates of the sub-pixel edge points on both sides of the crack on the same normal cross section; It is a two-dimensional Euclidean distance.

[0068] (2) Width statistics: Traverse all normal sections and take the maximum width as the maximum crack width. The arithmetic mean of all cross-sectional widths is taken as the average crack width. : In the formula, This represents the total number of normal cross sections.

[0069] Outlier removal: The 3σ criterion is used to remove width outliers to avoid statistical bias caused by noise.

[0070] 3. Actual length of the crack Based on the sub-pixel discrete points of the crack centerline, the actual spatial length of the crack is calculated by piecewise arc length integration: In the formula, The first one on the center line of the crack Sub-pixel; This is the local scale factor corresponding to that point; This represents the total number of discrete points along the center line.

[0071] For curved cracks, this method is more accurate than straight-line distance calculation, with a length calculation error of ≤2%.

[0072] 4. Percentage of cracks circumferentially Based on the circumferential azimuth of the crack's initiation and termination points, calculate the proportion of the crack's circumferential extension length to the total circumference of the pile hole, i.e., the circumferential proportion. (%) In the formula, , These are the circumferential azimuth angles of the crack initiation and termination points, respectively, calculated from the image column coordinates combined with the probe roll angle, with an angular resolution ≤ 0.1°.

[0073] 5. Depth Position Calibration By combining depth encoder data with inter-frame image registration results, the starting depth, ending depth, and center depth of the crack are calibrated. A multi-frame fusion algorithm is used to improve the depth positioning accuracy, with a depth measurement error of ≤1% of the detection depth, which meets the specification requirements.

[0074] 6. System error correction By introducing lens distortion correction coefficients and system zero-point error, the final dimensions are corrected to eliminate inherent system errors. In the formula, This is the lens distortion correction factor, obtained from camera calibration, and dynamically adjusted with the field of view position; This represents the system's zero-point error, obtained through calibration using a standard calibration cylinder.

[0075] After completing the quantitative calculation of crack parameters and system error correction, the reliability of the calculation results is assessed to determine whether the crack is a suspicious or key area. If it is determined to be a suspicious or key area, the probe deployment is paused and a close-range retest is performed for verification. Secondary imaging and parameter verification of the current crack area are conducted by hovering at a fixed point to ensure the accuracy and reliability of the measurement results. If the deviation between the retest results and the original measurement results exceeds the allowable range, the crack parameters are updated based on the retest data. If it is determined not to be a suspicious or key area, the probe is deployed to perform detection of subsequent sections.

[0076] Step S6, Output and Report Generation: After the full borehole inspection is completed, the system automatically stitches and summarizes the full borehole data to generate a formal inspection report and supporting data files that conform to the "Standard for Borehole Imaging Inspection of Foundations".

[0077] 1. Image processing rules: Strictly follow the specifications. Image processing only makes moderate adjustments to contrast and brightness, without changing the actual size and shape of the defects. When judging the soil properties, color saturation can be adjusted appropriately. Local magnified images maintain the original aspect ratio and are not stretched or deformed.

[0078] 2. Generation of borehole wall unfolded diagram: An image stitching algorithm based on feature point matching is used to seamlessly stitch together the panoramic images of consecutive frames along the axis to generate a full borehole wall unfolded diagram; the unfolded diagram is circumferential (0°~360°) horizontally and axially (from pile top to pile bottom) vertically; all weld locations, crack locations, numbers and size parameters are automatically marked on the unfolded diagram, and clicks can be used to view defect details.

[0079] 3. Test Report Content: The report shall be in standardized PDF format and contain complete content required by the specifications, such as project overview information, borehole wall development diagram, weld and crack location markings, crack number and size parameters, test conclusions and evaluation opinions, and signatures of testers and reviewers.

[0080] 4. Data archiving: Original image data (including timestamps), intermediate calculation data, and inspection report PDFs are all automatically archived and stored. The file names include the project number, station number, and inspection date. Data retrieval, retrospection, and verification are supported, and the data retention period is no less than 5 years.

[0081] like Figure 5 As shown, the intelligent terminal for measuring welding cracks in hollow precast piles based on AI machine vision provided by this invention adopts a four-level hardware architecture of "downhole detection—synchronous acquisition—edge computing—ground main control," and is equipped with a dedicated detection software system to achieve full automation from data acquisition, intelligent identification, quantitative calculation to report generation. The terminal as a whole consists of five parts: an in-hole detection unit, a multi-source synchronous acquisition unit, an edge computing processing unit, a terminal main control unit, and a calibration unit. The detailed composition of each unit is as follows: 1. The in-hole detection unit is an integrated cylindrical waterproof probe, made entirely of 304 stainless steel. The outer shell is 2mm thick, 85mm in outer diameter, and 280mm long. Both ends feature a tapered flow guide design to reduce lowering resistance. It has an IP68 protection rating and can operate stably at depths of up to 100m. The probe's internal structure employs a modular, layered layout, consisting of a supplementary lighting layer, imaging layer, ranging layer, inertial navigation layer, and control layer from top to bottom. Each module is rigidly fixed by an internal bracket, with a relative positional accuracy ≤0.05mm. It integrates five major functional modules: (1) Panoramic imaging module: It adopts a 360° catadioptric panoramic lens with a field of view of 360°×60°, lens distortion ≤1%, and working distance of 50~500mm; it is equipped with a 1 / 2.3-inch global shutter CMOS sensor with 8 million effective pixels, a maximum frame rate of 30fps, and supports automatic exposure and automatic white balance; the front end is equipped with a 905nm band stop filter to filter out the reflected light interference of laser rangefinder and avoid the appearance of light spots in the image.

[0082] (2) Ring-shaped fill light module: 24 white LEDs with high color rendering index Ra≥90 are evenly arranged in a ring around the lens; a constant current LED driver chip is used to support 0~100% duty cycle PWM dimming with a dimming resolution of 256 levels; a diffuse reflection light equalizer is installed at the front end to ensure that the uniformity deviation of the aperture wall illumination is ≤20%.

[0083] (3) Four-way laser ranging module: Four 905nm TOF laser ranging sensors are evenly distributed along the circumference at 90°, and the beams coincide with the radial direction of the probe; the measurement range is 100~500mm, the ranging accuracy is ±1mm, the repeatability is 0.3mm, and the sampling frequency is 50Hz; the spatial calibration with the optical center of the camera is completed before leaving the factory, and the beam direction deviation is ≤0.1°.

[0084] (4) Attitude sensing module: integrates a six-axis MEMS IMU chip, including a three-axis accelerometer and a three-axis gyroscope; accelerometer range ±16g, resolution 16bit; gyroscope range ±2000° / s, zero bias stability ≤5° / h; attitude angle measurement accuracy ±0.1°; the module is rigidly connected to the imaging module, and the coordinate system is strictly aligned with the camera coordinate system.

[0085] (5) Depth measurement interface: external pull-wire photoelectric depth encoder with a resolution of 0.1mm and a matching cable length of 100m; supports real-time transmission of depth data and zeroing calibration.

[0086] 2. The multi-source synchronous acquisition unit, based on a Xilinx Artix-7 series FPGA, is deployed within the probe control compartment and is responsible for the synchronous triggering and data encapsulation and transmission of multiple sensors. Its core functions include: (1) Synchronous timing control: Generate a 100MHz master clock and output the trigger signals of each sensor through frequency division. The time synchronization accuracy of camera triggering, laser ranging, and IMU sampling is ≤5μs; (2) Data encapsulation: Image data, ranging data, IMU data, and depth data are uniformly encapsulated into standard data frames. Each frame is bound to a high-precision timestamp. The frame format includes a frame header, data type, timestamp, data body, and check bit. Data transmission: LVDS serial transmission via armored coaxial cable, with a transmission rate of 150Mbps, a transmission distance ≥100m, and a bit error rate ≤10%. -9 ; (3) Power management: The integrated DC-DC power module converts the 12V power input from the ground into the 3.3V and 5V voltages required by each module, and has overcurrent, overvoltage and reverse connection protection functions.

[0087] 3. The edge computing processing unit is deployed within the ground control box, employing an NVIDIA Jetson Orin NX 16GB embedded AI computing platform with an INT8 computing power of 100 TOPS, 16GB LPDDR5 memory, and built-in 256GB SSD storage. It utilizes a fanless passive cooling design, with an operating temperature range of -20℃ to 60℃, making it suitable for field engineering environments. The software system runs on the Ubuntu 20.04 operating system and the TensorRT 8.6 inference acceleration framework, incorporating five major algorithm modules and employing a multi-threaded parallel scheduling architecture. (1) Weld seam positioning module: Deploy an improved lightweight YOLOv8-nano model to be responsible for real-time detection and depth mapping of the weld seam area; (2) Crack segmentation module: Deploy a lightweight DeepLabV3+ model to be responsible for pixel-level segmentation of cracks in the weld area; (3) Subpixel extraction module: Based on the Zernike moment algorithm, subpixel level extraction and smoothing of crack edges are achieved; (4) Scale correction module: integrates laser ranging data and attitude data to complete eccentricity calculation, tilt correction, and global and local scale factor solution; (5) Parameter calculation module: Automatically calculates all parameters such as maximum width, average width, actual length, circumferential proportion, and depth position of cracks, and performs error correction and outlier removal.

[0088] Performance metrics: Single-frame full-process processing time ≤30ms, supports real-time processing at 5fps, CPU utilization ≤40%, memory usage ≤8GB.

[0089] 4. Terminal main control unit It adopts a 10.1-inch industrial-grade ruggedized touch panel with an IP65 protection rating, providing drop, dust, and water resistance, making it suitable for outdoor construction environments; it runs on a Linux operating system and includes a dedicated built-in testing software system. Software functional modules: (1) Parameter setting module: Input project information and pile parameters, configure detection mode (comprehensive detection / fine detection), alarm threshold, etc.; (2) Real-time preview module: synchronously displays panoramic images inside the hole, probe attitude angle, lowering depth, and real-time detection results, and supports defect highlighting; (3) Equipment control module: controls the probe lifting and lowering, starting and stopping, adjusts the supplementary light intensity, and switches the detection mode; (4) Data storage module: Built-in 1TB industrial-grade solid-state drive, supports classified storage of raw data, result data and report files, and supports export to USB flash drive and external hard drive; (5) Report generation module: Built-in standardized report templates, one-click generation of compliant PDF test reports, supporting custom editing and printing.

[0090] The hardware interfaces include USB 3.0, Type-C, Gigabit Ethernet, and HDMI output, supporting external devices and data exchange.

[0091] 5. The calibration unit consists of a standard calibration cylinder and calibration software, and is used for instrument factory calibration, annual verification and on-site calibration.

[0092] (1) Standard calibration cylinder: Made of 6061-T6 aviation aluminum, the inner wall is anodized and blackened to reduce reflection; it includes three specifications with inner diameters of 210mm, 310mm and 410mm, which correspond to the common pile types of PHC400, PHC500 and PHC600 respectively; the cylinder length is 1000mm, the inner diameter tolerance is ±0.05mm and the cylindricity is ≤0.03mm; each cylinder has 4 annular standard cracks processed on the inner wall, with widths of 0.5mm, 1mm, 2mm and 5mm respectively, defect width tolerance of ±0.02mm and depth of 0.5mm.

[0093] (2) Calibration software: Built-in automatic calibration program, which can automatically collect standard defect data, calculate system error, generate calibration coefficients and write them to the terminal; automatically output calibration report, record calibration time, calibration data and error results.

[0094] During the full-hole inspection, the terminal main control unit issues the inspection task. After the calibration unit completes the system calibration, the borehole detection unit completes the raw data acquisition with the coordinated cooperation of five modules: panoramic imaging, four-way laser ranging, attitude sensing, depth measurement, and ring lighting. The multi-source synchronous acquisition unit uses an FPGA to generate a 100MHz master clock to trigger the synchronous operation of each sensor, unifies the timestamps of the multi-source data and encapsulates it into a standard data frame, and transmits it serially to the edge computing processing unit via LVDS. The edge computing processing unit sequentially performs weld positioning, crack segmentation, sub-pixel extraction, scale correction, and parameter calculation, and then feeds the inspection results back to the terminal main control unit. The terminal main control unit decides whether to issue a close-up re-inspection command based on the inspection results. After the full-hole inspection is completed, a standard report is automatically generated and the data is archived and exported.

[0095] Based on the above-described preferred embodiments of the present invention, and through the foregoing description, those skilled in the art can make various changes and modifications without departing from the inventive concept. The technical scope of this invention is not limited to the contents of the specification, but must be determined according to the scope of the claims.

Claims

1. A method for measuring welding cracks in hollow precast piles based on AI machine vision, characterized in that, Includes the following steps: S1: System calibration and testing preparation, including in-camera distortion calibration, laser ranging unit calibration, attitude sensor calibration, multi-sensor spatial calibration, and overall system accuracy verification; S2: Synchronous acquisition of multi-source data inside the hole. The detection probe is lowered along the axis of the pile hole by controlling the servo winch mechanism. The hardware synchronous triggering system is built with FPGA as the core to synchronously acquire circumferential panoramic image sequence, laser ranging sequence and attitude and depth sequence. The hole wall illumination is kept stable by adaptive supplementary lighting control. S3: AI-powered intelligent localization and crack segmentation of weld seam area. It adopts a cascaded AI processing architecture, which includes first performing coarse localization of weld seam area through target detection network, then performing pixel-level fine segmentation of cracks in weld seam area through semantic segmentation network, and eliminating false defect connected components through connected component labeling and joint screening of multiple thresholds, and outputting the pixel-level mask of the crack connected components retained after screening. S4: Subpixel edge extraction and multi-constraint scale correction. Based on the pixel-level mask of the crack connected domain retained after screening, the subpixel precision edge points on both sides of the crack are extracted. The probe eccentricity parameters and the equivalent inner diameter of the current cross section are solved in real time according to the synchronously acquired laser ranging values. The probe attitude angle obtained by the IMU is combined to perform tilt correction. The global scale factor is calculated and local point-by-point scale correction is performed to establish a precise mapping from pixel coordinates to physical size. S5: Quantitative calculation and error correction of crack parameters. Based on sub-pixel edge coordinates and corrected local scale factors, the geometric parameters of the crack are calculated and systematic error correction is performed. S6: Output and Report Generation. After the full well inspection is completed, the full well data is spliced ​​and summarized to generate an inspection report and supporting data files.

2. The method for measuring welding cracks in hollow precast piles based on AI machine vision according to claim 1, characterized in that, In step S1: (1) The distortion calibration in the camera is performed using Zhang's calibration method. After calibration, a mapping lookup table between pixel coordinates and distortion correction coordinates is established for real-time image correction during the detection process. (2) The laser ranging unit is calibrated by building a calibration platform using first-level standard blocks, and calibration is performed at multiple standard distance points. The zero-point deviation and proportional correction coefficient of each ranging channel are obtained by linear fitting using the least squares method. (3) The attitude sensor calibration is performed using a hexahedral high-precision turntable to correct the zero bias, scaling factor and non-orthogonal error of the accelerometer and gyroscope. (4) Multi-sensor spatial calibration includes: completing the extrinsic parameter calibration of the camera and the four-way laser rangefinder, obtaining the direction vector and optical center offset of each rangefinder beam in the camera coordinate system; and completing the time offset calibration of the IMU and the camera. (5) The overall accuracy of the system is verified by repeatedly measuring the annular simulated defects of various widths using a standard calibration tube. When the relative error of the width measurement of all specifications of defects and the standard deviation of repeated measurements meet the preset threshold, the calibration is deemed qualified.

3. The method for measuring welding cracks in hollow precast piles based on AI machine vision according to claim 1, characterized in that, In step S2: (1) The circumferential panoramic image sequence is acquired using a 360° reflex panoramic lens with a global shutter CMOS image sensor. The acquisition frame rate is adaptively adjusted according to the downscaling speed to ensure that the axial overlap of two adjacent frames is ≥70% and the optical resolution of the aperture wall imaging is ≥25pix / cm. (2) The laser ranging sequence is acquired by four TOF laser ranging sensors evenly arranged at 0°, 90°, 180° and 270° along the circumference of the probe. Each frame of the image corresponds to multiple sets of ranging data, and the image timestamp is matched by time interpolation. (3) Attitude and depth sequences are acquired by a six-axis MEMS IMU and a draw-wire photoelectric depth encoder. Depth data and IMU data are fused by Kalman filtering. (4) Adaptive lighting control is performed by a ring LED light source. The system uses a PID control algorithm to adjust the LED driving current in real time based on the average gray value of the previous frame image.

4. The method for measuring welding cracks in hollow precast piles based on AI machine vision according to claim 1, characterized in that, In step S3, the cascaded AI processing architecture specifically includes: (1) Coarse localization of weld area: An improved lightweight YOLOv8-nano target detection network is adopted, and special optimization is performed on the long strip shape feature of the circumferential weld, including: re-performing k-means clustering based on the training set to generate multiple sets of anchor boxes; adding a small target detection head to the Neck module; introducing the CBAM attention mechanism into the backbone network; adopting the SIoU bounding box loss function; the network outputs the pixel coordinates of the weld bounding box, and the depth range of the weld is obtained by combining the depth data mapping. (2) Fine segmentation of cracks: The ROI image of the weld area is cropped according to the weld boundary box. The lightweight DeepLabV3+ semantic segmentation network is used to extract the cracks at the pixel level. MobileNetV2 is used as the feature extraction backbone. Grouped convolution is used in the ASPP module. Edge supervision loss is introduced at the decoding end. The network output is a binary mask image of cracks with the same size as the original image. (3) Connected component screening and pseudo-defect removal: The binary mask image of the crack is marked with 8 neighbor connected components. The area, aspect ratio, circularity and gray mean variance of each connected component are extracted. Pseudo-defects are removed by multi-threshold joint screening. The area retained after screening is determined as the crack connected component retained after screening. Its pixel-level mask, bounding rectangle and corresponding depth position are output.

5. The method for measuring welding cracks in hollow precast piles based on AI machine vision according to claim 1, characterized in that, In step S4, the Zernike moment algorithm with a 7×7 template is used to extract edge points with sub-pixel accuracy; multi-constraint scale correction is performed based on the laser ranging value and the IMU attitude angle, specifically including: (1) Eccentricity parameter solution: Let the circumferential angles corresponding to the four ranging channels be 0°, 90°, 180°, and 270°, and the corresponding ranging values ​​be... Then the eccentricity component of the probe center relative to the pile hole center is: The magnitude of the eccentricity and the eccentricity azimuth are: In the formula, This is the horizontal eccentricity component. This represents the vertical eccentricity component. For the total eccentricity, The azimuth angle is the direction of the eccentricity. (2) Calculation of equivalent inner diameter: the equivalent actual inner diameter of the current section This value reflects the true inner diameter of the current cross-section of the pile hole; (3) Tilt correction and global scale factor calculation: The roll angle of the probe is obtained through IMU. Using the pitch angle β, a rotation matrix is ​​constructed to perform tilt correction on the imaging plane, and a circumferential global scale factor is applied. Axial global scale factor ,in This represents the total number of pixels in the circumferential direction of the panoramic image. This represents the total number of pixels along the axis. , The camera's axial field of view; (4) Local scale point-by-point correction: For any point on the crack, its column coordinates in the image correspond to the circumferential azimuth angle. Then the actual radial distance from the probe to the borehole wall at that point is Corrected local scale factor .

6. The method for measuring welding cracks in hollow precast piles based on AI machine vision according to claim 1, characterized in that, In step S5, the quantitative calculation of crack parameters includes: extracting the crack centerline with a single pixel width using the Zhang-Suen skeleton extraction algorithm; calculating the tangent direction for each point on the centerline, with its perpendicular direction being the crack normal; searching for matching sub-pixel edge points on both sides along the normal; for each normal cross section, calculating the Euclidean pixel distance between the paired sub-pixel edge points on both sides, multiplying it by the local scale factor of that point to obtain the actual crack width of that cross section; traversing all normal cross sections, taking the maximum width as the maximum crack width; taking the arithmetic mean of the widths of all cross sections as the average crack width; and using the 3σ criterion to remove outliers in width; based on the sub-pixel discrete points of the crack centerline, calculating the actual spatial length of the crack through piecewise arc length integration; calculating the circumferential proportion of the crack based on the circumferential azimuth angle of the crack start and end points; calibrating the depth position of the crack in conjunction with depth encoder data; and introducing lens distortion correction coefficients and system zero-point error for system error correction.

7. A smart terminal for measuring welding cracks in hollow precast piles based on AI machine vision, characterized in that, include: The in-hole detection unit is a waterproof detection probe that integrates a panoramic imaging module, a ring-shaped supplementary lighting module, a laser ranging module, an attitude sensing module, and a depth measurement interface. The multi-source synchronous acquisition unit, with FPGA as the main control core, is responsible for the synchronous triggering and data encapsulation and transmission of multiple sensors; The edge computing processing unit is deployed in the ground control box and adopts an embedded AI computing platform. It has built-in weld positioning module, crack segmentation module, sub-pixel extraction module, scale correction module and parameter calculation module to realize the real-time processing of steps S3 to S5 in the method of any one of claims 1 to 6. The terminal main control unit is used for parameter setting, real-time preview, device control, data storage, and report generation.

8. The intelligent terminal for measuring welding cracks in hollow precast piles based on AI machine vision according to claim 7, characterized in that, In the in-hole detection unit: the panoramic imaging module adopts a 360° catadioptric panoramic lens, paired with a global shutter CMOS photosensitive element, and a band-blocking filter is mounted at the front end; the laser ranging module has 4 TOF laser ranging sensors distributed along the circumference; the attitude sensing module integrates a six-axis MEMS IMU chip; and the depth measurement interface is externally connected to a pull-wire photoelectric depth encoder.

9. The intelligent terminal for measuring welding cracks in hollow precast piles based on AI machine vision according to claim 7, characterized in that, The multi-source synchronous acquisition unit uses an FPGA as the main control core to generate a master clock and output trigger signals from each sensor through frequency division, thereby achieving time synchronization between camera triggering, laser ranging, and IMU sampling; it also encapsulates image data, ranging data, IMU data, and depth data into a standard data frame and binds it with a timestamp. The edge computing processing unit adopts an embedded AI computing platform, equipped with the Ubuntu operating system and the TensorRT inference acceleration framework; the weld seam positioning module deploys an improved lightweight YOLOv8-nano model, the crack segmentation module deploys a lightweight DeepLabV3+ model, the sub-pixel extraction module is based on the Zernike moment algorithm, the scale correction module integrates laser ranging data and attitude data to perform eccentricity calculation, tilt correction and scale factor solution, and the parameter calculation module automatically calculates all parameters of the crack and performs error correction and outlier removal.

10. The intelligent terminal for measuring welding cracks in hollow precast piles based on AI machine vision according to claim 7, characterized in that, It also includes a calibration unit, which consists of a standard calibration cylinder and calibration software: the standard calibration cylinder has a variety of inner diameter specifications, and each cylinder has multiple annular standard cracks machined on its inner wall; the calibration software has a built-in calibration program, automatically collects standard defect data, calculates system errors, generates calibration coefficients and writes them to the terminal, and outputs a calibration report.