Real-time detection method and system for hydraulic pressure bonding quality of tension clamp based on AR glasses and image processing
Patent Information
- Application Number
- CN202611125153.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-28
- Publication Date
- 2026-10-13
AI Technical Summary
[0005]本发明提供一种基于AR眼镜与图像处理的耐张线夹液压压接质量实时检测方法及系统,旨在解决现有技术中X射线影像对比度低导致特征辨识困难、运动拖影导致图像模糊、多张局部影像拼接易错位、水平检测框无法精准定位狭长倾斜构件、缺乏基于几何参数的缺陷量化判定以及诊断结论无法直观叠加于物理空间的技术问题,实现压接质量的在线无损检测与增强现实可视化诊断
[0025]相较于现有技术,本发明具有以下有益效果:通过限制对比度自适应直方图均衡化拉伸对比度并耦合保边平滑与高频锐化处理,有效提升X射线影像中钢锚管、铝绞线等金属部件的边缘清晰度及纹理显著性,为后续检测提供高质量图像基础。通过嵌入空洞空间金字塔池化模块的去模糊网络消除运动拖影,有效抑制无人机悬停抖动导致的影像模糊,提升图像复原质量。通过协同尺度不变与稠密局部特征提取、角度约束剔除错配点对以及局部单应与全局相似组合变换,实现X射线影像的高精度拼合,解决超长耐张线夹多张局部影像拼接易错位、畸变的问题。通过以移位窗口视觉转换器为主干的旋转区域卷积神经网络,结合双向跨尺度特征聚合、旋转感兴趣区域对齐及级联回归,实现对钢锚管、防滑槽、压接点等狭长倾斜构件的精准定向包围盒输出。通过依据定向包围盒的轴向偏移、形心重合度及受压面积占比进行综合评估,实现钢锚管与铝绞线端部距离超限、防滑槽欠压、非压区多压及钢芯断裂等多种压接缺陷的自动化量化判定。通过AR眼镜将诊断结论实施虚实叠加显示,实现检测结果与物理压接部位的空间对齐,方便现场作业人员直观获取缺陷信息,提升巡检效率。
Smart Images

Figure CN122906017A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of transmission line fitting crimping quality inspection technology, specifically to a real-time inspection method and system for the hydraulic crimping quality of tension clamps based on augmented reality glasses and image processing. Background Technology
[0002] Tension clamps are key hardware used in high-voltage transmission lines to fix conductors and withstand their tension. The quality of their hydraulic crimping directly affects the safe and stable operation of the power grid. If crimping defects (such as excessive spacing between the steel anchor and the aluminum strand bevel, under- or leaky crimping of the anti-slip groove, unauthorized crimping in prohibited areas, and steel core breakage) are not detected in time, they may lead to serious accidents such as conductor detachment and line tripping.
[0003] Currently, the inspection of the crimping quality of tension clamps mainly relies on manual interpretation after X-ray imaging, which has the following shortcomings: (1) The X-ray images have low contrast and blurred edges, making it difficult to identify key features such as the junction of the steel anchor pipe and the aluminum stranded wire. Relying on manual experience, the rate of missed detection and false detection is high; (2) Extra-long tension clamps (generally longer than 0.5 meters) require multiple shooting and splicing. Existing splicing algorithms have difficulty extracting feature points from X-ray images with sparse metal textures, which can easily lead to misalignment or distortion; (3) Existing automated inspection methods mostly use horizontal target detection frames, which cannot accurately locate inclined narrow components (steel anchor pipe, aluminum stranded wire ends, etc.), making it difficult to achieve defect quantification based on geometric parameters; (4) In scenarios such as drone inspection, the hovering and shaking of equipment causes image motion blur, further exacerbating the difficulty of subsequent inspection. In addition, the existing inspection system lacks real-time interaction with on-site operators, and the diagnostic conclusions cannot be intuitively superimposed on the physical space of the crimping part, reducing the efficiency of inspection.
[0004] Therefore, the present invention provides a method and system for real-time detection of hydraulic crimping quality of tension clamps based on AR glasses and image processing. Summary of the Invention
[0005] This invention provides a real-time detection method and system for hydraulic crimping quality of tension clamps based on AR glasses and image processing. It aims to solve the technical problems in the prior art, such as low contrast of X-ray images leading to difficulty in feature identification, motion blur causing image blurring, easy misalignment when stitching multiple local images, inability of horizontal detection frames to accurately locate narrow and inclined components, lack of defect quantification judgment based on geometric parameters, and inability to intuitively superimpose diagnostic conclusions on physical space. It realizes online non-destructive testing and augmented reality visualization diagnosis of crimping quality.
[0006] In a first aspect, embodiments of this application provide a real-time detection method for the hydraulic crimping quality of tension clamps based on AR glasses and image processing, the method comprising:
[0007] AR glasses are used to capture X-ray images of the tension clamp crimping area. The contrast is then stretched by limiting contrast adaptive histogram equalization, coupled with edge-preserving smoothing and high-frequency sharpening to output an enhanced image.
[0008] The enhanced image input is embedded into the deblurring network of the hollow space pyramid pooling module to eliminate motion blur and generate a clear map.
[0009] When the clear atlas is composed of multiple local images, the scale-invariant and dense local feature collaborative extraction algorithm is called to stitch them together. After random sampling consistency screening and angle constraint elimination of mismatched point pairs, alignment and weighted fusion are completed based on local homography and global similarity combination transformation to output a complete synthetic atlas.
[0010] The synthesized map is imported into a rotating region convolutional neural network. This network uses a shifted window visual converter as its backbone and outputs an oriented bounding box through bidirectional cross-scale feature aggregation, rotational region of interest alignment and cascaded regression.
[0011] Based on the geometric properties of the oriented bounding box, the axial offset, centroid coincidence, and pressure area ratio are evaluated to identify the type of crimping defect and output a diagnostic conclusion.
[0012] The diagnostic conclusions are displayed using AR glasses with a virtual-real overlay.
[0013] Secondly, embodiments of this application provide a real-time detection system for the hydraulic crimping quality of tension clamps based on AR glasses and image processing, applied to the method described in the first aspect, the system comprising:
[0014] The image acquisition and enhancement module is used to capture X-ray images of the tension clamp crimping area through AR glasses, and then perform contrast-limited adaptive histogram equalization to stretch the contrast, coupled with edge-preserving smoothing and high-frequency sharpening processing to output the enhanced image.
[0015] The motion blur removal module is used to embed the enhanced image input into the deblurring network of the hollow spatial pyramid pooling module to eliminate motion blur and generate a clear image.
[0016] The image stitching module is used to stitch together scale-invariant and dense local feature collaborative extraction algorithms when the clear map is composed of multiple local images. After random sampling consistency screening and angle constraint elimination of mismatched point pairs, alignment and weighted fusion are completed based on local homography and global similarity combination transformation, and a complete synthetic map is output.
[0017] The rotating target detection module is used to import the synthesized map into the rotating region convolutional neural network. The network uses a shift window visual converter as the backbone and outputs an oriented bounding box through bidirectional cross-scale feature aggregation, rotational region of interest alignment and cascaded regression.
[0018] The defect diagnosis module is used to evaluate axial offset, centroid coincidence and pressure area ratio based on the geometric properties of the oriented bounding box, identify the type of crimping defect, and output diagnostic conclusions.
[0019] An augmented reality display module is used to display the diagnostic conclusions by superimposing the real and virtual data through AR glasses.
[0020] Thirdly, embodiments of this application provide an electronic device, including:
[0021] processor;
[0022] Memory used to store processor-executable instructions;
[0023] The processor is used to execute the instructions to implement the real-time detection method for hydraulic crimping quality of tension clamps based on AR glasses and image processing as described in the first aspect.
[0024] Fourthly, embodiments of this application provide a computer-readable storage medium storing a program that instructs a device to execute the real-time detection method for hydraulic crimping quality of tension clamps based on AR glasses and image processing as described in the first aspect.
[0025] Compared to existing technologies, this invention offers the following advantages: By limiting contrast through adaptive histogram equalization and stretching contrast, coupled with edge-preserving smoothing and high-frequency sharpening, it effectively improves the edge clarity and texture saliency of metal components such as steel anchor pipes and aluminum stranded wires in X-ray images, providing a high-quality image foundation for subsequent detection. By eliminating motion blur through a deblurring network embedding a hollow spatial pyramid pooling module, it effectively suppresses image blurring caused by UAV hovering jitter, improving image restoration quality. Through collaborative scale invariance and dense local feature extraction, angle constraint elimination of mismatched point pairs, and combination transformation of local homography and global similarity, it achieves high-precision stitching of X-ray images, solving the problem of misalignment and distortion when stitching multiple local images of ultra-long tension clamps. By using a rotating region convolutional neural network with a shifted window visual converter as its backbone, combined with bidirectional cross-scale feature aggregation, rotating region of interest alignment, and cascaded regression, it achieves precise directional bounding box output for narrow and inclined components such as steel anchor pipes, anti-slip grooves, and crimping points. By comprehensively evaluating the axial offset, centroidal coincidence, and pressure area ratio of the directional enclosure box, the system achieves automated and quantitative judgment of various crimping defects, such as excessive distance between the steel anchor pipe and the aluminum stranded wire end, under-pressure of the anti-slip groove, excessive pressure in non-pressure areas, and steel core fracture. The diagnostic results are displayed in a virtual-real overlay using AR glasses, achieving spatial alignment between the test results and the physical crimping area. This allows on-site personnel to intuitively obtain defect information and improves inspection efficiency. Attached Figure Description
[0026] Figure 1 This is a schematic flowchart of a real-time detection method for hydraulic crimping quality of tension clamps based on AR glasses and image processing, provided in an embodiment of this application.
[0027] Figure 2 This is a diagram illustrating the architecture of a real-time detection system for hydraulic crimping quality of tension clamps based on AR glasses and image processing, provided as an embodiment of this application.
[0028] Figure 3 A schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0029] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them.
[0030] It should be noted that in the embodiments of this application, "at least one" refers to one or more, and "more than one" refers to two or more. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the specification of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application.
[0031] Based on the embodiments described in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0032] Example 1
[0033] Figure 1 This is a schematic flowchart illustrating a real-time detection method for the hydraulic crimping quality of tension clamps based on AR glasses and image processing, provided as an embodiment of this application. Figure 1 As shown, a real-time detection method for the hydraulic crimping quality of tension clamps based on AR glasses and image processing includes:
[0034] S1: Using AR glasses, X-ray images of the tension clamp crimping area are captured. Contrast is then stretched using Contrast Limited Adaptive Histogram Equalization (CLAHE), coupled with edge-preserving smoothing and high-frequency sharpening to output an enhanced image. The original transmission image of the tension clamp crimping area is acquired using an X-ray imaging plate built into or connected to the AR glasses. Due to the influence of exposure dose and scattering in X-ray imaging, the original image is often generally dark with insufficient contrast, and key edges such as the junction of the steel anchor pipe and the aluminum stranded wire are blurred. This step first uses Contrast Limited Adaptive Histogram Equalization (CLAHE algorithm) to process the image. The core idea of this algorithm is to divide the image into multiple local small regions, stretch the contrast of each small region separately, and set an upper limit for contrast amplification to avoid excessive noise amplification, thereby effectively improving the visibility of details in dark areas. Subsequently, a combination of edge-preserving smoothing and high-frequency sharpening was performed: on the one hand, bilateral filtering was used to remove speckle noise caused by metal scattering. The characteristic of bilateral filtering is that it considers both the spatial distance and gray-level similarity between pixels, which can smooth noise while preserving the edge structure without blurring. On the other hand, a desharpening mask was constructed to extract high-frequency detail components in the image and amplify them. The amplified details were then superimposed back onto the original image, making the texture features of the pressed area more prominent. The final enhanced image output significantly improved the edge sharpness and texture clarity of key components while maintaining the overall natural look, providing high-quality image input for subsequent deblurring and defect identification.
[0035] Specifically, in this embodiment, the coupled edge-preserving smoothing and high-frequency sharpening processing includes: performing edge-preserving smoothing on the ray image using a bilateral filtering algorithm. Bilateral filtering considers both spatial distance and gray-level similarity between pixels, enabling it to filter out speckle noise caused by metal scattering while preserving the edge structure at the junction of the steel anchor pipe and the aluminum stranded wire; constructing an anti-sharpening mask, subtracting the ray image from the bilaterally filtered image to obtain a high-frequency component, which corresponds to the subtle textures and edge information in the image; applying a gain coefficient to the high-frequency component and then linearly superimposing it to enhance the subtle textures of the pressing area, making the texture features of the pressing part more prominent; wherein, the gain coefficient is adaptively adjusted according to the local gray-level variance of the ray image. The gray-level variance reflects the richness of texture in a local area; in areas with gentle gray-level changes, the gain is suppressed to avoid noise amplification, while in areas with rich edge texture, the gain is increased to enhance feature saliency. The final enhanced image output maintains an overall natural appearance while significantly improving the edge sharpness and texture clarity of key components, providing high-quality image input for subsequent deblurring and defect identification.
[0036] S2: The enhanced image is input into the deblurring network of the Atrous Spatial Pyramid Pooling module to eliminate motion blur and generate a clear image. The enhanced image output from S1 is input into the pre-trained deblurring network. This network is based on the NAFNet architecture, a lightweight deep autoencoder network with a U-shaped symmetrical structure. The encoder progressively compresses the image size to extract deep semantic features, and the decoder progressively restores the image size to reconstruct a clear image. In this step, an Atrous Spatial Pyramid Pooling (ASPP) module is embedded at the bottleneck position between the NAFNet encoder and decoder. This module consists of multiple parallel dilated convolutional branches, each with a different dilation rate (e.g., dilation rates of 3, 6, 12, etc.), so that each convolutional kernel has a different receptive field size without increasing the number of parameters, thereby capturing multi-scale contextual information from local texture to global contour. The formation process of motion blur can be understood as the convolutional superposition of a sharp image and a blur kernel. Blur kernels of different scales correspond to different motion speeds and directions. The multi-branch parallel structure is well-suited to adapt to the complex nonlinear motion blur generated by the hovering jitter of UAVs. After training, the network can infer and remove the influence of the blur kernel from the blurred image, recover the true structural contours of components such as steel anchor pipes and aluminum pipes, and generate high-fidelity sharp maps.
[0037] Specifically, in this embodiment, the embedded dilated spatial pyramid pooling module includes: setting cascaded multi-branch dilated convolutional units in the bottleneck layer between the encoder and decoder of the NAFNet. Dilated convolution expands the receptive field by inserting holes with an interval of dilation rate inside the convolutional kernel, allowing a single convolutional kernel to cover a larger image area without increasing the number of parameters. Each branch uses different dilation rates (such as dilation rates of 3, 6, 12, etc.) to extract multi-scale contextual features to capture motion blur kernels of different scales in the overprinted area. Branches with small dilation rates are sensitive to short-range blur caused by local rapid motion, while branches with large dilation rates are good at perceiving long-range blur caused by overall translation or rotation. The outputs of the multiple branches are stitched and fused to form a comprehensive representation of complex motion trajectories.
[0038] Deformable convolutional layers are introduced to adaptively adjust the spatial sampling positions of the multi-scale contextual features. Based on the sampling grid of standard convolution, the deformable convolution learns an additional two-dimensional offset for each sampling point, enabling the convolutional kernel to dynamically adjust the sampling position according to the actual content of the input features. This adapts to the irregular geometric structures caused by metal deformation in the tension clamp crimping area, such as the arc-shaped contour of the steel anchor pipe surface or the local depressions generated after aluminum pipe crimping. This avoids the fixed sampling grid misclassifying features in the deformed area as noise or fuzziness.
[0039] During the training phase, a composite loss function is constructed, comprising content loss, perceptual loss, and edge structure similarity loss. Content loss constrains the consistency between the reconstructed image and the original clear image at the pixel level, while perceptual loss measures the semantic similarity between the two through intermediate layer features of the pre-trained network. The edge structure similarity loss is calculated based on gradient information extracted by the Canny edge detection operator. The Canny operator accurately locates edge pixels in the image through four steps: Gaussian filtering smoothing, gradient magnitude calculation, non-maximum suppression, and double threshold connection. This loss term constrains the clarity of the boundary between the steel anchor pipe and the aluminum pipe in the reconstructed image, ensuring that the deblurring network does not over-smooth key edges while removing motion blur. The three loss terms are added together with preset weights to guide the optimization direction of the network parameters. After training, the network can infer and remove the influence of the blur kernel from the blurred image, recovering the true structural contours of components such as the steel anchor pipe and the aluminum pipe, generating a high-fidelity clear image.
[0040] Let the input of the deblurring network be the enhanced image. The output is a reconstructed, clear image. The corresponding real and clear image is Composite loss function It consists of three weighted terms, expressed as follows:
[0041] ,
[0042] in, This represents the total value of the composite loss function; This is a content loss item; For perceived loss; This is the loss term for edge structure similarity; These are the weighting coefficients for the three losses.
[0043] Content loss use Distance metric, expressed as:
[0044] ,
[0045] in and These are the height and width of the image, respectively (in pixels). and These represent the reconstructed image and the true sharp image at different locations. The grayscale value at that location.
[0046] Perceived loss The feature map output from the ReLU2_2 layer of the pre-trained VGG-16 network is used for measurement, and the expression is:
[0047] ,
[0048] in This indicates the VGG-16 network's... Feature maps output by the layer; These represent the number of channels, height, and width of the feature map, respectively.
[0049] Edge structure similarity loss The edge gradient information extracted based on the Canny edge detection operator is calculated using the following expression:
[0050]
[0051] in The Canny edge detection operator consists of four steps: Gaussian filtering and smoothing, gradient magnitude and direction calculation, non-maximum suppression, and double threshold connection. The output is an edge intensity map with the same resolution as the input image. and These represent the reconstructed image and the true sharp image at different locations. The edge strength value at that location.
[0052] S3: When the clear image is composed of multiple local images, a scale-invariant and dense local feature extraction algorithm is invoked for stitching. After random sampling consistency filtering and angle constraint elimination of mismatched point pairs, alignment and weighted fusion are completed based on local homography and global similarity combination transformation, outputting a complete synthetic image. When the length of the ultra-long tension clamp exceeds the field of view of the X-ray imaging plate, multiple images need to be taken and stitched together to form a complete image. This step determines whether the clear image output in S2 is a single complete image. If it is composed of multiple local images, the stitching process is initiated. First, scale-invariant feature transform (SIFT algorithm) and dense scale-invariant feature transform (DenseSIFT algorithm) are used to collaboratively extract feature points. The SIFT algorithm locates stable features with rotation and scale invariance by detecting extreme points in the image scale space, while the DenseSIFT algorithm densely calculates feature descriptors on regular grid points. The complementarity of the two algorithms significantly increases the number of effective feature points, solving the problems of repetitive metal textures and scarce salient features in X-ray images. After extracting feature descriptors, a Random Sample Consensus (RANSAC) algorithm is used for initial screening. This algorithm estimates the optimal transformation model through repeated random sampling, identifying and eliminating matching points that deviate significantly from the model as outliers. Further angular constraint screening is introduced: since tension clamps are rigid components, the relative geometric relationships of the components remain unchanged before and after compression. Correctly matched feature point pairs should have similar orientation angles. This prior knowledge effectively filters out incorrect matches caused by repetitive textures. After selecting precise matching point pairs, the image is divided into a fine grid. A weighted linear transformation (DLT) algorithm is used to estimate the local homography matrix of each grid to achieve fine registration. Simultaneously, a global similarity transformation matrix containing only rotation, translation, and uniform scaling is constructed, gradually transitioning the local homography of non-overlapping areas to global similarity transformation. This aligns overlapping areas while avoiding stretching distortion in non-overlapping areas. Finally, a gradual-in / gradual-out weighted method is used for fusion, where pixel values in the overlapping area gradually transition from the reference image to the target image, resulting in a smooth and natural brightness transition on both sides of the seam, outputting a complete synthetic image.
[0053] Specifically, in this embodiment, the angle constraint elimination of mismatched point pairs includes: constructing a priori angle range based on the geometry of the tension clamp. Since the tension clamp is a rigid component, its attitude change in the X-ray imaging plate is affected by the shooting angle but usually remains within a certain range. This priori angle range is the floating range of the angle between the major axis of the pressing area and the horizontal baseline (for example, when the tension clamp is placed horizontally, the angle between its major axis and the horizontal baseline usually does not exceed ±15°). The angle between the line connecting the feature point pair to be matched and the horizontal baseline is calculated. For any feature point to be matched, the direction of its connecting line reflects the orientation of the local texture in the image, and the angle is compared with the priori angle range. If the deviation of the angle exceeds the priori angle range, it indicates that the direction of the connecting line of the feature point pair is inconsistent with the overall geometric orientation of the tension clamp, and the feature point pair is determined to be a mismatched point and eliminated. The above method utilizes the rigid geometric features of the crimped workpiece to filter out erroneous matches caused by repetitive textures. For example, the uniformly distributed transverse patterns on the surface of aluminum stranded wire can easily generate similar feature descriptors at different locations, causing the algorithm to incorrectly associate patterns from different parts of the aluminum stranded wire. Angular constraints effectively eliminate such matching points that do not conform to the overall geometric rules. Further, by combining local homography and global similarity transformations, alignment and weighted fusion are completed, ultimately outputting a complete synthetic map.
[0054] Let the first In the feature point pair to be matched, the coordinates of the feature points in the reference image are: The coordinates of the feature points in the target image are The line connecting the two feature points intersects the horizontal baseline (i.e., the image). The angle between the positive axis and the positive axis. The calculation formula is:
[0055] ,
[0056] like If the feature point pair is incorrectly matched, it will be removed.
[0057] in, The index number of the feature point pair to be matched. ,in This represents the total number of feature point pairs remaining after the initial RANSAC screening. For the first The coordinates of the feature points located on the reference image; For the first The coordinates of the feature points located on the target image; This is the arctangent function for the four quadrants, returning a value in radians, with a range of values of... ; For the first The angle between the line connecting the feature points and the horizontal baseline (in radians); These are the lower and upper limits (in radians) of the prior angle interval. The function returns the signed rotation angle of the line connecting the horizontal baseline to the feature point; a positive value indicates counterclockwise rotation, and a negative value indicates clockwise rotation. Since the tension clamp is a long, rigid component, its overall orientation in X-ray imaging changes very little between adjacent images (usually no more than ±15°). Therefore, the lines connecting all correctly matched feature point pairs should have similar orientation angles. In this embodiment, we take... , When the angle between a feature point and the connecting line exceeds the prior interval, it indicates that the direction of the connecting line deviates from the overall geometric direction of the pressing area, and it is judged as a mismatch and rejected.
[0058] Specifically, in this embodiment, the alignment based on a combination of local homography and global similarity transformation includes: solving the local homography matrix of each overlapping region using selected feature point pairs to achieve fine registration of local images. The homography matrix describes the projection mapping relationship determined by any four sets of corresponding points between two planes, and can express all degrees of freedom of planar transformations, including rotation, scaling, affine transformation, and perspective distortion. After dividing the image into a fine grid, the corresponding local homography matrix is estimated for each grid, enabling pixel-level precise alignment of each local block in the overlapping region, ensuring that key features such as the anti-slip groove outline and the crimping point boundary are continuous and seamless on both sides of the splicing seam. However, due to its complete projection degrees of freedom, the local homography matrix is prone to uncontrollable perspective distortion in non-overlapping regions, leading to shape distortion in non-overlapping regions such as the tail of the aluminum tube.
[0059] To address this, a global similarity transformation model is constructed, comprising only rotation, translation, and uniform scaling parameters, totaling four degrees of freedom, to constrain the affine degrees of freedom of the overall image. Since the similarity transformation lacks the projection distortion capability of the homography matrix, it does not produce shape distortion and can preserve the original geometry of the non-overlapping regions of the target image. Using the mapping result of the local homography matrix as initial values, the parameters of the global similarity transformation model are nonlinearly optimized by minimizing the reprojection error. Specifically, the transformation matrix of each grid in the non-overlapping region is gradually transitioned from the local homography matrix to the global similarity transformation matrix. The transition weight is determined based on the distance of the grid position from the overlapping region. Grids closer to the overlapping region retain local homography to ensure alignment accuracy, while grids farther from the overlapping region tend towards the global similarity transformation to suppress distortion. This optimization process preserves the alignment accuracy of local overlay details while suppressing image distortion caused by cumulative errors, ensuring that the final stitching result guarantees both the precise continuity of key components in the overlapping region and the natural extension of the aluminum tube tail and other shapes in the non-overlapping region.
[0060] Suppose that a total of [number] items are retained after screening. For exact matching points, the first Coordinates of the matching points in the reference image The coordinates in the target image are The global similarity transformation matrix is: It only includes the rotation angle. Uniform scaling factor Horizontal translation and vertical translation Four degrees of freedom. Reprojection error. Defined as:
[0061] ,
[0062] ,
[0063] By minimizing Solving for global similarity transformation parameters : .
[0064] This optimization problem is a nonlinear least squares problem, solved iteratively using the Levberg-Marquardt algorithm, with initial values set as follows: , , , After obtaining the optimal global similarity transformation parameters, they are used to constrain the transformation matrix of non-overlapping regions, so that the transformed target image maintains a rigid body shape in the non-overlapping regions and avoids perspective distortion.
[0065] After the transformation and alignment are completed, a gradual in-and-out weighted method is used for fusion, that is, the pixel values in the overlapping area gradually transition from the reference image to the target image, so that the brightness transition on both sides of the stitching seam is smooth and natural, and a complete synthetic map is output.
[0066] S4: The synthesized map is imported into a rotated region convolutional neural network (ORN). This network uses a shifted window visual converter as its backbone, and outputs an oriented bounding box through bidirectional cross-scale feature aggregation, rotational region of interest alignment, and cascaded regression. The synthesized map output from S3 is then imported into the rotated region convolutional neural network (i.e., Oriented R-CNN). This network employs a two-stage detection architecture: the first stage generates rotated candidate regions, and the second stage performs accurate classification and regression on the candidate regions. The core improvements in this step are in four aspects: First, the traditional residual network is replaced by a shifted window visual transformer (Swin Transformer) as the backbone feature extraction network. The core mechanism of the Swin Transformer is to divide the image into several windows, perform self-attention calculation within each window, and realize information interaction between windows through sliding windows. Its self-attention mechanism can establish long-range dependencies between pixels, and has a stronger feature expression capability for irregularly shaped and oriented press-fit parts. Second, a weighted bidirectional feature pyramid network (BiFPN) is used after the backbone network for multi-scale feature fusion. This network constructs two feature transfer paths, one from top to bottom and one from bottom to top, and introduces learnable weights to adaptively weight and combine feature maps of different scales, so that the high-resolution positional information of the shallow layer and the strong semantic category information of the deep layer are fully integrated. Third, rotational region of interest alignment (RotatedRoI) is used in the candidate region feature extraction stage. Align maps rotated candidate regions onto a fixed-size feature map, accurately calculating sampling point values through bilinear interpolation to avoid feature misalignment. Fourth, a three-level cascaded detection head (i.e., Cascade structure) is employed, with each level setting progressively increasing intersection-over-union (IoU) thresholds (e.g., 0.5 for the first level, 0.6 for the second, and 0.7 for the third). The detection boxes output by the previous level serve as input candidate boxes for the next level, iteratively optimizing to gradually approximate the true location. The network ultimately outputs oriented bounding boxes for each key component (steel anchor pipe splice, anti-slip groove, crimping point, aluminum stranded wire end, etc.), each uniquely determined by five parameters: center point coordinates, width, height, and rotation angle.
[0067] Specifically, in this embodiment, the bidirectional cross-scale feature aggregation is implemented using a weighted bidirectional feature pyramid network, including: constructing a top-down and bottom-up dual-path feature fusion system. The top-down path upsamples the high-semantic crimping category features output from the deep network and passes them to the shallow layer, allowing the shallow feature map to be guided by high-level semantic information; the bottom-up path downsamples the high-resolution crimping edge features output from the shallow network and passes them to the deep layer, allowing the deep feature map to supplement precise location information. The two paths recursively fuse the high-semantic crimping category features output from the deep network with the high-resolution crimping edge features output from the shallow network, so that the output feature map of each level has both accurate localization capability and strong semantic discrimination capability. At the same time, learnable weight parameters are introduced to adaptively weight feature maps from different scales. The feature maps of different scales contribute differently to the final detection task. The learnable weights automatically adjust the fusion ratio of each scale during training to enhance the subtle texture response of aluminum stranded wire fractures and steel anchor pipe indentations, while suppressing the interference of background noise in X-ray images and improving the network's ability to extract features of minute defects.
[0068] Assume the feature pyramid has a total of The scale level, the first The output feature map after feature fusion at each level is It consists of features from the top-down path, the bottom-up path, and the original input feature map of this level. Weighted summation yields:
[0069] ,
[0070] in, To participate in the The set of all source hierarchical indexes for hierarchical fusion; For the source-level indexes participating in the fusion; For the first When merging levels, it comes from the first Learnable weight parameters for hierarchical feature maps; To adjust the feature map to the th Operations on hierarchical space dimensions.
[0071] The weighted bidirectional feature pyramid network first performs a top-down path (from...) = arrive =1), passing deep semantic information to the shallow layer; then executing the bottom-up path (from... =1 to = This process transmits shallow location information to deeper layers. During each fusion, the output of the target layer is the weighted sum defined by the formula above. This includes the original input of this level, the output of the previous level, and the output of the next level. Learnable weights. All initial values are 1.0, and the network is trained synchronously with other parameters and automatically updated through backpropagation. Bilinear interpolation upsampling is used for low-resolution feature maps, and convolution downsampling with a stride of 2 is used for high-resolution feature maps.
[0072] In the candidate region feature extraction stage, Rotated RoI Align is used to map rotated candidate regions onto a fixed-size feature map. Bilinear interpolation is then used to accurately calculate the sampling point values to avoid feature misalignment. Subsequently, the cascaded regression detection head is used for category determination and position refinement.
[0073] Specifically, in this embodiment, the cascaded regression employs a three-level detection head structure. Each level of the detection head uses the rotated candidate boxes output by the previous level as input for iterative optimization. This includes setting progressively increasing intersection-over-union (IoU) thresholds. IoU measures the degree of overlap between the predicted and ground truth boxes; a higher value indicates more accurate localization. The first-level detection head uses a lower threshold (e.g., 0.5) to recall as many potential overlapping areas as possible, ensuring no missed detections. The second-level detection head uses a medium threshold (e.g., 0.6) to filter and initially refine the candidate boxes. The third-level detection head uses a higher threshold (e.g., 0.7) to finely adjust the center point coordinates, length, width, and rotation angle of the rotated candidate boxes, gradually approaching the true location. Each level of the detection head uses the predicted boxes output by the previous level as input candidate boxes for its current level, progressively increasing the judgment criteria to gradually converge the detected boxes to the precise location.
[0074] Furthermore, a periodicity-sensitive term based on the rotation angle of the oriented bounding box is introduced into the loss function of each detection head. Rotating target detection uses a five-parameter representation (center point coordinates, width, height, and rotation angle). When the detection box is close to the horizontal direction, the distinction between its long and short sides becomes ambiguous, and the angle definition exhibits abrupt boundary changes near 0° and 180°, leading to completely different angle parameter representations for the same pose, causing discontinuities in the loss function in this region. The periodicity-sensitive term transforms the angle parameters using trigonometric functions (such as sine or cosine mapping), converting the angle error into a continuously differentiable form. This addresses the boundary discontinuity problem near 0° and 180°, adapting to the narrow and directionally variable geometry of the tension clamp pressing area. This allows the network to converge stably during training, ultimately outputting an accurate oriented bounding box.
[0075] S5: Based on the geometric properties of the directional enclosure, assess axial offset, centroid coincidence, and pressure area ratio to identify crimping defect types and output diagnostic conclusions. Based on the directional enclosure parameters of various components output in S4, comprehensively evaluate the crimping quality. Specific diagnostic logic includes: extracting the directional enclosure of the steel anchor pipe splice as a reference frame, extracting the directional enclosure of the aluminum stranded wire end as the test frame, calculating the projected distance of the line connecting the center points of the two frames along the long axis of the steel anchor pipe. If this distance exceeds a preset assembly tolerance threshold (determined by process standards, usually based on the diameter of the steel anchor pipe), it is determined to be a defect where the distance between the steel anchor pipe and the aluminum stranded wire end exceeds the limit, which will lead to poor conductive contact. Using the directional enclosure of the anti-slip groove as the standard area and the directional enclosure of the actual crimping point as the test area, calculate the intersection-union ratio (i.e., the ratio of the intersection area to the union area). If the intersection-union ratio is lower than a preset coverage threshold, it indicates that the crimping point does not effectively cover the anti-slip groove area, which is determined to be a defect of insufficient or inadequate crimping of the anti-slip groove, which will lead to insufficient tensile strength. The directional bounding box of the non-pressurized area (i.e., the area where the steel anchor pipe and aluminum pipe overlap but should not be pressurized) is extracted as the pressure-restricted area. All actual pressurized points are checked for any that spatially overlap with the pressure-restricted area and whose overlap area exceeds the standard. If such a point exists, it is determined to be a multi-pressure defect in the non-pressurized area, which will compress the steel anchor pipe and cause structural damage. Based on the combined judgment results, a diagnostic conclusion is output, including the defect type, defect location, and quantified deviation value.
[0076] Based on the various component orientation bounding box parameters output by S4, the crimping quality is comprehensively evaluated. The diagnosis of each defect is quantified based on the geometric properties of the orientation bounding box. Specifically, in this embodiment, the evaluation of axial offset, centroid coincidence, and pressure area ratio based on the geometric properties of the orientation bounding box to identify the type of crimping defect includes:
[0077] S5.1: Extract the directional enclosure of the steel anchor pipe splice tube as the first detection frame. This detection frame represents the actual position and extension direction of the steel anchor pipe, and its long axis direction is the crimping axis. Extract the directional enclosure of the aluminum stranded wire end as the second detection frame. This detection frame represents the position of the aluminum stranded wire end. Calculate the projected distance of the line connecting the center points of the first and second detection frames along the long axis of the first detection frame. This projected distance reflects the actual distance between the steel anchor pipe and the aluminum stranded wire end in the crimping axis. If this projected distance exceeds the preset assembly tolerance threshold (this threshold is determined by the power industry crimping process standard, usually with the steel anchor pipe diameter as a reference, for example, not exceeding 1.5 times the steel anchor pipe diameter), it is judged as a defect where the distance between the steel anchor pipe and the aluminum stranded wire end exceeds the limit. This defect means that the exposed steel core after the aluminum stranded wire is stripped is not inserted deep enough into the steel anchor pipe splice tube, which will lead to a reduction in the conductive contact area and an increase in contact resistance. Long-term operation may cause overheating and burn-out accidents.
[0078] Let the center point of the first detection frame (steel anchor pipe splice pipe) be... The unit vector along the major axis is ,in The rotation angle of the first detection frame; the center point of the second detection frame (the end of the aluminum stranded wire) is... The projected distance of the line connecting the center points of the two frames along the major axis of the first detection frame. Calculate as follows:
[0079] ,
[0080] ,
[0081] like If the distance between the steel anchor pipe and the end of the aluminum stranded wire exceeds the limit, it is determined to be a defect. is the unit vector along the major axis of the first detection frame; The rotation angle of the first detection frame. This is the difference vector between the two center points; This is a preset assembly tolerance threshold (in pixels). All the above calculations are performed in the image pixel coordinate system. These are the rotation angle parameters directly output by the S4 network. The method for determining the value is: based on the width of the directional enclosure box of the steel anchor pipe splice pipe. As a reference standard ( The physical length corresponds to a steel anchor pipe diameter of 15mm), set .
[0082] S5.2: The directional enclosure of the anti-slip groove is used as the third detection frame, which represents the standard crimping area where the anti-slip groove is located; the directional enclosure of the actual crimping point is used as the fourth detection frame, which represents the position and range of the indentation formed after the hydraulic press actually applies pressure. Centroid coincidence refers to the closeness of the center points of the two detection frames, and the intersection-union ratio refers to the ratio of the intersection area to the union area of the two detection frames. If the intersection-union ratio is lower than the preset coverage threshold (e.g., the intersection-union ratio is less than 0.3), it indicates that the actual crimping position of the hydraulic press does not overlap sufficiently with the standard position of the anti-slip groove, and the anti-slip groove is not effectively filled by the aluminum tube, which is judged as a defect of leakage or under-pressure of the anti-slip groove. The anti-slip groove is a key structure for the tension clamp to withstand tensile force. If there is a gap between it and the aluminum tube or it is not fully crimped, the tensile strength of the tension clamp will decrease significantly, and it may slip or fall off under the action of conductor tension.
[0083] Let the pixel area enclosed by the third detection frame (anti-slip groove) be... The pixel area enclosed by the fourth detection frame (the actual pressing point) is Intersection and Union The calculation formula is:
[0084] ,
[0085] like If so, it is determined to be a defect of leakage or undervoltage in the anti-slip groove. The set of pixel regions enclosed by the third detection frame (anti-slip groove oriented bounding box); The set of pixel regions enclosed by the fourth detection frame (the actual pressure point orientation bounding box); This is a preset coverage threshold. Both detection boxes are axis-aligned or rotated rectangular regions. The intersection area is obtained by calculating the polygon area of the intersection of the two convex polygons, and the union area is obtained by... Calculation. In this embodiment, we take... =0.3, that is, when When the value is below 0.3, it indicates that the actual coverage area of the anti-slip groove by the crimping point is less than 30%, which is judged as a leakage or under-pressure defect.
[0086] S5.3: Extract the directional bounding box of the non-crimping area as the fifth detection frame. The non-crimping area refers to the area where the steel anchor pipe and aluminum pipe overlap, but pressure should not be applied to this overlapping area. Extract the directional bounding boxes of all actual crimping points as the sixth detection frame set. Traverse the elements in the sixth detection frame set and determine whether each crimping point spatially overlaps with the fifth detection frame. If any element spatially overlaps with the fifth detection frame and the overlap area is greater than the preset false pressure threshold (e.g., the overlap area accounts for more than 50% of the area of the bounding box of the crimping point), it is determined to be a non-crimping area overpressure defect. This defect means that the hydraulic press has mistakenly applied pressure to the aluminum pipe in the area corresponding to the steel anchor pipe that should not be crimped, causing plastic deformation of the inner wall of the aluminum pipe towards the steel anchor pipe, which may compress or damage the steel anchor pipe, weaken its mechanical strength, and in severe cases, may cause the steel anchor pipe to break.
[0087] Let the area enclosed by the fifth detection frame (non-crimping area) be... The sixth detection box set The area enclosed by the crimping points is Definition of the first The percentage of overlapping area between each crimping point and non-crimping area as follows:
[0088] ,
[0089] like satisfy If so, it is determined to be a multi-pressure defect in the non-pressure zone. Among them, This represents the total number of actual crimping points in the sixth detection frame set; This is a preset threshold for incorrect pressure. All actual pressing points are traversed, and the intersection area of each pressing point area and the non-pressed area is calculated, then divided by the area of the pressing point itself. In this embodiment, we take... =0.5, meaning that if the overlapping area of any crimping point exceeds 50%, it means that more than half of the area of the crimping point falls within the non-crimping area, and it is judged as illegal crimping.
[0090] Based on the above three judgment results, a diagnostic conclusion is output, including the defect category, defect location, and quantitative deviation value, providing clear defect information and a basis for handling on-site operators.
[0091] S6: Display the diagnostic conclusions via AR glasses using a virtual-real overlay. Present the diagnostic conclusions output in S5 to the on-site operators through AR glasses. First, establish a pose mapping relationship between the world coordinate system and the AR glasses camera coordinate system. This mapping is maintained in real-time by the AR glasses' built-in inertial measurement unit and visual positioning algorithm, enabling virtual information to be accurately located to its corresponding physical position in real space. Based on the corner coordinates of the oriented bounding box output in S4, anchor the defect category label and quantization deviation value to the corresponding three-dimensional spatial position of the tension clamp crimping area. A hierarchical visual coding strategy is used for rendering: for defects that may cause serious safety accidents (such as excessive distance between the steel anchor pipe and the aluminum stranded wire end, or multiple crimps in non-crimped areas), a red highlighted outline is generated and superimposed on the defect location with a flashing warning icon; for general process defects (such as under-pressure of the anti-slip groove), a yellow semi-transparent filling area is generated to cover the corresponding crimping section. The waveguide display component of AR glasses (i.e., the display module in AR glasses that transmits virtual image information to the human retina through the waveguide sheet) projects the rendered virtual graphics into the operator's field of vision, ensuring precise spatial alignment between the virtual information and the actual pressing part. When the operator's head moves, the AR glasses track the pose change in real time and dynamically update the projection matrix, ensuring that the virtual label always adheres to the physical surface of the tension clamp, achieving a stable and dynamic virtual-real fusion display. The operator does not need to repeatedly compare the screen image with the physical object; they can directly obtain defect information and determine processing priorities through the AR field of vision.
[0092] The diagnostic results output by S5 are presented to the on-site operators through AR glasses, ensuring a precise spatial correspondence between the test results and the actual pressing area. Specifically, in this embodiment, displaying the diagnostic results via AR glasses with a virtual-real overlay includes:
[0093] S6.1: Establish the pose mapping relationship between the world coordinate system and the AR glasses camera coordinate system. This mapping is maintained in real time through the AR glasses' built-in inertial measurement unit (including gyroscope, accelerometer, and magnetometer) and visual inertial odometry, enabling continuous tracking of the glasses' position and orientation in three-dimensional space. Based on the orientation bounding box geometric parameters (center point coordinates, width, height, and rotation angle) output by S4, combined with the pre-calibrated spatial transformation relationship between the X-ray imaging plate and the AR glasses, the category label of the crimping defect (such as the distance between the steel anchor pipe and the aluminum stranded wire end exceeding the limit) and the quantization deviation value (such as exceeding the tolerance by 2.3mm) are anchored to the physical three-dimensional spatial position of the tension clamp crimping area, ensuring that the virtual information and the real component are strictly aligned in the spatial coordinate system.
[0094] S6.2: A hierarchical visual coding strategy is used for rendering. Different visual styles are assigned according to the severity and urgency of the defect: If it is determined to be a defect where the distance between the steel anchor pipe and the end of the aluminum stranded wire exceeds the limit or a defect where there is multiple pressure in a non-pressure area, both of which may lead to transmission line breakage or disconnection accidents, it is an urgent defect. A red highlighted outline is generated and superimposed on the physical location of the defect, and a flashing warning icon is generated next to it to attract the operator's attention. If it is determined to be a defect where the anti-slip groove is under-pressured, although this defect affects the tensile strength, it usually does not immediately lead to an accident. It is a general defect. A yellow semi-transparent filling area is generated to cover the corresponding crimped section to remind the operator that this area needs attention and subsequent handling.
[0095] S6.3: The perspective projection matrix of the category label and quantification deviation value is dynamically adjusted in response to changes in the operator's head posture. When the operator's head rotates or moves, the AR glasses' tracking system calculates the new camera pose in real time and updates the projection matrix of all virtual elements accordingly. This ensures that the diagnostic conclusions are always aligned with the physical surface of the tension clamp, achieving a consistent virtual-real fusion display. Specifically, the virtual label maintains the correct front-to-back occlusion relationship with the real component; when the real component is in front, it occludes the virtual label, and when the virtual label is in front, it covers the real component. This allows virtual information to be naturally embedded into the real field of vision. The operator does not need to repeatedly compare the screen image with the physical object; they can directly obtain defect information and determine processing priorities through the AR field of vision.
[0096] Example 2
[0097] like Figure 2 As shown, this application provides an architecture diagram of a real-time detection system for the hydraulic crimping quality of tension clamps based on AR glasses and image processing. This system is applied to the real-time detection method for the hydraulic crimping quality of tension clamps based on AR glasses and image processing as described in Embodiment 1, and includes:
[0098] The image acquisition and enhancement module 210 is used to capture X-ray images of the tension clamp crimping area through AR glasses, and then perform contrast-limited adaptive histogram equalization to stretch the contrast, coupled with edge-preserving smoothing and high-frequency sharpening processing to output the enhanced image.
[0099] The deblurring module 220 is used to embed the enhanced image input into the deblurring network of the hollow spatial pyramid pooling module to eliminate motion blur and generate a clear image.
[0100] The image stitching module 230 is used to stitch together scale-invariant and dense local feature collaborative extraction algorithms when the clear map is composed of multiple local images. After random sampling consistency screening and angle constraint elimination of mismatched point pairs, alignment and weighted fusion are completed based on local homography and global similarity combination transformation, and a complete synthetic map is output.
[0101] The rotating target detection module 240 is used to import the synthesized map into a rotating region convolutional neural network. This network uses a shift window visual converter as its backbone and outputs an oriented bounding box through bidirectional cross-scale feature aggregation, rotational region of interest alignment, and cascaded regression.
[0102] The defect diagnosis module 250 is used to evaluate axial offset, centroid coincidence and pressure area ratio based on the geometric properties of the oriented bounding box, identify the type of crimping defect, and output a diagnosis conclusion.
[0103] Augmented reality display module 260 is used to display the diagnostic conclusion by superimposing the real and virtual data through AR glasses.
[0104] Figure 3 This is an electronic device provided in one embodiment of this application. For example... Figure 3 As shown, the electronic device includes at least the following components: processor 301 and memory 300, communication interface 303, and bus 302.
[0105] In this embodiment of the application, the memory 300 is used to store executable instructions of the processor 301, which is used to implement the method as described in the first aspect when executing the instructions.
[0106] In embodiments of this application, a computer-readable storage medium includes instructions that instruct a device to perform the method as described in the first aspect. For example, the instructions instruct the device to perform... Figure 1 The method is shown in the process steps.
[0107] In one embodiment of this application, the program operating in the electronic device may be a program that controls a central processing unit (CPU) or similar device to achieve the functions of the above-described embodiments of the present invention (a program that enables the computer to function). Information processed by these systems is then temporarily stored in random access memory (RAM) during processing, and subsequently stored in various ROMs such as read-only memory (FlashROM) and hard disk drives (HDDs), and read, corrected, and written by the CPU as needed.
[0108] It should be noted that a portion of the electronic device described above can also be implemented using a computer. In this case, the program for implementing the control function can be recorded on a computer-readable recording medium, and the program recorded on the recording medium can be read into the computer and executed.
[0109] It should be noted that the computer mentioned here refers to a computer built into an electronic device, employing hardware including an operating system and peripheral devices. Furthermore, computer-readable recording media refers to removable media such as floppy disks, magneto-optical disks, ROMs, and CD-ROMs, as well as storage systems such as hard drives built into the computer.
[0110] Furthermore, computer-readable recording media can include: media that dynamically stores programs for short periods of time, such as communication lines used when transmitting programs via networks like the Internet or communication lines like telephone lines; and media that store programs for fixed periods of time, such as volatile memory inside a computer that serves as a server or client in this case. In addition, the aforementioned program can be a program used to implement the above-mentioned functions, or it can be a program that can implement the above-mentioned functions by combining them with programs already recorded in the computer.
[0111] Furthermore, the electronic device in the above embodiments can also be implemented as an assembly (system group) composed of multiple systems. Each system constituting the system group can possess some or all of the functions or functional blocks of the electronic device in the above embodiments. As a system group, it is sufficient to have all the functions or functional blocks of the electronic device.
[0112] Those skilled in the art should recognize that the above embodiments are only used to illustrate this application and are not intended to limit this application. Any appropriate changes and variations made to the above embodiments within the essential spirit and scope of this application fall within the scope of protection claimed in this application.
Claims
1. A real-time detection method for the hydraulic crimping quality of tension clamps based on AR glasses and image processing, characterized in that, Includes the following steps: AR glasses are used to capture X-ray images of the tension clamp crimping area. The contrast is then stretched by limiting contrast adaptive histogram equalization, coupled with edge-preserving smoothing and high-frequency sharpening to output an enhanced image. The enhanced image input is embedded into the deblurring network of the hollow space pyramid pooling module to eliminate motion blur and generate a clear map. When the clear atlas is composed of multiple local images, the scale-invariant and dense local feature collaborative extraction algorithm is called to stitch them together. After random sampling consistency screening and angle constraint elimination of mismatched point pairs, alignment and weighted fusion are completed based on local homography and global similarity combination transformation to output a complete synthetic atlas. The synthesized map is imported into a rotating region convolutional neural network. This network uses a shifted window visual converter as its backbone and outputs an oriented bounding box through bidirectional cross-scale feature aggregation, rotational region of interest alignment and cascaded regression. Based on the geometric properties of the oriented bounding box, the axial offset, centroid coincidence, and pressure area ratio are evaluated to identify the type of crimping defect and output a diagnostic conclusion. The diagnostic conclusions are displayed using AR glasses with a virtual-real overlay.
2. The method according to claim 1, characterized in that, The coupling edge-preserving smoothing and high-frequency sharpening processing specifically includes: The X-ray image is smoothed with a bilateral filtering algorithm to remove speckle noise caused by metal scattering, while preserving the edge structure at the junction of the steel anchor pipe and the aluminum stranded wire. An anti-sharpening mask is constructed, and the high-frequency component is obtained by subtracting the ray image from the image after bilateral filtering. A gain coefficient is applied to the high-frequency component and then linearly superimposed to enhance the fine texture of the pressing area. The gain coefficient is adaptively adjusted according to the local gray-level variance of the ray image. In areas where the gray-level changes are gradual, the gain is suppressed to avoid noise amplification, while in areas with rich edge textures, the gain is increased to enhance feature saliency.
3. The method according to claim 1, characterized in that, The deblurring network is an improved NAFNet architecture, and the embedded hollow spatial pyramid pooling module specifically includes: A cascaded multi-branch dilated convolutional unit is set in the bottleneck layer between the encoder and decoder of the NAFNet. Each branch uses a different dilation rate to extract multi-scale contextual features in order to capture motion blur kernels of different scales in the pressing area. Deformable convolutional layers are introduced to adaptively adjust the spatial sampling position of the multi-scale context features in order to adapt to the irregular geometric structure of the tension clamp crimping area caused by metal deformation. During the training phase, a composite loss function is constructed, which includes content loss, perceptual loss, and edge structure similarity loss. The edge structure similarity loss is calculated based on the gradient information extracted by the Canny edge detection operator and is used to constrain the clarity of the boundary between the steel anchor pipe and the aluminum pipe in the reconstructed image.
4. The method according to claim 1, characterized in that, The angle constraint elimination of mismatch point pairs specifically includes: Construct a priori angle range based on the geometry of the tension clamp, wherein the priori angle range is the floating range of the angle between the long axis of the crimping area and the horizontal baseline; Calculate the angle between the line connecting the feature point pairs to be matched and the horizontal baseline, and compare the angle with the prior angle range; If the deviation of the included angle exceeds the prior angle range, the feature point pair is determined to be a mismatched point and is removed, so as to use the rigid geometric features of the press-fit workpiece to filter out erroneous matches caused by repeated textures.
5. The method according to claim 4, characterized in that, The alignment based on a combination of local homography and global similarity specifically includes: The local homography matrix of each overlapping region is solved by using the selected feature point pairs to achieve fine registration of local images; A global similarity transformation model is constructed, which only includes rotation, translation, and uniform scaling parameters to constrain the affine degrees of freedom of the entire image; Using the mapping result of the local homography matrix as the initial value, the parameters of the global similarity transformation model are nonlinearly optimized by minimizing the reprojection error, so as to suppress image distortion caused by cumulative error while preserving the local crimping detail alignment accuracy.
6. The method according to claim 1, characterized in that, The bidirectional cross-scale feature aggregation is specifically implemented using a weighted bidirectional feature pyramid network, including: A dual-path feature fusion system, consisting of top-down and bottom-up approaches, is constructed to recursively fuse the high-semantic crimping category features output by the deep network with the high-resolution crimping edge features output by the shallow network. Learnable weight parameters are introduced to adaptively weight feature maps from different scales to enhance the subtle texture response of aluminum stranded wire fractures and steel anchor pipe indentations, while suppressing the interference of background noise in X-ray images and improving the network's ability to extract features of minute defects.
7. The method according to claim 6, characterized in that, The cascaded regression employs a three-level detection head structure. Each level of the detection head iteratively optimizes the rotated candidate boxes output by the previous level as input, specifically including: The cross-union ratio threshold is set in progressively increasing order. The first-level detection head uses a lower threshold to recall potential crimped areas, while the second and third-level detection heads use a higher threshold to finely adjust the center point coordinates, length, width, and rotation angle of the rotating candidate box. A periodic sensitivity term based on the rotation angle of the directional bounding box is introduced into the loss function of each detection head to solve the boundary discontinuity problem near 0° and 180° of the rotation angle, so as to adapt to the narrow and directional geometric characteristics of the tension clamp crimping area.
8. The method according to claim 1, characterized in that, The assessment of axial offset, centroid coincidence, and pressure area ratio based on the geometric properties of the oriented bounding box to identify the type of crimping defect specifically includes: The directional enclosure of the steel anchor pipe splice is extracted as the first detection frame, and the directional enclosure of the aluminum stranded wire end is extracted as the second detection frame. The projection distance of the line connecting the center points of the first detection frame and the second detection frame in the long axis direction of the first detection frame is calculated. If the projection distance exceeds the preset assembly tolerance threshold, it is determined to be a defect where the distance between the steel anchor pipe and the aluminum stranded wire end exceeds the limit. Using the directional enclosure of the anti-slip groove as the third detection frame and the directional enclosure of the actual pressing point as the fourth detection frame, calculate the centroid overlap and crossover ratio of the third and fourth detection frames. If the crossover ratio is lower than the preset coverage threshold, it is determined to be a leakage or underpressure defect of the anti-slip groove. The directional bounding box of the non-pressed area is extracted as the fifth detection box, and the directional bounding boxes of all actual pressing points are extracted as the sixth detection box set. The elements in the sixth detection box set are traversed. If any element has spatial overlap with the fifth detection box and the overlap area ratio is greater than the preset false pressing threshold, it is determined to be a non-pressed area multi-press defect.
9. The method according to claim 1, characterized in that, The step of displaying the diagnostic conclusion through AR glasses by overlaying real and virtual images specifically includes: Establish the pose mapping relationship between the world coordinate system and the AR glasses camera coordinate system. Based on the geometric parameters of the directional bounding box, anchor the category label and quantization deviation value of the crimping defect to the physical three-dimensional spatial position of the tension clamp crimping area. A hierarchical visual coding strategy is used for rendering: if the distance between the steel anchor pipe and the end of the aluminum stranded wire is determined to be excessive or there is a multi-pressure defect in the non-pressure area, a red highlighted outline and a flashing warning icon are generated and superimposed on the corresponding physical location; if the anti-slip groove is determined to be under-pressure defect, a yellow semi-transparent filling area is generated to cover the corresponding crimped section. In response to changes in the operator's head posture, the perspective projection matrix of the category label and the quantification deviation value is dynamically adjusted so that the diagnostic conclusion is always aligned with the physical surface of the tension clamp, achieving a virtual-real fusion display with consistent occlusion relationships.
10. A real-time detection system for the hydraulic crimping quality of tension clamps based on AR glasses and image processing, applied to the method described in any one of claims 1 to 9, characterized in that, The system includes: The image acquisition and enhancement module is used to capture X-ray images of the tension clamp crimping area through AR glasses, and then perform contrast-limited adaptive histogram equalization to stretch the contrast, coupled with edge-preserving smoothing and high-frequency sharpening processing to output the enhanced image. The motion blur removal module is used to embed the enhanced image input into the deblurring network of the hollow spatial pyramid pooling module to eliminate motion blur and generate a clear image. The image stitching module is used to stitch together scale-invariant and dense local feature collaborative extraction algorithms when the clear map is composed of multiple local images. After random sampling consistency screening and angle constraint elimination of mismatched point pairs, alignment and weighted fusion are completed based on local homography and global similarity combination transformation, and a complete synthetic map is output. The rotating target detection module is used to import the synthesized map into the rotating region convolutional neural network. The network uses a shift window visual converter as the backbone and outputs an oriented bounding box through bidirectional cross-scale feature aggregation, rotational region of interest alignment and cascaded regression. The defect diagnosis module is used to evaluate axial offset, centroid coincidence and pressure area ratio based on the geometric properties of the oriented bounding box, identify the type of crimping defect, and output diagnostic conclusions. An augmented reality display module is used to display the diagnostic conclusions by superimposing the real and virtual data through AR glasses.