Cable tunnel three-dimensional reconstruction method and device, computer equipment, readable storage medium and program product

By acquiring cable tunnel images from multiple perspectives, and reconstructing the cable tunnel three-dimensional model using matching feature point sets and texture mapping matrix, the problem of insufficient accuracy caused by complex lighting conditions and repeated textures is solved, and high-precision three-dimensional reconstruction and texture mapping are achieved.

CN120339499APending Publication Date: 2025-07-18GUANGZHOU POWER SUPPLY BUREAU GUANGDONG POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510249688.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-04
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

In the prior art, the three-dimensional reconstruction model of cable tunnels is not high, mainly due to the complex lighting conditions and the insufficient model accuracy caused by repeated textures.

Method used

By acquiring multi-frame cable tunnel images from multiple perspectives, acquiring image sequences, determining the motion trajectory of the image acquisition device using the matching feature point set, reconstructing the three-dimensional model, and rendering texture information through the texture mapping matrix, optimizing the model using multi-view stereo vision and Poisson surface reconstruction algorithm.

Benefits of technology

The reconstruction accuracy and texture mapping quality of the three-dimensional model of cable tunnel are improved, and the visualization effect of the model and the overall accuracy of the three-dimensional model are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120339499A_ABST
    Figure CN120339499A_ABST
Patent Text Reader

Abstract

The invention relates to a cable tunnel three-dimensional reconstruction method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the steps of obtaining an image sequence; the image sequence comprises a plurality of frames of cable tunnel images obtained by shooting the cable tunnel at a plurality of visual angles through an image acquisition device; according to the matching feature point set in the cable tunnel image, determining a motion track of the image acquisition equipment; reconstructing a three-dimensional model corresponding to the cable tunnel according to the motion trail and the matched feature point set; through traversing a surface patch of the three-dimensional model, rendering texture information in the texture map to the surface of the three-dimensional model according to the texture mapping matrix to obtain a cable tunnel three-dimensional model; wherein the surface patch is correspondingly provided with a visual angle label; the visual angle labels are used for distinguishing texture information sources of all areas in the cable tunnel three-dimensional model. By adopting the method, the precision of three-dimensional model reconstruction can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of image processing, and particularly to a three-dimensional reconstruction method, device, computer device, computer-readable storage medium, and computer program product for a cable tunnel. Background Art

[0002] With the accelerating development of the urbanization process, the cable tunnel, as an important infrastructure for urban power supply, plays a crucial role in urban operation. The cable tunnel is usually used to protect the power transmission lines from the external environment and at the same time provide a space for easy detection and maintenance.

[0003] In order to obtain intuitive and accurate spatial information of the cable tunnel, it is necessary to perform three-dimensional reconstruction on the cable tunnel. However, due to the complex lighting conditions inside the cable tunnel, as well as repeated textures and obstacle occlusions, it is difficult to ensure the accuracy of the three-dimensional reconstruction model.

[0004] Therefore, there is a problem in the related art that the accuracy of the three-dimensional reconstruction model of the cable tunnel is not high. Summary of the Invention

[0005] Based on this, it is necessary to provide a three-dimensional reconstruction method, device, computer device, computer-readable storage medium, and computer program product for a cable tunnel that can improve the accuracy of the three-dimensional reconstruction model of the cable tunnel in view of the above technical problems.

[0006] In a first aspect, the present application provides a three-dimensional reconstruction method for a cable tunnel, including:

[0007] Obtaining an image sequence; the image sequence includes multiple frames of cable tunnel images obtained by an image acquisition device taking pictures of the cable tunnel from multiple perspectives;

[0008] Determining the movement trajectory of the image acquisition device according to the set of matching feature points in the cable tunnel images;

[0009] Reconstructing a three-dimensional model corresponding to the cable tunnel according to the movement trajectory and the set of matching feature points;

[0010] By traversing the patches of the three-dimensional model, rendering the texture information in the texture map onto the surface of the three-dimensional model according to the texture mapping matrix, a three-dimensional cable tunnel model is obtained; wherein, the patch corresponds to a view label; the view label is used to distinguish the source of the texture information of each region in the three-dimensional cable tunnel model.

[0011] In one embodiment, the obtaining the image sequence includes:

[0012] Obtain video frame images; the video frame images are obtained by the image acquisition device taking pictures of the cable tunnel from multiple perspectives;

[0013] Adjust the pixel value distribution of the video frame images to obtain adjusted video frame images; the image contrast of the adjusted video frame images is higher than that of the video frame images;

[0014] Perform gamma transformation on the adjusted video frame images to obtain the cable tunnel images.

[0015] In one embodiment, the method further includes:

[0016] Extract feature points from each frame of the cable tunnel images;

[0017] Perform high-dimensional description on each of the feature points to obtain high-dimensional vector descriptions of each of the feature points;

[0018] Determine matching feature points according to the similarity between the high-dimensional vector descriptions of each of the feature points to obtain the set of matching feature points.

[0019] In one embodiment, the determining the motion trajectory of the image acquisition device according to the set of matching feature points in the cable tunnel images includes:

[0020] In each iteration process, randomly extract multiple groups of non-collinear feature points that meet the preset quantity from the set of matching feature points to obtain a subset of feature points;

[0021] Determine a transformation matrix according to the subset of feature points; the transformation matrix is used to describe the relative position and attitude of the image acquisition device between the cable tunnel images;

[0022] Determine the matrix score corresponding to the transformation matrix according to the projection error between the remaining feature points in the set of matching feature points and the transformation matrix;

[0023] After reaching the number of iterations, among the transformation matrices obtained in each iteration, select the transformation matrix with the highest matrix score as the target transformation matrix; the target transformation matrix is used to characterize the motion trajectory of the image acquisition device.

[0024] In one embodiment, the determining the matrix score corresponding to the transformation matrix according to the projection error between the remaining feature points in the set of matching feature points and the transformation matrix includes:

[0025] Determine the number of inliers according to the projection error between the remaining feature points in the set of matching feature points and the transformation matrix; the inliers include the remaining feature points with a projection error less than the error threshold from the transformation matrix;

[0026] Determine the number of the internal points as the matrix fraction corresponding to the transformation matrix.

[0027] In one embodiment, the reconstructing the three-dimensional model corresponding to the cable tunnel according to the motion trajectory and the set of matching feature points includes:

[0028] Generating sparse point cloud data according to the motion trajectory and the set of matching feature points by a multi-view stereo vision algorithm;

[0029] Optimizing the sparse point cloud data to generate dense point cloud data;

[0030] Connecting the dense point cloud data into a mesh by a Poisson surface reconstruction algorithm to obtain the three-dimensional model.

[0031] In a second aspect, the present application further provides a three-dimensional reconstruction device for a cable tunnel, including:

[0032] An acquisition module, configured to acquire an image sequence; the image sequence includes multiple frames of cable tunnel images obtained by photographing a cable tunnel at multiple perspectives by an image acquisition device;

[0033] A determination module, configured to determine the motion trajectory of the image acquisition device according to the set of matching feature points in the cable tunnel image;

[0034] A reconstruction module, configured to reconstruct the three-dimensional model corresponding to the cable tunnel according to the motion trajectory and the set of matching feature points;

[0035] A rendering module, configured to render the texture information in the texture map onto the surface of the three-dimensional model by traversing the patches of the three-dimensional model according to a texture mapping matrix to obtain a three-dimensional model of the cable tunnel; wherein, the patches are corresponding to view angle labels; the view angle labels are used to distinguish the sources of the texture information of each region in the three-dimensional model of the cable tunnel.

[0036] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the steps of the above method are implemented.

[0037] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0038] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0039] The above three-dimensional reconstruction method, device, computer device, computer-readable storage medium and computer program product for cable tunnels obtain an image sequence, which includes multiple frames of cable tunnel images captured by an image acquisition device from multiple perspectives. Determine the movement trajectory of the image acquisition device according to the matching feature point set in the cable tunnel images. Reconstruct the three-dimensional model corresponding to the cable tunnel according to the movement trajectory and the matching feature point set. By traversing the patches of the three-dimensional model and according to the texture mapping matrix, render the texture information in the texture map to the surface of the three-dimensional model to obtain the three-dimensional model of the cable tunnel. Among them, each patch corresponds to a view label, and the view label is used to distinguish the source of the texture information of each area in the three-dimensional model of the cable tunnel.

[0040] In this way, by collecting multiple frames of cable tunnel images from multiple perspectives to form an image sequence, detailed information about different angles and positions of the cable tunnel can be obtained. By determining the matching feature point set of multiple frames of cable tunnel images, the movement trajectory of the image acquisition device can be determined more accurately. Thus, according to the movement trajectory and the matching feature point set, the surface of the three-dimensional model corresponding to the cable tunnel can be reconstructed more accurately. Then, by traversing the patches of the three-dimensional model and according to the texture mapping matrix, the texture information in the texture map can be more accurately rendered to the surface of the three-dimensional model to obtain the three-dimensional model of the cable tunnel. Among them, each patch corresponds to a view label used to distinguish the source of the texture information of each area in the three-dimensional model of the cable tunnel, which can solve the problem of repeated textures in the scene, effectively improve the quality of texture mapping, enhance the visualization effect of the model, achieve high-precision texture mapping of the three-dimensional model, and improve the accuracy of three-dimensional model reconstruction. Brief Description of the Drawings

[0041] To more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required for describing the embodiments of the present application or related technologies. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.

[0042] Figure 1 It is a schematic flowchart of a three-dimensional reconstruction method for a cable tunnel in an embodiment;

[0043] Figure 2 It is a schematic flowchart of the step of determining the movement trajectory of the image acquisition device in an embodiment;

[0044] Figure 3 It is a schematic flowchart of a three-dimensional reconstruction method for a cable tunnel in another embodiment;

[0045] Figure 4It is a structural block diagram of a three-dimensional reconstruction device for a cable tunnel in an embodiment;

[0046] Figure 5 It is an internal structure diagram of a computer device in an embodiment. Specific implementation manners

[0047] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0048] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and do not necessarily need to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0049] In one embodiment, as Figure 1 shown, a three-dimensional reconstruction method for a cable tunnel is provided. In this embodiment, the method is illustrated by taking the application of the method to a computer device as an example. It can be understood that the computer device can be a terminal, a server, or a system including a terminal and a server. In this embodiment, the method includes the following steps:

[0050] Step S110, obtaining an image sequence.

[0051] Among them, the image sequence includes multiple frames of cable tunnel images obtained by an image acquisition device by photographing the cable tunnel from multiple perspectives.

[0052] Among them, the image acquisition device includes, but is not limited to, a camera, a drone, etc.

[0053] In specific implementation, the computer device can obtain an image sequence composed of multiple frames of cable tunnel images obtained by an image acquisition device by photographing the cable tunnel from multiple perspectives. Specifically, the computer device can obtain cable tunnel video stream data obtained by photographing the cable tunnel and extract multiple frames of cable tunnel images from the cable tunnel video stream data according to a preset frequency.

[0054] In practical applications, it is possible to take pictures of the cable tunnel of a Gas Insulated Transmission Line (GIL). Since its interior is spacious and there are few obstructions, the shooting effect is relatively good, thus obtaining video stream data of the cable tunnel.

[0055] In practical applications, Python algorithms can be used to extract image sequences from the video stream data of the cable tunnel as the input for reconstruction data.

[0056] Step S120: Determine the motion trajectory of the image acquisition device according to the set of matching feature points in the cable tunnel images.

[0057] Among them, the set of matching feature points includes the matching feature points in the cable tunnel images. By extracting the feature points in each cable tunnel image for feature point matching, the feature points corresponding to the same point in the real world in different images can be determined.

[0058] In specific implementation, after the computer device obtains the cable tunnel images, it can extract the feature points in each cable tunnel image and perform feature point matching to determine the set of matching feature points in the cable tunnel images, so as to determine the motion trajectory of the image acquisition device according to the set of matching feature points.

[0059] Specifically, the computer device can use the Random Sample Consensus (RANSAC) algorithm to sample and iterate the set of matching feature points, calculate the relative position and attitude of the image acquisition device between the cable tunnel images, and obtain the motion trajectory of the image acquisition device.

[0060] Step S130: Reconstruct the three-dimensional model corresponding to the cable tunnel according to the motion trajectory and the set of matching feature points.

[0061] In specific implementation, the computer device can reconstruct the three-dimensional model corresponding to the cable tunnel according to the motion trajectory and the set of matching feature points.

[0062] Specifically, the computer device can use the motion trajectory of the image acquisition device, utilize the Multi-View Stereopsis (MVS) technology, and combine the set of matching feature points to generate the three-dimensional model corresponding to the cable tunnel.

[0063] Step S140: By traversing the patches of the three-dimensional model and according to the texture mapping matrix, render the texture information in the texture map to the surface of the three-dimensional model to obtain the three-dimensional model of the cable tunnel.

[0064] Among them, the texture map is used to simulate various details on the surface of the cable tunnel, such as color, pattern, roughness, etc.

[0065] Among them, the patch corresponds to a view label.

[0066] Among them, the view label is used to distinguish the source of texture information for each area in the three-dimensional model of the cable tunnel.

[0067] Among them, when reconstructing the three-dimensional model corresponding to the cable tunnel according to the motion trajectory and the set of matching feature points, what is reconstructed is the surface of the unrendered three-dimensional model.

[0068] Among them, the texture mapping matrix can be used to represent the mapping relationship between the UV coordinates on the texture map and the vertex coordinates on the three-dimensional model.

[0069] In a specific implementation, the computer device can obtain the texture mapping matrix and the texture map, and by traversing the patches of the three-dimensional model, according to the texture mapping matrix, render the texture information in the texture map onto the surface of the three-dimensional model to obtain the three-dimensional model of the cable tunnel. Among them, the patch corresponds to a view label, and the view label is used to distinguish the source of texture information for each area in the three-dimensional model of the cable tunnel.

[0070] In practical applications, the computer device constructs a texture mapping matrix and corresponds the texture information of the two-dimensional texture map to the three-dimensional model through the texture mapping matrix. Specifically, it includes: assigning view labels to the patches of the three-dimensional model to distinguish the source of texture information for each area; traversing the patches of the three-dimensional model and seamlessly pasting the texture information onto the surface of the three-dimensional model.

[0071] In the above three-dimensional reconstruction method of the cable tunnel, an image sequence is obtained; the image sequence includes multiple frames of cable tunnel images taken by an image acquisition device at multiple viewpoints; the motion trajectory of the image acquisition device is determined according to the set of matching feature points in the cable tunnel images; the three-dimensional model corresponding to the cable tunnel is reconstructed according to the motion trajectory and the set of matching feature points; by traversing the patches of the three-dimensional model, according to the texture mapping matrix, the texture information in the texture map is rendered onto the surface of the three-dimensional model to obtain the three-dimensional model of the cable tunnel; among them, the patch corresponds to a view label; the view label is used to distinguish the source of texture information for each area in the three-dimensional model of the cable tunnel to solve the problem of duplicate textures in the scene.

[0072] In this way, by collecting multiple frames of cable tunnel images from multiple perspectives to form an image sequence, detailed information about different angles and positions of the cable tunnel can be obtained. By determining the set of matching feature points of multiple frames of cable tunnel images, the motion trajectory of the image acquisition device can be more accurately determined. Thus, based on the motion trajectory and the set of matching feature points, the surface of the corresponding three-dimensional model of the cable tunnel can be more accurately reconstructed. Then, by traversing the patches of the three-dimensional model and according to the texture mapping matrix, the texture information in the texture map can be more accurately rendered onto the surface of the three-dimensional model to obtain the three-dimensional model of the cable tunnel. Among them, each patch corresponds to a view tag for distinguishing the source of texture information for each region in the three-dimensional model of the cable tunnel, which can solve the problem of repeated textures in the scene, thereby effectively improving the quality of texture mapping, enhancing the visualization effect of the model, achieving high-precision texture mapping of the three-dimensional model, and improving the accuracy of three-dimensional model reconstruction.

[0073] In one embodiment, obtaining the image sequence includes: obtaining video frame images; the video frame images are obtained by photographing the cable tunnel from multiple perspectives using an image acquisition device; adjusting the pixel value distribution of the video frame images to obtain adjusted video frame images; the image contrast of the adjusted video frame images is higher than that of the video frame images; performing gamma transformation on the adjusted video frame images to obtain cable tunnel images.

[0074] In specific implementation, during the process of the computer device obtaining the image sequence, the computer device can extract multiple frames of images from the cable tunnel video stream data at a preset frequency to obtain video frame images. Due to the complex internal light in the tunnel, there are problems of brightness difference and detail loss in the video frame images. It is necessary to use the method of image enhancement preprocessing, such as adjusting the pixel value distribution of the video frame images by histogram equalization to enhance the image contrast and improve the image quality of the video frame images to obtain cable tunnel images suitable for three-dimensional reconstruction.

[0075] Specifically, the computer device can adjust the pixel value distribution of the video frame images to obtain adjusted video frame images such that the image contrast of the adjusted video frame images is higher than that of the video frame images. Further, the computer device can adjust the pixel value distribution by histogram equalization to enhance the image contrast and highlight the details in the dark part, making the lining surface information of the tunnel clearer. After obtaining the adjusted video frame images, gamma transformation (Gamma Transformation) can be performed on the adjusted video frame images, and the video frame images after gamma transformation are used as cable tunnel images. Among them, based on histogram equalization, gamma transformation can solve the problems of too high brightness and glare.

[0076] The technical solution of this embodiment is to obtain video frame images, which are obtained by an image acquisition device taking pictures of a cable tunnel from multiple perspectives; adjust the pixel value distribution of the video frame images to obtain adjusted video frame images, and the image contrast of the adjusted video frame images is higher than that of the video frame images; perform gamma transformation on the adjusted video frame images to obtain cable tunnel images. In this way, due to the complex internal light of the tunnel, there are problems of brightness difference and detail loss in the video frame images. By adjusting the pixel value distribution of the images, the image contrast is enhanced, the details in the dark parts are highlighted, and the lining surface information of the tunnel is made clearer. The gamma transformation can solve the problems of too high brightness and glare, overcome the problem of complex lighting conditions, and improve the image quality.

[0077] In one embodiment, the method further includes: extracting feature points from each frame of cable tunnel images; performing high-dimensional description on each feature point to obtain high-dimensional vector descriptions of each feature point; and determining matching feature points according to the similarity between the high-dimensional vector descriptions of each feature point to obtain a set of matching feature points.

[0078] In specific implementation, when the computer device determines the set of matching feature points in the cable tunnel images, the computer device can extract feature points from each frame of cable tunnel images. Specifically, the Scale Invariant Feature Transform (SIFT) algorithm can be used to extract feature points from the cable tunnel images. SIFT is a robust image feature description method that can detect key points (such as corner points and edge points) and maintain stability under different scales and rotation conditions. Further, in the process of extracting feature points by the computer device, local extreme points in the cable tunnel images can be detected through the Difference of Gaussians function, and these local extreme points are used as feature points.

[0079] And a descriptor is generated for each feature point. The descriptor is usually a vector used to depict the local image features of the feature point. For example, the SIFT descriptor is generated by calculating the gradient direction and amplitude in the area around the feature point. By comparing the feature point descriptors in different cable tunnel images, similar feature point pairs are found as the matching feature point pairs.

[0080] Further, high-dimensional description can be performed on the feature points to generate descriptors for the feature points. Specifically, by performing high-dimensional description on the feature points, high-dimensional vector descriptions of each feature point are obtained, so that matching feature points can be determined according to the similarity between the high-dimensional vector descriptions of feature points in different frames of cable tunnel images, and then a set of matching feature points is obtained.

[0081] In practical applications, the similarity of feature points between different cable tunnel images can be measured by calculating the distances between the high-dimensional vector descriptions of the feature points (such as Euclidean Distance, Hamming Distance, etc.), so as to determine the matching feature points.

[0082] In multiple frames of cable tunnel images, for a feature point in a given image, find the feature point with the closest distance to its high-dimensional vector description in another image as the matching point. To improve the accuracy of matching, a distance threshold can be set, and only when the distance is less than this distance threshold is it considered a valid matching point. In addition, some optimization strategies can be adopted, such as two-way matching, that is, not only matching from the first image to the second image, but also from the second image to the first image. Only when corresponding matching points can be found in both directions is it confirmed that this is a more reliable matching.

[0083] The technical solution of this embodiment extracts the feature points in each frame of cable tunnel image; performs high-dimensional description on each feature point to obtain the high-dimensional vector description of each feature point; determines the matching feature points according to the similarity between the high-dimensional vector descriptions of each feature point, and obtains the matching feature point set. In this way, by performing high-dimensional description on the feature points extracted from each frame of cable tunnel image and according to the similarity between the high-dimensional vector descriptions of each feature point, the matching feature points can be more accurately screened out, and accurate feature point matching can reduce the error in the reconstruction process.

[0084] In one embodiment, as Figure 2 shown, step S120, determining the motion trajectory of the image acquisition device according to the matching feature point set in the cable tunnel image, includes the following steps:

[0085] Step S210, in each iteration process, randomly extract multiple groups of non-collinear feature points that meet the preset quantity from the matching feature point set to obtain a feature point subset.

[0086] Step S220, determining a transformation matrix according to the feature point subset.

[0087] Among them, the transformation matrix is used to describe the relative position and attitude of the image acquisition device between cable tunnel images.

[0088] Step S230, determining the matrix score corresponding to the transformation matrix according to the projection error between the remaining feature points in the matching feature point set and the transformation matrix.

[0089] Step S240, after reaching the iteration number, among the transformation matrices obtained in each iteration, select the transformation matrix with the highest matrix score as the target transformation matrix; the target transformation matrix is used to represent the motion trajectory of the image acquisition device.

[0090] In a specific implementation, when the computer device samples and iterates the set of matched feature points to calculate the relative position and attitude of the image acquisition device between cable tunnel images and obtain the motion trajectory of the image acquisition device, in each iteration process, multiple groups of non-collinear feature points satisfying a preset quantity can be randomly selected from the set of matched feature points to obtain a subset of feature points; for example, 4 groups of non-collinear feature points are randomly selected from the set of matched feature points as the subset of feature points; then, according to the subset of feature points, a transformation matrix is determined; the transformation matrix is used to describe the relative position and attitude of the image acquisition device between cable tunnel images; the projection error between the remaining feature points in the set of matched feature points and the transformation matrix is detected to determine the matrix score corresponding to the transformation matrix; after reaching the preset number of iterations, among the transformation matrices obtained in each iteration, the transformation matrix with the highest matrix score is selected as the target transformation matrix, where the target transformation matrix is used to characterize the motion trajectory of the image acquisition device.

[0091] Among them, when the computer device determines the matrix score corresponding to the transformation matrix according to the projection error between the remaining feature points in the set of matched feature points and the transformation matrix, the number of inliers can be determined according to the projection error between the remaining feature points in the set of matched feature points and the transformation matrix; where the inliers include the remaining feature points with a projection error less than the error threshold between them and the transformation matrix; the number of inliers is determined as the matrix score corresponding to the transformation matrix.

[0092] Among them, the inliers are the remaining feature points with a projection error less than the error threshold between them and the transformation matrix. The more the number of inliers, the better the transformation matrix can describe the corresponding relationship between these feature points, that is, the transformation matrix is more in line with the actual situation. The number of inliers directly reflects the fitting degree of the transformation matrix to the data. By using the number of inliers as the matrix score, different transformation matrices can be quantitatively evaluated more efficiently, quickly determining which transformation matrix is better, thereby providing a clearer criterion for selecting the target transformation matrix in the follow-up.

[0093] The technical solution of this embodiment is as follows: in each iteration process, multiple groups of non-collinear feature points satisfying a preset quantity are randomly selected from the set of matched feature points to obtain a subset of feature points; according to the subset of feature points, a transformation matrix is determined; the transformation matrix is used to describe the relative position and attitude of the image acquisition device between cable tunnel images; according to the projection error between the remaining feature points in the set of matched feature points and the transformation matrix, the matrix score corresponding to the transformation matrix is determined; after reaching the number of iterations, among the transformation matrices obtained in each iteration, the transformation matrix with the highest matrix score is selected as the target transformation matrix; the target transformation matrix is used to characterize the motion trajectory of the image acquisition device.

[0094] In this way, randomly extracting a subset of feature points in each iteration to calculate the transformation matrix can effectively avoid the adverse effects of interference factors such as noise and mismatched points on the result. Even if there are a large number of outliers (mismatched points) in the dataset, the correct combination of feature points can be found through multiple random samplings, so as to calculate an accurate transformation matrix, which has strong robustness. By continuously iteratively calculating the transformation matrices corresponding to different subsets of feature points and evaluating the matrix scores according to the projection error, the transformation matrix with the highest score is finally selected as the target transformation matrix, which can more accurately describe the relative position and attitude of the image acquisition device between cable tunnel images, and then accurately characterize its motion trajectory.

[0095] In one embodiment, according to the motion trajectory and the set of matched feature points, a three-dimensional model corresponding to the cable tunnel is reconstructed, including: generating sparse point cloud data through a multi-view stereo vision algorithm according to the motion trajectory and the set of matched feature points; optimizing the sparse point cloud data to generate dense point cloud data; and connecting the dense point cloud data into a mesh through a Poisson surface reconstruction algorithm to obtain a three-dimensional model.

[0096] In specific implementation, when the computer device reconstructs the three-dimensional model corresponding to the cable tunnel according to the motion trajectory and the set of matched feature points, it can generate sparse point cloud data of the cable tunnel based on the motion trajectory, using a multi-view stereo vision algorithm and combining the set of matched feature points. Taking the sparse point cloud data as input, higher-resolution dense point cloud data is generated through an optimization algorithm, and at the same time, noise is removed from the outliers to ensure the integrity of the model. Then, the Poisson surface reconstruction algorithm (Poisson Surface Reconstruction, PSR) is used to connect the dense point cloud data into a mesh to generate the surface of the three-dimensional model. Among them, the PSR algorithm is based on implicit function interpolation technology, which can effectively eliminate the outliers in the point cloud and infer the locally missing areas to generate a complete surface without holes.

[0097] The technical solution of this embodiment can accurately generate sparse point cloud data through a multi-view stereo vision algorithm according to the motion trajectory and the set of matched feature points; optimize the sparse point cloud data to generate high-resolution dense point cloud data; and then connect the dense point cloud data into a mesh through the Poisson surface reconstruction algorithm to obtain a three-dimensional model. The Poisson surface reconstruction algorithm is based on implicit function interpolation technology, which can effectively eliminate the outliers in the point cloud and infer the locally missing areas to generate a complete surface without holes, effectively improving the integrity of the three-dimensional model reconstruction.

[0098] In another embodiment, as Figure 3 shown, a flow schematic diagram of a three-dimensional reconstruction method for a cable tunnel is provided, including the following steps:

[0099] Step S302: Obtain a video frame image, adjust the pixel value distribution of the video frame image, and obtain an adjusted video frame image.

[0100] Step S304: Perform gamma transformation on the adjusted video frame image to obtain a cable tunnel image.

[0101] Step S306: Extract feature points in each frame of the cable tunnel image.

[0102] Step S308: Perform high-dimensional description on each feature point to obtain a high-dimensional vector description of each feature point.

[0103] Step S310: Determine the matching feature points according to the similarity between the high-dimensional vector descriptions of each feature point, and obtain a set of matching feature points.

[0104] Step S312: In each iteration process, randomly extract multiple groups of non-collinear feature points that meet the preset quantity from the set of matching feature points to obtain a subset of feature points.

[0105] Step S314: Determine a transformation matrix according to the subset of feature points.

[0106] Step S316: Determine the number of inliers according to the projection error between the remaining feature points in the set of matching feature points and the transformation matrix.

[0107] Step S318: Determine the matrix score corresponding to the transformation matrix as the number of inliers.

[0108] Step S320: After reaching the iteration number, among the transformation matrices obtained in each iteration, select the transformation matrix with the highest matrix score as the target transformation matrix; the target transformation matrix is used to represent the motion trajectory of the image acquisition device.

[0109] Step S322: Through the multi-view stereo vision algorithm, generate sparse point cloud data according to the motion trajectory and the set of matching feature points.

[0110] Step S324: Optimize the sparse point cloud data to generate dense point cloud data.

[0111] Step S326: Connect the dense point cloud data into a mesh through the Poisson surface reconstruction algorithm to obtain a three-dimensional model.

[0112] Step S328: By traversing the patches of the three-dimensional model, render the texture information in the texture map to the surface of the three-dimensional model according to the texture mapping matrix to obtain a three-dimensional model of the cable tunnel.

[0113] It should be noted that the specific limitations of the above steps can refer to the specific limitations of a three-dimensional reconstruction method for a cable tunnel mentioned above.

[0114] Finally, the quality of feature points is optimized through reconstruction method optimization to improve the accuracy of the 3D reconstruction model: 1. By optimizing the feature point extraction algorithm, ensure that the feature points are evenly distributed and sufficient in number, thereby improving the matching rate and the accuracy of trajectory calculation; 2. Compare the impacts of different numbers of images and modeling quality, reduce unnecessary calculation steps through algorithm optimization, improve the efficiency of 3D reconstruction, and meet the requirements for modeling speed in engineering.

[0115] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are sequentially shown in the direction of the arrows, these steps do not necessarily need to be executed in the order indicated by the arrows. Unless otherwise clearly stated in this article, the execution of these steps is not strictly restricted by order, and these steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages do not necessarily need to be executed at the same moment, but can be executed at different moments. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in rotation with at least some of the steps or stages in other steps or other steps.

[0116] Based on the same inventive concept, the embodiments of the present application further provide a cable tunnel 3D reconstruction device for implementing the above-mentioned cable tunnel 3D reconstruction method. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the following cable tunnel 3D reconstruction device can refer to the limitations on the cable tunnel 3D reconstruction method in the above text, and will not be repeated here.

[0117] In an exemplary embodiment, as Figure 4 shown, a cable tunnel 3D reconstruction device is provided, including: an acquisition module 410, a determination module 420, a reconstruction module 430, and a rendering module 440, where:

[0118] The acquisition module 410 is used to acquire an image sequence; the image sequence includes multiple frames of cable tunnel images obtained by photographing the cable tunnel from multiple perspectives by an image acquisition device.

[0119] The determination module 420 is used to determine the motion trajectory of the image acquisition device according to the set of matching feature points in the cable tunnel images.

[0120] The reconstruction module 430 is used to reconstruct the 3D model corresponding to the cable tunnel according to the motion trajectory and the set of matching feature points.

[0121] A rendering module 440, configured to render texture information in a texture map onto the surface of the 3D model by traversing patches of the 3D model according to a texture mapping matrix, so as to obtain a 3D cable tunnel model; wherein, a viewing angle label corresponds to each patch; and the viewing angle label is used to distinguish the source of texture information for each area in the 3D cable tunnel model.

[0122] In one embodiment, the obtaining module 410 is specifically configured to obtain video frame images, where the video frame images are obtained by the image acquisition device capturing the cable tunnel from multiple viewing angles; adjust the pixel value distribution of the video frame images to obtain adjusted video frame images, where the image contrast of the adjusted video frame images is higher than that of the video frame images; and perform gamma transformation on the adjusted video frame images to obtain the cable tunnel images.

[0123] In one embodiment, the apparatus further includes: a feature matching module, configured to extract feature points from each frame of the cable tunnel images; perform high-dimensional description on each of the feature points to obtain high-dimensional vector descriptions of the feature points; and determine matching feature points according to the similarity between the high-dimensional vector descriptions of the feature points to obtain the set of matching feature points.

[0124] In one embodiment, the determining module 420 is specifically configured to, in each iteration process, randomly extract multiple groups of non-collinear feature points that meet a preset quantity from the set of matching feature points to obtain a subset of feature points; determine a transformation matrix according to the subset of feature points, where the transformation matrix is used to describe the relative position and attitude of the image acquisition device between the cable tunnel images; determine a matrix score corresponding to the transformation matrix according to the projection error between the remaining feature points in the set of matching feature points and the transformation matrix; after reaching the iteration number, select the transformation matrix with the highest matrix score from the transformation matrices obtained in each iteration as the target transformation matrix, where the target transformation matrix is used to characterize the motion trajectory of the image acquisition device.

[0125] In one embodiment, the determining module 420 is specifically configured to determine the number of inliers according to the projection error between the remaining feature points in the set of matching feature points and the transformation matrix, where the inliers include the remaining feature points with a projection error less than an error threshold with respect to the transformation matrix; and determine the number of inliers as the matrix score corresponding to the transformation matrix.

[0126] In one embodiment, the reconstruction module 430 is specifically configured to generate sparse point cloud data based on the motion trajectory and the set of matched feature points through a multi-view stereo vision algorithm; optimize the sparse point cloud data to generate dense point cloud data; and connect the dense point cloud data into a mesh through a Poisson surface reconstruction algorithm to obtain the three-dimensional model.

[0127] Each module in the above cable tunnel three-dimensional reconstruction device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in or independent of a processor in a computer device in the form of hardware, or stored in a memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above respective modules.

[0128] In an exemplary embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 5 shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used for exchanging information between the processor and external devices. The communication interface of the computer device is used for communicating with external terminals in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a cable tunnel three-dimensional reconstruction method. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covered on the display screen, or a button, a trackball, or a touchpad provided on the computer device housing, or an external keyboard, touchpad, or mouse, etc.

[0129] Those skilled in the art can understand that Figure 5 the structure shown in

[0130] In one embodiment, a computer device is further provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the above method embodiments are implemented.

[0131] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0132] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0133] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., and are not limited thereto. The processors involved in the embodiments provided in this application can be general-purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, artificial intelligence (AI) processors, etc., and are not limited thereto.

[0134] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this application.

[0135] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation to the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims

1. A three-dimensional reconstruction method for a cable tunnel, characterized in that The method includes: Obtaining an image sequence; the image sequence includes multiple frames of cable tunnel images obtained by photographing a cable tunnel from multiple perspectives using an image acquisition device; Determining the motion trajectory of the image acquisition device according to the set of matching feature points in the cable tunnel images; Reconstructing a three-dimensional model corresponding to the cable tunnel according to the motion trajectory and the set of matching feature points; By traversing the faces of the three-dimensional model and according to the texture mapping matrix, rendering the texture information in the texture map to the surface of the three-dimensional model to obtain a three-dimensional cable tunnel model; wherein, each face corresponds to a view label; the view label is used to distinguish the source of the texture information of each region in the three-dimensional cable tunnel model.

2. The method according to claim 1, wherein The obtaining of the image sequence includes: Obtaining video frame images; the video frame images are obtained by photographing the cable tunnel from multiple perspectives using the image acquisition device; Adjusting the pixel value distribution of the video frame images to obtain adjusted video frame images; the image contrast of the adjusted video frame images is higher than that of the video frame images; Performing gamma transformation on the adjusted video frame images to obtain the cable tunnel images.

3. The method according to claim 1, characterized in that, The method further includes: Extracting feature points from each frame of the cable tunnel images; Performing high-dimensional description on each of the feature points to obtain high-dimensional vector descriptions of each of the feature points; Determining matching feature points according to the similarity between the high-dimensional vector descriptions of each of the feature points to obtain the set of matching feature points.

4. The method according to claim 1, characterized in that, The determining of the motion trajectory of the image acquisition device according to the set of matching feature points in the cable tunnel images includes: In each iteration process, randomly extracting multiple groups of non-collinear feature points that meet a preset quantity from the set of matching feature points to obtain a subset of feature points; Determining a transformation matrix according to the subset of feature points; the transformation matrix is used to describe the relative position and attitude of the image acquisition device between the cable tunnel images; Determining the matrix score corresponding to the transformation matrix according to the projection error between the remaining feature points in the set of matching feature points and the transformation matrix; After reaching the number of iterations, among the transformation matrices obtained in each iteration, selecting the transformation matrix with the highest matrix score as the target transformation matrix; the target transformation matrix is used to represent the motion trajectory of the image acquisition device.

5. The method according to claim 4, wherein The determining of the matrix score corresponding to the transformation matrix according to the projection error between the remaining feature points in the set of matching feature points and the transformation matrix includes: Determining the number of inliers according to the projection error between the remaining feature points in the set of matching feature points and the transformation matrix; the inliers include the remaining feature points with a projection error less than the error threshold from the transformation matrix; Determining the number of inliers as the matrix score corresponding to the transformation matrix.

6. The method according to claim 1, characterized in that, The reconstructing of the three-dimensional model corresponding to the cable tunnel according to the motion trajectory and the set of matching feature points includes: Generating sparse point cloud data through a multi-view stereo vision algorithm according to the motion trajectory and the set of matching feature points; Optimizing the sparse point cloud data to generate dense point cloud data; Connect the dense point cloud data into a mesh through the Poisson surface reconstruction algorithm to obtain the three-dimensional model.

7. A three-dimensional reconstruction device for a cable tunnel, characterized in that, The device includes: An acquisition module, configured to acquire an image sequence; the image sequence includes multiple frames of cable tunnel images obtained by photographing a cable tunnel from multiple perspectives using an image acquisition device; A determination module, configured to determine the motion trajectory of the image acquisition device according to the set of matching feature points in the cable tunnel images; A reconstruction module, configured to reconstruct a three-dimensional model corresponding to the cable tunnel according to the motion trajectory and the set of matching feature points; A rendering module, configured to traverse the patches of the three-dimensional model, and render the texture information in the texture map onto the surface of the three-dimensional model according to the texture mapping matrix to obtain a three-dimensional cable tunnel model; wherein, the patch corresponds to a view label; the view label is used to distinguish the source of the texture information of each area in the three-dimensional cable tunnel model.

8. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 6.