Splicing method and system for strain clamp digital ray images

By adjusting the parameters of the global homography transformation model and using AKAZE, APAP algorithms and improved recursive stitching neural network E-RSNet, the overlapping area artifact problem caused by parallax in tension-resistant line clip digital ray image stitching is solved, and high-quality and efficient image stitching is achieved.

CN119887513AActive Publication Date: 2025-04-25GUIZHOU POWER GRID CO LTD

Patent Information

Application Number
CN202411825014.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-04-25
Estimated Expiration
2044-12-12

AI Technical Summary

Technical Problem

The tension-resistant wire clips have parallaxes in the image taken in two consecutive rays, resulting in artifacts in overlapping areas, which is difficult to effectively solve in the prior art.

Method used

A method of stitching for tensile wire clip digital ray images is adopted, and the parameters of the global homography model are adjusted through the weight factor calculated by distance, and feature point detection and matching are detected and matched by AKAZE algorithm and APAP algorithm, and image fusion is used to use the improved recursive stitching neural network E-RSNet.

Benefits of technology

It effectively solves the problem of overlapping area artifacts caused by parallax, improves the naturalness and quality of image stitching, significantly improves the speed and accuracy of radial image stitching, and lays the foundation for subsequent tension-resistant wire clamp defect detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119887513A_ABST
    Figure CN119887513A_ABST
Patent Text Reader

Abstract

The invention discloses a splicing method and system for a strain clamp digital ray image, and relates to the technical field of image splicing, and the method comprises the steps: obtaining a strain clamp digital ray image, and carrying out the preprocessing of the strain clamp digital ray image, and obtaining a preprocessed image; feature point detection is carried out on the preprocessed image, and feature points are extracted; performing feature matching on the extracted feature points by using a grid model to obtain a to-be-registered image; and carrying out image fusion based on the to-be-registered image to realize splicing of the strain clamp digital ray image. According to the method, for the situation that parallax exists in images obtained through continuous twice ray shooting of the strain clamp, parameters of a global homography transformation model are adjusted according to weight factors calculated by the distance, and the problem of artifacts of an overlapping area caused by the parallax problem is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of image splicing, and in particular to a splicing method and system for digital radiographic images of tension clamps. Background Art

[0002] Image stitching technology has been widely used in recent years, especially in the fields of panoramic image generation, remote sensing image processing, medical imaging and virtual reality. The core purpose is to align two or more images with overlapping areas in the same scene to generate a single image with a larger field of view without reducing the resolution. Image stitching generally consists of several steps: image preprocessing, image registration and image fusion, and image registration includes feature point detection, feature matching and parameter model estimation steps.

[0003] Most commonly used image stitching methods are based on feature point matching, such as ORBD, SIFT, SURF and KAZE, but are still limited by the time cost of feature point extraction and have problems with ghosting and blurring. While considering improving image alignment, more and more scholars are focusing on reducing the projection distortion of non-overlapping areas. Some scholars have proposed protecting non-overlapping areas to ensure that the final mosaic panoramic image is more natural. However, when most algorithms eliminate the projection distortion of non-overlapping areas, they also destroy the structural information in the image, resulting in discontinuity in the transition from overlapping areas to non-overlapping areas. Summary of the invention

[0004] In view of the above-mentioned problems, the present invention is proposed.

[0005] Therefore, the problem to be solved by the present invention is how to deal with the parallax of two consecutive ray images of the tension clamp. A method for splicing digital ray images of the tension clamp is proposed, and the parameters of the global homography transformation model are adjusted according to the weight factor of the distance calculation to solve the problem of overlapping area artifacts caused by the parallax problem.

[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0007] In the first aspect, an embodiment of the present invention provides a method for stitching digital radiographic images of tension clamps, which includes acquiring digital radiographic images of tension clamps and preprocessing them to obtain a preprocessed image; performing feature point detection on the preprocessed image to extract feature points; performing feature matching on the extracted feature points using a grid model to obtain an image to be registered; and performing image fusion based on the image to be registered to achieve stitching of digital radiographic images of tension clamps.

[0008] As a preferred solution of the stitching method for the digital radiographic image of the tension clamp described in the present invention, the digital radiographic image of the tension clamp includes a reference image and a target image; obtaining the preprocessed image refers to preprocessing the reference image and the target image to obtain the preprocessed reference image and target image.

[0009] As a preferred solution of the stitching method for the digital radiographic image of the tension clamp described in the present invention, the feature point detection of the preprocessed image refers to extracting the feature points of the preprocessed reference image and the target image using the AKAZE algorithm; the feature point detection includes the following steps: constructing a scale space using a nonlinear diffusion filter, introducing a local difference binary descriptor M-LDB, obtaining the descriptor through the AKAZE feature algorithm, and the nonlinear diffusion filter equation describes the brightness at different scale levels as the divergence of the flow function, thereby describing the change of the image brightness in different scale spaces. The specific formula is as follows:

[0010]

[0011] in, is the gradient; div(·) is the divergence; c(·) is the conduction function. The larger the evolution time t is, the larger the scale parameter is. In order to use the nonlinear diffusion filter equation, it is necessary to convert the discrete scale factor into a time unit, and process the original image using Gaussian filtering. The value at the T% position of the gradient histogram of the input image after filtering is calculated as the control factor. After obtaining the input image and the control factor, the FED algorithm is used to solve the nonlinear diffusion filter equation to obtain the scale space. The specific formula of the scale space is as follows:

[0012] L i+1 =[I+τA(L i )]L i

[0013] Where I is the identity matrix; A(L i ) is the matrix of the image in dimension i; τ is the time step; after constructing the scale space, the non-maximum suppression method is used for each pixel in it to obtain the corresponding Hessian matrix; the feature points are detected and compared with other pixels at the same level and the two layers above and below, and then the maximum value of the Hessian matrix is ​​searched; the Taylor formula is used for precise positioning at the sub-pixel level, and the corresponding position is the final positioning point of the feature point.

[0014] As a preferred solution of the stitching method for the digital radiographic image of the tension clamp described in the present invention, wherein: the feature matching of the extracted feature points using the grid model refers to optimizing the grid model based on the APAP algorithm, taking global similarity and local similarity as constraints, and performing feature matching of the extracted feature points using the optimized grid model to obtain the image to be registered; the global similarity refers to adding a global similarity constraint in order to reduce the distortion in the image registration process, assuming that the image I i The scale factor s and rotation angle θ of , the specific formula of the global similarity constraint is as follows:

[0015]

[0016] Where V is all grid points; E i For image I i the edge of is the coefficient of similarity transformation; is a weight function; the local similarity refers to the fact that in order to reduce the overall image shape distortion, the overlapping and non-overlapping regions are transformed similarly, and the transition from the overlapping region to the non-overlapping region is gradually achieved. The specific formula of the local similarity constraint is as follows:

[0017]

[0018] Among them, v i For image I i Grid points; is the position of the grid point on the original image; is the position of the deformed mesh point.

[0019] As a preferred solution of the stitching method for the digital radiographic image of the tension clamp described in the present invention, the image fusion based on the image to be registered refers to designing an improved recursive stitching neural network E-RSNet for image fusion; the core of the improved recursive stitching neural network E-RSNet lies in the recursive feature fusion module, which integrates image features of different scales through a multi-level feature fusion strategy; the feature representation of the input image is Y1, and the recursive feature fusion module and the point convolution kernel K point Perform convolution operation to obtain the fused feature representation Y. The specific formula is as follows:

[0020] Y=Y1#K point

[0021] Among them, # is the convolution operation; K point is a learnable point convolution kernel parameter; the network architecture design of the improved recursive splicing neural network E-RSNet is based on the encoder-decoder structure of EfficientNet, and the specific architecture is as follows:

[0022] F encode =EfficientNet(X)

[0023] F*decode=Decoder(F*encode)

[0024] Y1=F*decode*K*depth

[0025] Based on the core model, the improved recursive splicing neural network E-RSNet introduces a recursive feature fusion module and a multi-head self-attention mechanism, including: the recursive feature fusion module fuses features at different levels through multiple iterations; the multi-head self-attention mechanism enables the network to focus on key areas in the image.

[0026] As a preferred solution of the stitching method for the digital radiographic image of the tension clamp described in the present invention, the self-attention mechanism achieves focusing on important features by calculating the correlation weights between different positions. The specific formula of the self-attention mechanism is as follows:

[0027]

[0028] Where Q is the query; K is the key; V is the value; d k is the dimension of the key; the multi-head self-attention mechanism is applied many times in the improved recursive splicing neural network E-RSNet. By calculating the attention in parallel in different subspaces, the global information in the image is mined. The self-attention mechanism is further expanded to obtain the multi-head self-attention mechanism. The specific formula of the multi-head self-attention mechanism is as follows:

[0029] Y t+1 =Attention(Y t )+X*K depth

[0030] Among them, Y t is the feature map after the tth iteration; Attention(·) is the processing result of the multi-head self-attention mechanism on the feature map.

[0031] As a preferred solution of the stitching method for digital radiographic images of tension clamps described in the present invention, in which: in order to improve the performance of the improved recursive stitching neural network E-RSNet, optimization is performed on key modules, including dynamic weight adjustment of the recursive feature fusion module, hierarchical attention module of the multi-head self-attention mechanism, and dynamic pruning and mixed precision quantization technology of the model; the dynamic weight adjustment of the recursive feature fusion module refers to the use of a dynamic weight adjustment strategy for the recursive feature fusion module, so that features of different levels can be adaptively assigned different weights during the fusion process, assuming that the feature of the (l)th layer is Y (l), the fusion formula after weight adjustment is as follows:

[0032]

[0033] Among them, α (l) is the dynamic weight parameter of the (l)th layer; the hierarchical attention module of the multi-head self-attention mechanism refers to the introduction of a hierarchical attention module in the multi-head self-attention mechanism to calculate the attention weights at different scales. The specific formula is as follows:

[0034] MultiHeadAttention(Q,K,V)=Concat(head1,head2,...,head h )W O

[0035]

[0036] Among them, head i is the attention of the i-th head.

[0037] In the second aspect, in order to further solve the safety problems existing in image stitching, the embodiment of the present invention provides a stitching system for digital radiographic images of tension clamps, which includes: an image acquisition module, used to acquire the digital radiographic images of tension clamps as reference images and target images and perform preprocessing to obtain preprocessed reference images and target images; a feature extraction module, used to extract feature points of the preprocessed reference images and target images using the AKAZE algorithm; a feature matching module, used to optimize the grid model using global similarity and local similarity as constraints based on the APAP algorithm, and perform feature matching on the extracted feature points using the optimized grid model to obtain images to be registered; an image stitching module, used to perform image fusion on images to be registered using an improved recursive stitching neural network E-RSNet.

[0038] In a third aspect, an embodiment of the present invention provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, any step of the method for splicing digital radiographic images of tension clamps as described in the first aspect of the present invention is implemented.

[0039] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, any step of the method for splicing digital radiographic images of tension clamps as described in the first aspect of the present invention is implemented.

[0040] The beneficial effects of the present invention are as follows: the present invention aims at the parallax of two consecutive ray images of the tension clamp, and adjusts the parameters of the global homography transformation model according to the weight factor of the distance calculation to solve the problem of overlapping area artifacts caused by the parallax problem; with the help of the APAP algorithm, the global similarity and local similarity are used as constraints to optimize the grid model, and at the same time, when performing multi-image stitching, a suitable scale and rotation angle are selected for each image to be registered to improve the naturalness of the stitching; the improved recursive stitching neural network E-RSNet is used for image fusion, an encoder-decoder architecture is constructed based on EficientNet, and an improved recursive feature fusion module and a multi-head self-attention mechanism are introduced to achieve high-precision real-time image stitching, which significantly improves the quality and speed of ray image stitching, and lays a foundation for subsequent tension clamp defect detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:

[0042] Figure 1 This is an overall flow chart of the method for splicing digital radiographic images of tension clamps in Example 1.

[0043] Figure 2 This is a schematic diagram of the structure of the computer device in Example 3. DETAILED DESCRIPTION

[0044] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.

[0045] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0046] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.

[0047] Example 1

[0048] Reference Figure 1, which is the first embodiment of the present invention, provides a method for splicing digital radiographic images of tension clamps.

[0049] The existing image stitching methods have the following main problems: limited by the time cost of feature point extraction, there are problems of ghosting and blurring; while considering improving image alignment, more and more scholars are concerned about reducing the projection distortion of non-overlapping areas, and some scholars have proposed protecting non-overlapping areas to ensure that the final mosaic panoramic image is more natural; however, when most algorithms eliminate the projection distortion of non-overlapping areas, they also destroy the structural information in the image, resulting in discontinuity in the transition from overlapping areas to non-overlapping areas.

[0050] The present application provides an effective solution to the above-mentioned problem. Next, a plurality of embodiments will be combined to explain in detail how to implement the splicing method for the digital radiographic image of the tension clamp.

[0051] Figure 1 The overall flow chart of the method for splicing digital radiographic images of tension clamps is shown, including:

[0052] S1: Acquire a digital radiographic image of the tension clamp and perform preprocessing to obtain a preprocessed image.

[0053] Preferably, the digital radiographic image of the tension clamp includes a reference image and a target image.

[0054] Specifically, obtaining the preprocessed image refers to preprocessing the reference image and the target image to obtain the preprocessed reference image and the target image.

[0055] S2: Perform feature point detection on the preprocessed image and extract feature points.

[0056] Preferably, performing feature point detection on the preprocessed image refers to extracting feature points of the preprocessed reference image and the target image using an AKAZE algorithm.

[0057] Specifically, feature point detection includes the following steps: The AKAZE algorithm is an accelerated version of the KAZE feature. It uses nonlinear diffusion filtering to construct a scale space and introduces an effectively improved local difference binary descriptor M-LDB. The descriptor obtained by the AKAZE feature algorithm has rotation invariance, scale invariance, and illumination invariance. The nonlinear diffusion filter equation describes the brightness at different scale levels as the divergence of the flow function, and then describes the changes in image brightness at different scale spaces. The specific formula is as follows:

[0058]

[0059] in, is the gradient; div(·) is the divergence; c(·) is the conduction function, which can adapt the divergence structure to the local structure of the image. The larger the evolution time t, the larger the scale parameter.

[0060] In order to use the nonlinear diffusion filter equation, it is necessary to convert the discrete scale factor into a time unit, process the original image using Gaussian filtering, and use the value at the 70% position of the gradient histogram of the input image after filtering as the control factor. After obtaining the input image and the control factor, the FED algorithm is used to solve the nonlinear diffusion filter equation to obtain the scale space. The specific formula of the scale space is as follows:

[0061] L i+1 =[I+τA(L i )]L i

[0062] Where I is the identity matrix; A(L i ) is the matrix of the image in dimension i, i∈[0,N-1]; τ is the time step.

[0063] After constructing the scale space, the non-maximum suppression method can be used for each pixel to obtain the corresponding Hessian matrix.

[0064] The feature points are detected and compared with other pixels at the same level and in the upper and lower layers, and then the maximum value of the Hessian matrix is ​​searched.

[0065] Taylor formula is used to perform precise positioning at the sub-pixel level, and the corresponding position is the final positioning point of the feature point.

[0066] S3: Use the grid model to perform feature matching on the extracted feature points to obtain the image to be registered.

[0067] Preferably, using the grid model to perform feature matching on the extracted feature points means optimizing the grid model based on the APAP algorithm, taking global similarity and local similarity as constraints, and using the optimized grid model to perform feature matching on the extracted feature points to obtain the image to be registered.

[0068] Specifically, global similarity means that in order to reduce the distortion in the image registration process, a global similarity constraint is added. If there is no global similarity constraint, the final stitching result may be tilted and deformed. Assuming that the image I has been determined i The scale factor s and rotation angle θ of , the specific formula of the global similarity constraint is as follows:

[0069]

[0070] Where V is all grid points; E i For image Ii the edge of is the coefficient of similarity transformation; is a weight function, in which more weight is given to areas far from the overlap; the alignment term plays an important role in the overlap area. For parts far from the overlap area, since there is no alignment constraint, the similarity experience is more important.

[0071] Specifically, local similarity means to reduce the overall image shape distortion, ensure that the overlapping and non-overlapping regions are similar, gradually transition from the overlapping region to the non-overlapping region, and improve the naturalness of the stitching. The specific formula of the local similarity constraint is as follows:

[0072]

[0073] Among them, v i For image I i Grid points; is the position of the grid point on the original image; is the position of the deformed mesh point.

[0074] S4: Image fusion is performed based on the image to be registered to achieve the stitching of the digital radiographic image of the tension clamp.

[0075] Preferably, performing image fusion based on the images to be registered refers to designing an improved recursive stitching neural network E-RSNet for image fusion, wherein the improved recursive stitching neural network E-RSNet builds an encoder-decoder architecture based on EficientNet, and introduces an improved recursive feature fusion module and a multi-head self-attention mechanism to achieve high-precision real-time image stitching, significantly improve the quality and speed of X-ray image stitching, and lay the foundation for subsequent tension clamp defect detection.

[0076] It should be noted that in the process of X-ray image stitching and defect identification of power line tension clamps, high-precision image stitching is the basis for accurate defect detection. Aiming at the shortcomings of existing image stitching methods in real-time and accuracy, an improved recursive stitching neural network E-RSNet is proposed; the improved recursive stitching neural network E-RSNet is based on the encoder-decoder architecture of EfficientNet, integrating an improved recursive feature fusion module and a multi-head self-attention mechanism, aiming to improve the accuracy and efficiency of image stitching.

[0077] Specifically, the core of the improved recursive splicing neural network E-RSNet lies in the recursive feature fusion module. The recursive feature fusion module effectively integrates image features of different scales through a multi-level feature fusion strategy. Let the feature representation of the input image be Y1, and the recursive feature fusion module and the point convolution kernel K point Perform convolution operation to obtain the fused feature representation Y. The specific formula is as follows:

[0078] Y=Y1#K point

[0079] Among them, # is the convolution operation; K point are the learnable point convolution kernel parameters.

[0080] Preferably, by utilizing the specific formula for representing the fused features, the key operations in the feature fusion process are reflected. By introducing the point convolution kernel, the feature expression ability and fusion effect are enhanced. The recursive feature fusion module repeatedly applies the specific formula for representing the fused features at different levels, realizing the deep fusion of multi-scale features and significantly improving the accuracy of image stitching.

[0081] Furthermore, the network architecture design of the improved recursive splicing neural network E-RSNet is based on the encoder-decoder structure of EfficientNet, aiming to balance the complexity and computational efficiency of the model. The specific architecture is as follows:

[0082] F encode =EfficientNet(X)

[0083] F*decode=Decoder(F*encode)

[0084] Y1=F*decode*K*depth

[0085] It should be noted that the encoder is responsible for extracting high-level semantic features of the input image, while the decoder restores the spatial resolution of the image through upsampling operations to ensure that the detail information of the feature map is preserved. Through the above process, the improved recursive splicing neural network E-RSNet can effectively generate a preliminary feature map Y1, providing a solid foundation for subsequent splicing and defect detection.

[0086] Furthermore, based on the core model, the improved recursive splicing neural network E-RSNet introduces a recursive feature fusion module and a multi-head self-attention mechanism to further optimize the feature representation, including: the recursive feature fusion module fuses features at different levels through multiple iterations, thereby enhancing the ability to capture image details.

[0087] The multi-head self-attention mechanism enables the network to focus on key areas in the image, improving the accuracy and efficiency of stitching.

[0088] Furthermore, the introduction of the multi-head self-attention mechanism further improves the model's ability to capture key information in the image. The self-attention mechanism focuses on important features by calculating the correlation weights between different positions, thereby improving the accuracy and robustness of splicing. The specific formula of the self-attention mechanism is as follows:

[0089]

[0090] Among them, Q is query; K is key; V is value; d k The dimension of the key.

[0091] Specifically, the multi-head self-attention mechanism is applied many times in the improved recursive splicing neural network E-RSNet. By calculating the attention in parallel in different subspaces, the global information in the image is fully mined, and the model's ability to recognize complex defects is enhanced. The self-attention mechanism is further expanded to obtain the multi-head self-attention mechanism. The specific formula of the multi-head self-attention mechanism is as follows:

[0092] Y t+1 =Attention(Y t )+X*K depth

[0093] Among them, Y t is the feature map after the tth iteration; Attention(·) is the processing result of the multi-head self-attention mechanism on the feature map. Through recursive iteration, the network can gradually optimize the feature representation and achieve high-precision image stitching.

[0094] Preferably, in order to further improve the performance of the improved recursive splicing neural network E-RSNet, various optimizations are performed on key modules, including the dynamic weight adjustment of the recursive feature fusion module, the hierarchical attention module of the multi-head self-attention mechanism, and the dynamic pruning and mixed precision quantization technology of the model.

[0095] Specifically, the dynamic weight adjustment of the recursive feature fusion module refers to the use of a dynamic weight adjustment strategy for the recursive feature fusion module, so that features at different levels can be adaptively assigned different weights during the fusion process, thereby improving the flexibility and adaptability of feature fusion. Suppose the feature of the (l)th layer is Y (l) , the fusion formula after weight adjustment is as follows:

[0096]

[0097] Among them, α (l) is the dynamic weight parameter of the (l)th layer, which is automatically learned through the training process. The dynamic weight adjustment of the recursive feature fusion module effectively alleviates the imbalance problem of features at different levels in the fusion process and ensures the stability and consistency of feature fusion.

[0098] Specifically, the hierarchical attention module of the multi-head self-attention mechanism refers to the introduction of a hierarchical attention module in the multi-head self-attention mechanism. By calculating the attention weights at different scales, the model's perception of multi-scale features is further improved. The specific formula is as follows:

[0099] MultiHeadAttention(Q,K,V)=Concat(head1,head2,...,head h )W O

[0100]

[0101] Among them, head i is the attention of the i-th head.

[0102] Preferably, by utilizing the multi-head self-attention mechanism, the model can simultaneously capture multiple feature relationships in different subspaces, thereby enhancing the effect of image stitching; the hierarchical attention module independently calculates the attention weights at different scales, ensuring the comprehensive capture of various detail features and improving the overall performance of the model.

[0103] In summary, the present invention aims at the parallax of two consecutive ray images of the tension clamp, and adjusts the parameters of the global homography transformation model according to the weight factor of the distance calculation to solve the problem of overlapping area artifacts caused by the parallax problem; with the help of the APAP algorithm, the global similarity and local similarity are used as constraints to optimize the grid model, and at the same time, when performing multi-image stitching, a suitable scale and rotation angle are selected for each image to be registered to improve the naturalness of the stitching; the improved recursive stitching neural network E-RSNet is used for image fusion, an encoder-decoder architecture is constructed based on EficientNet, and an improved recursive feature fusion module and a multi-head self-attention mechanism are introduced to achieve high-precision real-time image stitching, which significantly improves the quality and speed of ray image stitching, and lays a foundation for subsequent tension clamp defect detection.

[0104] Embodiment 2 is an embodiment of the present invention, which provides a stitching system for digital radiographic images of tension clamps, including: an image acquisition module, used to acquire digital radiographic images of tension clamps as reference images and target images and perform preprocessing to obtain preprocessed reference images and target images; a feature extraction module, used to extract feature points of the preprocessed reference images and target images using the AKAZE algorithm; a feature matching module, used to optimize the grid model using global similarity and local similarity as constraints based on the APAP algorithm, and perform feature matching on the extracted feature points using the optimized grid model to obtain images to be registered; an image stitching module, used to perform image fusion on images to be registered using an improved recursive stitching neural network E-RSNet.

[0105] Embodiment 3 is an embodiment of the present invention, which is different from the previous embodiment in that:

[0106] like Figure 2 As shown, if the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0107] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0108] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0109] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0110] Example 4 is an embodiment of the present invention, which provides a method for splicing digital radiographic images of tension clamps. In order to verify the beneficial effects of the present invention, a scientific demonstration is carried out through simulation experiments.

[0111] In this example, 10 X-ray images of the tension clamp taken at different angles were obtained through simulation. The size of each image was 2048×2048 pixels. All images were preprocessed, including brightness equalization, noise removal and image cropping. Then, the AKAZE algorithm was used to detect feature points of the preprocessed images. The AKAZE algorithm constructed a scale space through nonlinear diffusion filtering and used the M-LDB descriptor to extract feature points with rotation, scale and illumination invariance. After the feature points were extracted, the APAP algorithm based on the grid model was used for feature matching, and the optimized grid model was further used to obtain the image to be registered. After the registration was completed, the improved recursive splicing neural network E-RSNet was used for image fusion. The improved recursive splicing neural network E-RSNet is based on the EfficientNet architecture, combined with the recursive feature fusion module and the multi-head self-attention mechanism, to ensure the high accuracy and efficiency of the splicing results.

[0112] In order to verify the effect of the method of the present invention, a comparison is made with the existing stitching method based on traditional feature point matching to evaluate the quality of the stitched image and the accuracy of defect detection. The comparison data is shown in Table 1.

[0113] Table 1 Comparison data between the present invention and the prior art

[0114]

[0115] As can be seen from the above table, the number of feature points generated by the AKAZE algorithm and nonlinear diffusion filtering in the present invention is much higher than that of the traditional method, indicating that the present invention is more sophisticated in the feature extraction process and can capture more key feature points, thereby improving the accuracy and stability of image stitching; in terms of image registration time, the method of the present invention is also significantly better than the traditional method. By utilizing grid model optimization and APAP algorithm, the stitching time has been greatly shortened, especially when registering more complex images, the registration speed has been significantly improved, highlighting the real-time advantage of the present invention; the stitching quality score in the table shows that the present invention successfully improves the detail retention and visual consistency of the stitched image through the multi-head self-attention mechanism in the improved recursive stitching neural network E-RSNet, reduces the stitching gaps and discontinuities, and ensures higher stitching quality; defect detection is one of the key applications of tension clamp X-ray image stitching. The data show that the defect detection accuracy of the stitching method of the present invention is significantly better than that of the traditional stitching method, further proving the efficiency and reliability of the method of the present invention in practical applications.

[0116] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A method for splicing digital radiographic images of tension clamps, characterized in that: include: Acquire a digital radiographic image of the tension clamp and perform preprocessing to obtain a preprocessed image; Performing feature point detection on the preprocessed image to extract feature points; Use the grid model to perform feature matching on the extracted feature points to obtain the image to be registered; Image fusion is performed based on the images to be registered to achieve splicing of digital radiographic images of the tension clamp.

2. The method for splicing digital radiographic images of tension clamps according to claim 1, characterized in that: The digital radiographic image of the tension clamp includes a reference image and a target image; Obtaining the preprocessed image refers to preprocessing the reference image and the target image to obtain the preprocessed reference image and the target image.

3. The method for splicing digital radiographic images of a tension clamp according to claim 2, characterized in that: Performing feature point detection on the preprocessed image refers to extracting feature points of the preprocessed reference image and the target image using the AKAZE algorithm; The feature point detection comprises the following steps: The scale space is constructed by nonlinear diffusion filtering, and the local difference binary descriptor M-LDB is introduced. The descriptor is obtained by the AKAZE feature algorithm. The nonlinear diffusion filter equation describes the brightness at different scale levels as the divergence of the flow function, and then describes the change of image brightness in different scale spaces. The specific formula is as follows: in, is the gradient; div(·) is the divergence; c(·) is the conduction function. The larger the evolution time t, the larger the scale parameter. In order to use the nonlinear diffusion filter equation, it is necessary to convert the discrete scale factor into a time unit, process the original image using Gaussian filtering, and use the value at the T% position of the gradient histogram of the input image after filtering as the control factor. After obtaining the input image and the control factor, the FED algorithm is used to solve the nonlinear diffusion filter equation to obtain the scale space. The specific formula of the scale space is as follows: L i+1 =[I+τA(L i )]L i Where I is the identity matrix; A(L i ) is the matrix of the image in dimension i; τ is the time step; After constructing the scale space, the non-maximum suppression method is used for each pixel to obtain the corresponding Hessian matrix; Detect feature points and compare them with other pixels at the same level and in the upper and lower layers, and then search for the maximum value of the Hessian matrix; Taylor formula is used to perform precise positioning at the sub-pixel level, and the corresponding position is the final positioning point of the feature point.

4. The method for splicing digital radiographic images of a tension clamp according to claim 3, characterized in that: The feature matching of the extracted feature points using the grid model refers to optimizing the grid model based on the APAP algorithm, taking global similarity and local similarity as constraints, and performing feature matching of the extracted feature points using the optimized grid model to obtain the image to be registered; The global similarity refers to adding global similarity constraints in order to reduce the distortion in the image registration process. Assume that image I i The scale factor s and rotation angle θ of , the specific formula of the global similarity constraint is as follows: Where V is all grid points; E i For image I i the edge of and is the coefficient of similarity transformation; is the weight function; The local similarity refers to the goal of reducing the overall image shape distortion, ensuring that the overlapping and non-overlapping regions are similar in transition, and gradually transitioning from the overlapping region to the non-overlapping region. The specific formula for the local similarity constraint is as follows: Among them, v i For image I i Grid points; is the position of the grid point on the original image; is the position of the deformed mesh point.

5. The method for splicing digital radiographic images of tension clamps according to claim 4, characterized in that: Performing image fusion based on the image to be registered refers to designing an improved recursive splicing neural network E-RSNet to perform image fusion; The core of the improved recursive splicing neural network E-RSNet lies in the recursive feature fusion module. The recursive feature fusion module integrates image features of different scales through a multi-level feature fusion strategy. Let the feature representation of the input image be Y1. Through the recursive feature fusion module and the point convolution kernel K point Perform convolution operation to obtain the fused feature representation Y. The specific formula is as follows: Y=Y1#K point Among them, # is the convolution operation; K point are the learnable point convolution kernel parameters; The network architecture design of the improved recursive splicing neural network E-RSNet is based on the encoder-decoder structure of EfficientNet, and the specific architecture is as follows: F encode =EfficientNet(X) F*decode=Decoder(F*encode) Y1=F*decode*K*depth Based on the core model, the improved recursive splicing neural network E-RSNet introduces a recursive feature fusion module and a multi-head self-attention mechanism, including: The recursive feature fusion module fuses features at different levels through multiple iterations; The multi-head self-attention mechanism enables the network to focus on key areas in the image.

6. The method for splicing digital radiographic images of a tension clamp according to claim 5, characterized in that: The self-attention mechanism focuses on important features by calculating the correlation weights between different positions. The specific formula of the self-attention mechanism is as follows: Where Q is the query; K is the key; V is the value; d k is the dimension of the key; The multi-head self-attention mechanism is applied many times in the improved recursive splicing neural network E-RSNet. By calculating attention in parallel in different subspaces, the global information in the image is mined. The self-attention mechanism is further expanded to obtain the multi-head self-attention mechanism. The specific formula of the multi-head self-attention mechanism is as follows: Y t+1 =Attention(Y t )+X*K depth Among them, Y t is the feature map after the tth iteration; Attention(·) is the processing result of the multi-head self-attention mechanism on the feature map.

7. The method for splicing digital radiographic images of a tension clamp according to claim 6, characterized in that: To improve the performance of the improved recursive splicing neural network E-RSNet, optimizations were performed on key modules, including the dynamic weight adjustment of the recursive feature fusion module, the hierarchical attention module of the multi-head self-attention mechanism, and the dynamic pruning and mixed precision quantization technology of the model. The dynamic weight adjustment of the recursive feature fusion module refers to the use of a dynamic weight adjustment strategy for the recursive feature fusion module, so that features at different levels can be adaptively assigned different weights during the fusion process. Suppose the feature of the first layer is Y (l) , the fusion formula after weight adjustment is as follows: Among them, α (l) is the dynamic weight parameter of the (l)th layer; The hierarchical attention module of the multi-head self-attention mechanism refers to the introduction of a hierarchical attention module in the multi-head self-attention mechanism to calculate the attention weights at different scales. The specific formula is as follows: MultiHeadAttention(Q,K,V)=Concat(head1,head2,…,head h )W O Head i =Attention(QW i Q ,KW i K ,VW i V ) Among them, head i is the attention of the i-th head.

8. A splicing system for digital radiographic images of tension clamps, based on the splicing method for digital radiographic images of tension clamps according to any one of claims 1 to 7, characterized in that: include, An image acquisition module is used to acquire a digital radiographic image of the tension clamp as a reference image and a target image and perform preprocessing to obtain a preprocessed reference image and a target image; A feature extraction module is used to extract feature points of the preprocessed reference image and target image using the AKAZE algorithm; The feature matching module is used to optimize the grid model by taking global similarity and local similarity as constraints based on the APAP algorithm, and perform feature matching on the extracted feature points using the optimized grid model to obtain the image to be registered; The image stitching module is used to fuse the images to be registered using the improved recursive stitching neural network E-RSNet.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for splicing digital radiographic images of tension clamps described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for splicing digital radiographic images of tension clamps described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Method and system for splicing digital X-ray images

    CN104732485A

  • Unmanned aerial vehicle aerial image splicing method based on linear feature protection and grid optimization

    CN112435163A

  • Power transmission line strain clamp defect detection method based on improved YOLOX algorithm

    CN114723750A

  • Lightweight model-based strain clamp defect detection method

    CN117237327A

  • System and method for image stitching

    WO2009055913A1

Cited By

  • Nondestructive testing method for strain clamp of power transmission line based on digital ray technology

    CN121188718A

  • A non-destructive testing method for strain clamp of power transmission line based on digital radiography technology

    CN121188718B