An automatic coloring method and system for bridge pier point clouds based on deep learning and optical photographs
Through deep learning-based methods, using technologies such as Rodriguez equation and LoFTR model, automatic coloring of bridge pier point clouds is realized, which solves the problem of difficulty in coloring low-texture bridge pier point clouds with traditional methods, reduces costs and improves accuracy. .
Patent Information
- Application Number
- CN202410680188.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-29
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-05-29
AI Technical Summary
Existing automatic coloring methods for bridge pier point clouds are difficult to effectively process bridge pier point clouds on low-texture surfaces. Traditional methods require sensors such as GNSS and IMU, and have insufficient registration capabilities for lidar point clouds and images of low-texture scenes.
Using a method based on deep learning, the bridge pier point cloud intensity map is generated through rigid rotation and projection transformation of the Rodriguez equation, combined with Hough probabilistic line detection and adjacent pixel interpolation algorithms for hole removal, using the LoFTR model to extract points with the same name, and passing USAC Perform mismatch elimination and registration with the MAGSAC algorithm to achieve automatic coloring of bridge pier point clouds.
It eliminates the need for GNSS and IMU sensors, reduces costs, improves the coloring accuracy and robustness of bridge pier point clouds, and meets the needs for automatic coloring of bridge pier point clouds on low-texture surfaces.
Smart Images

Figure CN118262030B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of digitalization of transportation infrastructure, and in particular to a method and system for automatic coloring of bridge pier point clouds based on deep learning and optical photographs. Background Art
[0002] As my country's transportation infrastructure develops towards digital construction, a large number of bridges need to be digitally modeled. LiDAR can quickly obtain high-precision three-dimensional spatial data of the structure, which can be used to build accurate three-dimensional models of infrastructure and provide reliable spatial basic data for infrastructure informatization. However, the point cloud data obtained by LiDAR scanning only has reflection intensity and three-dimensional coordinate information, and cannot obtain the spectral information of the target object, which is not conducive to the understanding and further application of the model.
[0003] In view of the lack of true color in point clouds, the main solution is to take optical photos of the structure while collecting the structure point cloud, develop an algorithm for registering the structure's laser point cloud and optical photos, and finally complete the mapping of the optical photo color to the point cloud. This method is mainly divided into two models, namely the sensor strict model and the empirical model. The former relies on sensors such as the global positioning system GNSS and the inertial measurement unit IMU to establish a complex model. The equipment is expensive and the calculation is complex; it is difficult to meet the needs of coloring a large number of bridge pier point clouds. The latter is only suitable for coloring large scene point clouds, and has insufficient registration capabilities for low-texture scene lidar point clouds and images. However, the materials of bridge piers are mainly concrete and steel, and the surfaces of the materials lack texture. The existing empirical models make it difficult to automatically color the bridge pier point clouds. Summary of the invention
[0004] The purpose of the present invention is to propose a method and system for automatic coloring of bridge pier point clouds based on deep learning and optical photographs, which does not require sensors such as GNSS and IMU, and can extract and align the same-name points of bridge pier point clouds and optical photographs on low-texture surfaces, thereby realizing the automation of bridge pier point cloud coloring.
[0005] According to a first aspect of an embodiment of the present disclosure, a method for automatic coloring of a bridge pier point cloud based on deep learning and optical photographs is provided, comprising the following steps:
[0006] Generate the point cloud strength map of the bridge pier based on the rigid rotation and projection transformation of the Rodriguez equation;
[0007] According to the pier point cloud intensity map, take optical photos of the pier and process the optical photos;
[0008] According to the Hough probability line detection and neighboring pixel interpolation algorithm, holes are removed from the pier point cloud intensity map to enhance the line features of the pier point cloud intensity map.
[0009] The intensity map of the bridge pier point cloud and the optical photo after cavity removal are input into the LoFTR model based on deep learning to obtain a stereo pair consisting of the same-name points in the two images.
[0010] The USAC and MAGSAC algorithms are used to eliminate mismatches in the stereo pairs composed of the same-name points in the two images, and the point cloud intensity map of the bridge pier after the hole removal and the projection transformation relationship matrix of the optical photo are used for registration;
[0011] The color of the registered optical image is assigned to the point cloud intensity map of the bridge pier after the void is removed, and the point cloud is colored according to the corresponding relationship between the point cloud intensity map of the bridge pier after the void is removed and the point cloud.
[0012] Furthermore, based on the rigid rotation and projection transformation of the Rodriguez equation, the pier point cloud strength map is generated, specifically:
[0013] Crop the 3D laser point cloud to remove the noise outside the pier point cloud;
[0014] Obtain the longest axis vector of the oriented bounding box of the bridge pier point cloud and use it as the axis direction of the bridge pier;
[0015] According to the cross-sectional shape of the bridge pier, N projection plane equations of the point cloud are obtained and projected;
[0016] For each point cloud projection result, use the Rodriguez equation to rigidly rotate the point cloud plane to be parallel to the XOY plane;
[0017] The rotated point cloud plane is further rotated around the center until the area of the circumscribed quadrilateral is minimized to obtain the rotated point cloud result. Then the point cloud is rendered using the visualization function of the python-open3d library and saved as a point cloud intensity map of the bridge pier.
[0018] Furthermore, for the circular cross-section bridge pier, a unit vector perpendicular to the axis of the bridge pier is randomly assigned as u0, and then a unit vector ui (1≤i≤N) perpendicular to the axis of the bridge pier and having an angle of 2Π / N*i with u0 is obtained, and N projection plane equations of the point cloud are obtained respectively with ui (1≤i≤N) as the normal vector;
[0019] For bridge piers with other cross-section shapes, the RANSAC algorithm is used to fit the plane equations of the pier facade point cloud; the sum of the unitized plane normal vectors of two adjacent facades is used as the new normal vector to obtain a new plane equation, which is used as the N projection plane equations of the point cloud.
[0020] Furthermore, according to the pier point cloud intensity map, optical photos of the pier are taken and processed, specifically:
[0021] According to the N bridge pier point cloud intensity maps, take N or N groups of bridge pier point cloud optical photos;
[0022] The optical photos are cropped, spliced, and subjected to noise reduction processing.
[0023] Furthermore, based on the Hough probability line detection and neighboring pixel interpolation algorithm, the holes in the pier point cloud intensity map are removed, specifically:
[0024] Use the Hough probabilistic line detection algorithm to find the outer contour of the pier in the pier point cloud intensity map;
[0025] In the pier point cloud intensity map, the holes in the pier point cloud are filled by the neighboring pixel interpolation algorithm.
[0026] Furthermore, the point cloud intensity map of the bridge pier after cavity removal and the optical photo are input into the LoFTR model based on deep learning to obtain a stereo pair consisting of the same-name points in the two images, specifically:
[0027] Load the LoFTR model parameters trained on the outdoor MegaDepth dataset, input the intensity map of the bridge pier point cloud after cavity removal and the corresponding optical photo into the LoFTR model, and obtain the stereo pair and confidence of the same-name points in the two images;
[0028] Set the confidence threshold and retain the stereo pairs with confidence greater than the threshold.
[0029] Furthermore, the LoFTR model first establishes dense pixel-by-pixel matching at a coarse granularity, and then improves the algorithm for refining the matching at a fine granularity; and the LoFTR model uses Transformer to obtain feature descriptors of two images, and the global receptive field provided by Transformer enables images to produce dense matches in weak texture areas.
[0030] Furthermore, the USAC and MAGSAC algorithms are used to eliminate the mismatch of the stereo pairs composed of the same-name points in the two images, and the alignment is performed based on the projection transformation relationship matrix of the pier point cloud intensity map and the optical photo after the hole removal, specifically;
[0031] Use the USAC algorithm to remove outliers in the stereo pair;
[0032] The MAGSAC algorithm is used to estimate the projection transformation matrix of the point cloud intensity map of the bridge pier after the cavity is removed and the optical picture through a stereo pair, and the optical picture and the point cloud intensity map of the bridge pier after the cavity is removed are registered.
[0033] Furthermore, the color of the registered optical image is assigned to the intensity map of the bridge pier point cloud after the hole is removed. According to the corresponding relationship between the intensity map of the bridge pier point cloud after the hole is removed and the point cloud, the point cloud is colored. Specifically,
[0034] The color of the optical photo is assigned to the intensity map of the bridge pier point cloud after the void is removed, and then the intensity map of the bridge pier point cloud is used to color the point cloud through a one-to-one correspondence relationship;
[0035] If the same point in the point cloud corresponds to different points in the pier point cloud intensity map, the corresponding point in the pier point cloud intensity map closest to the center of the optical image is selected to color the point.
[0036] According to a second aspect of an embodiment of the present disclosure, a pier point cloud automatic coloring system based on deep learning and optical photographs is provided, comprising:
[0037] The bridge pier point cloud strength map generation module generates the bridge pier point cloud strength map based on the rigid rotation and projection transformation of the Rodriguez equation;
[0038] An optical photo processing module takes optical photos of the bridge piers according to the bridge pier point cloud intensity map and processes the optical photos;
[0039] The hole removal module removes holes from the pier point cloud intensity map based on the Hough probability line detection and neighboring pixel interpolation algorithm, and enhances the line features of the pier point cloud intensity map;
[0040] The stereo pair acquisition module inputs the point cloud intensity map of the bridge pier after cavity removal and the optical photo into the LoFTR model based on deep learning to obtain a stereo pair consisting of the same-name points in the two images;
[0041] The registration module uses the USAC and MAGSAC algorithms to eliminate mismatches in the stereo pairs composed of the same-name points in the two images, and performs registration based on the projection transformation relationship matrix of the pier point cloud intensity map and the optical photo after the hole is removed;
[0042] The coloring module assigns the color of the registered optical image to the intensity map of the bridge pier point cloud after the voids are removed, and colors the point cloud according to the correspondence between the intensity map of the bridge pier point cloud after the voids are removed and the point cloud.
[0043] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising a memory, a processor, and a computer program stored and running on the memory, wherein when the processor executes the program, the method for automatic coloring of bridge pier point clouds based on deep learning and optical photographs is implemented.
[0044] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the method for automatically coloring a pier point cloud based on deep learning and optical photographs is implemented.
[0045] Compared with the prior art, the above technical solution adopted by the present invention has the following advantages:
[0046] The present invention extracts the stereo pairs of the same-name points of the bridge pier point cloud intensity map and the optical photo through the LoFTR model based on deep learning, and then uses the USAC and MAGSAC algorithms to realize the registration of the bridge pier point cloud intensity map and the optical photo, and then automatically colors the bridge pier point cloud. This method does not require sensors such as GPS and IMU, and the information collection composed of laser radar and camera is loosely coupled, which greatly reduces the cost of obtaining the three-dimensional color point cloud of the bridge pier.
[0047] The present invention adopts the LoFTR model based on deep learning to extract the same-name points of the point cloud intensity map and optical image of the bridge pier whose surface is low-texture concrete, which solves the deficiency that traditional algorithms such as SIFT and Harris cannot extract feature points of low-texture material images.
[0048] The present invention does not require additional labeled data sets and uses public data sets for training; the features of the point cloud intensity map are restored based on Hough line detection; the USAC and MAGSAC algorithms are used to improve the robustness of the point cloud intensity map and optical photo registration: these algorithms improve the accuracy of point cloud coloring to meet engineering requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The drawings in the specification, which constitute a part of the present application, are used to provide further understanding of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute improper limitations on the present application.
[0050] Figure 1 Flowchart of the automatic colorization method of bridge pier point cloud based on deep learning and optical photos. DETAILED DESCRIPTION
[0051] The present disclosure is further described below in conjunction with the accompanying drawings and embodiments.
[0052] It should be noted that the following detailed descriptions are illustrative and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.
[0053] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0054] It should be noted that the flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the methods and systems according to various embodiments of the present disclosure. It should be noted that each box in the flowchart or block diagram can represent a module, a program segment, or a part of a code, and the module, program segment, or a part of a code may include one or more executable instructions for implementing the logical functions specified in each embodiment. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, or they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the flowchart and / or block diagram, and the combination of boxes in the flowchart and / or block diagram can be implemented using a dedicated hardware-based system that performs a specified function or operation, or can be implemented using a combination of dedicated hardware and computer instructions.
[0055] Example 1: Figure 1 As shown, this embodiment provides a method for automatic coloring of a pier point cloud based on deep learning and optical photographs, comprising the following steps:
[0056] Step 1: Generate the point cloud strength map of the bridge pier based on the rigid rotation and projection transformation of the Rodriguez equation;
[0057] In a possible implementation, it may include:
[0058] Step 11: Crop the 3D laser point cloud to remove noise other than the pier point cloud;
[0059] Specifically, the open source software CloudCompare was used to crop the 3D laser point cloud of the bridge piers to remove the parts other than the bridge piers and the noise;
[0060] Step 12, obtaining the longest axis vector of the oriented bounding box of the bridge pier point cloud, and using it as the axis direction of the bridge pier;
[0061] Step 13: Obtain N projection plane equations of the point cloud according to the cross-sectional shape of the bridge pier, and perform projection;
[0062] It should be noted here that:
[0063] For a circular cross-section bridge pier, a unit vector perpendicular to the axis of the bridge pier is randomly assigned as u0. Then, a unit vector ui perpendicular to the axis of the bridge pier and having an angle of 2Π / N*i with u0 is obtained, 1≤i≤N. The N projection plane equations of the point cloud are obtained with ui as the normal vector.
[0064] For bridge piers with other cross-section shapes (such as rectangular, trapezoidal, and H-shaped), the RANSAC algorithm is used to fit the plane equations of the pier facade point cloud; the sum of the unitized plane normal vectors of two adjacent facades is used as the new normal vector to obtain the new plane equation, and these new plane equations are used as the N projection plane equations of the point cloud.
[0065] In the plane fitting problem, the RANSAC algorithm can be used to estimate the best plane model parameters from the point cloud data to fit the plane that best represents the point cloud data. In general, N is 4 to complete the coloring, and N is 8 to get good results. The point cloud is projected onto N projection plane equations.
[0066] In the projection process of this embodiment, the number of projection planes N is set to 4, and the plane equations of the four facades of the pier are fitted using the RANSAC algorithm to project the point cloud onto the four planes. The distance threshold of the RANSAC algorithm is set to 0.01m, the number of random sampling points is set to 3, and the maximum number of iterations is set to 100,000.
[0067] Step 14. For each point cloud projection result, use the Rodriguez equation to rigidly rotate the point cloud plane to be parallel to the XOY plane; the transformation formula is as follows:
[0068] v rot = v cos( θ ) + (k ×v) sin( θ ) + k(k·v) (1 - cos( θ ))
[0069] Among them, v is the point cloud coordinate before transformation, v rot is the point cloud coordinate after transformation, theta is the angle between the plane normal vector and the XOY plane normal before transformation, and k is the XOY plane normal vector.
[0070] Step 15. Continue to rotate the rotated point cloud plane around the center until the area of the circumscribed quadrilateral is minimized to obtain the rotated point cloud result. Then use the visualization function of the python-open3d library to render the point cloud and save it as a pier point cloud intensity map.
[0071] Step 2: Take optical photos of the bridge piers according to the bridge pier point cloud intensity map, and process the optical photos;
[0072] In a possible implementation, it may include:
[0073] Step 21, taking N or N groups of optical photos of the pier point clouds according to the N pier point cloud intensity maps;
[0074] Step 22: cropping, splicing, and noise reduction processing are performed on the optical photos.
[0075] In this embodiment, four optical photographs of the bridge piers are taken according to the four bridge pier point cloud intensity maps obtained above. For the obstructed parts, the number of photos is increased, and a total of five optical pictures are taken.
[0076] Step 3: According to the Hough probability line detection and neighboring pixel interpolation algorithm, holes are removed from the pier point cloud intensity map to enhance the line features of the pier point cloud intensity map;
[0077] In a possible implementation, it may include:
[0078] Step 31, using the Hough probabilistic line detection algorithm to find the outer contour of the pier in the pier point cloud intensity map;
[0079] Specifically, the minimum line segment length is set to 0.7 times the image height, and the maximum line segment interval parameter is set to 20, and the outline of the bridge pier is accurately detected. The Hough probabilistic line detection algorithm is an algorithm for detecting straight lines in an image. Compared with the standard Hough line transform, the Hough probabilistic line detection algorithm is more efficient because it only calculates a part of the pixels in the image instead of the entire image. By reasonably setting the minimum line segment length and the maximum line segment interval parameters, the outline of the bridge pier in the point cloud intensity map can be accurately detected.
[0080] Step 32: In the bridge pier point cloud intensity map, fill the holes in the bridge pier point cloud using a neighboring pixel interpolation algorithm.
[0081] Specifically, the point cloud is non-uniform and sparse, and contains a lot of noise and holes near the outer contour of the bridge pier in the point cloud intensity map, which affects the extraction of the same-name points in the next step of the algorithm. For the holes near the bridge pier contour, the neighboring pixel interpolation method will find the original pixel closest to the position and use the value of the original pixel as the value of the new pixel. After filling the holes, the bridge pier point cloud intensity map restores the line features, which can provide a good foundation for the next step of the algorithm.
[0082] Step 4: Input the point cloud intensity map of the bridge pier after cavity removal and the optical photo into the LoFTR model based on deep learning to obtain a stereo pair consisting of the same-name points in the two images;
[0083] In a possible implementation, it may include:
[0084] Step 41: Build a LoFTR model on the PyTorch framework, load the LoFTR model parameters trained on the outdoor MegaDepth dataset, input the point cloud intensity map of the bridge pier after cavity removal and the corresponding optical photo into the LoFTR model, and obtain the stereo pair and confidence of the same-name points in the two images;
[0085] It should be noted that the MegaDepth dataset is designed for monocular depth estimation. This dataset addresses the limitations of other datasets based on 3D sensors, such as only indoor images, insufficient number of training set samples, and so on. The LoFTR model is an image feature matching algorithm based on deep learning. The LoFTR model first establishes dense pixel-by-pixel matching at a coarse granularity, and then refines the matching algorithm at a fine granularity, thereby replacing the traditional sequential steps of image feature detection, description, and matching. The LoFTR model uses Transformer to obtain feature descriptors of two images. The global receptive field provided by Transformer enables images to produce dense matches in weak texture areas (usually in low texture areas, feature detectors usually have difficulty in generating repeatable feature points). Experiments on outdoor datasets show that LoFTR is significantly superior to existing technologies.
[0086] Step 42: Set a confidence threshold, and retain stereo pairs with confidence greater than the threshold.
[0087] Specifically, for the registration of the bridge pier point cloud intensity map and optical image on a low-texture surface, the threshold of the LoFTR output confidence is set to 0.55, and stereo pairs with confidence greater than the threshold are retained, ensuring a balance between output quality and computing speed.
[0088] Step 5: Use the USAC and MAGSAC algorithms to eliminate mismatches of the stereo pairs composed of the same-name points in the two images, and perform registration based on the projection transformation relationship matrix of the pier point cloud intensity map and the optical photo after the hole is removed;
[0089] In a possible implementation, it may include:
[0090] Step 51, using the USAC algorithm to remove outliers in the stereo pair;
[0091] Specifically, the USAC algorithm is an improved version of the RANSAC algorithm, which uses multiple strategies to optimize sample selection, outlier rejection, and model validation processes to improve algorithm performance and robustness.
[0092] Step 52: Use the MAGSAC algorithm to estimate the projection transformation matrix of the bridge pier point cloud intensity map after the voids are removed and the optical image through a stereo pair, and align the optical image with the bridge pier point cloud intensity map after the voids are removed.
[0093] Specifically, the MAGSAC algorithm uses the M estimator to define a new cost function, so in the presence of a lot of noise and outlier data, the MAGSAC algorithm can provide more robust estimates by minimizing the weighted residual. The projection error threshold of a point to the homography matrix of the specified algorithm is 0.5, the confidence threshold of the algorithm convergence is 0.999, and the maximum number of iterations of the algorithm is 100,000.
[0094] Step 6: Assign the color of the registered optical image to the intensity map of the bridge pier point cloud after the voids are removed, and color the point cloud according to the corresponding relationship between the intensity map of the bridge pier point cloud after the voids are removed and the point cloud.
[0095] Step 61, assigning the color of the optical photograph to the bridge pier point cloud intensity map after the cavity is removed, and then the bridge pier point cloud intensity map colors the point cloud through a one-to-one correspondence relationship;
[0096] Step 62: If the same point in the point cloud corresponds to a different point in the pier point cloud intensity map, select the corresponding point in the pier point cloud intensity map that is closest to the center of the map and color the point.
[0097] In order to demonstrate the effectiveness of the pier point cloud coloring method, as shown in Table 1, the LoFTR model is used to extract points of the same name. Compared with the traditional algorithm that uses SIFT and SURF algorithms to extract feature points and then performs KNN brute force matching of feature points to obtain pairs of points of the same name, it can be seen that the LoFTR model extracts more valid pairs of points of the same name at the cost of a small increase in computing time.
[0098] Table 1 Comparison of image stitching algorithms
[0099]
[0100] The present invention uses Hough probability transform line detection and neighboring pixel interpolation to restore some line features of the pier point cloud intensity map, adopts the LoFTR model to extract and match the pier point cloud intensity map and the optical photo, and uses the improved RANSAC algorithm USAC and MAGSAC algorithm to delete outliers and align the same-name point pairs. The improvement effect is shown in Table 2.
[0101] Table 2. Demonstration of the registration effect of point cloud intensity map and optical photo
[0102] algorithm Effect Harris detection algorithm feature point extraction, KNN detection algorithm brute force matching Unable to extract valid pairs of the same name No line feature recovery, LoFTR model feature point extraction The number of pairs of points with the same name is 22 Using line feature recovery, LoFTR model feature point extraction The number of pairs of points with the same name is 34
[0103] It can be seen that the present invention solves the key problem that the traditional algorithm cannot solve the registration of the low-texture bridge pier point cloud intensity map and the optical image, and verifies the effectiveness of the bridge pier point cloud automatic coloring algorithm.
[0104] Embodiment 2: This embodiment provides a pier point cloud automatic coloring system based on deep learning and optical photos, including:
[0105] The bridge pier point cloud strength map generation module generates the bridge pier point cloud strength map based on the rigid rotation and projection transformation of the Rodriguez equation;
[0106] An optical photo processing module takes optical photos of the bridge piers according to the bridge pier point cloud intensity map and processes the optical photos;
[0107] The hole removal module removes holes from the pier point cloud intensity map based on the Hough probability line detection and neighboring pixel interpolation algorithm, and enhances the line features of the pier point cloud intensity map;
[0108] The stereo pair acquisition module inputs the point cloud intensity map of the bridge pier after cavity removal and the optical photo into the LoFTR model based on deep learning to obtain a stereo pair consisting of the same-name points in the two images;
[0109] The registration module uses the USAC and MAGSAC algorithms to eliminate mismatches in the stereo pairs composed of the same-name points in the two images, and performs registration based on the projection transformation relationship matrix of the pier point cloud intensity map and the optical photo after the hole is removed;
[0110] The coloring module assigns the color of the registered optical image to the intensity map of the bridge pier point cloud after the voids are removed, and colors the point cloud according to the correspondence between the intensity map of the bridge pier point cloud after the voids are removed and the point cloud.
[0111] Embodiment 3: An electronic device, comprising a memory, a processor, and a computer program stored and running on the memory, wherein the processor implements the above-mentioned method for automatic coloring of a bridge pier point cloud based on deep learning and optical photographs when executing the program, comprising:
[0112] Generate the point cloud strength map of the bridge pier based on the rigid rotation and projection transformation of the Rodriguez equation;
[0113] According to the pier point cloud intensity map, take optical photos of the pier and process the optical photos;
[0114] According to the Hough probability line detection and neighboring pixel interpolation algorithm, holes are removed from the pier point cloud intensity map to enhance the line features of the pier point cloud intensity map.
[0115] The intensity map of the bridge pier point cloud and the optical photo after cavity removal are input into the LoFTR model based on deep learning to obtain a stereo pair consisting of the same-name points in the two images.
[0116] The USAC and MAGSAC algorithms are used to eliminate mismatches in the stereo pairs composed of the same-name points in the two images, and the point cloud intensity map of the bridge pier after the hole removal and the projection transformation relationship matrix of the optical photo are used for registration;
[0117] The color of the registered optical image is assigned to the point cloud intensity map of the bridge pier after the void is removed, and the point cloud is colored according to the corresponding relationship between the point cloud intensity map of the bridge pier after the void is removed and the point cloud.
[0118] Embodiment 4: A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned method for automatic coloring of a bridge pier point cloud based on deep learning and optical photographs, comprising:
[0119] Generate the point cloud strength map of the bridge pier based on the rigid rotation and projection transformation of the Rodriguez equation;
[0120] According to the pier point cloud intensity map, take optical photos of the pier and process the optical photos;
[0121] According to the Hough probability line detection and neighboring pixel interpolation algorithm, holes are removed from the pier point cloud intensity map to enhance the line features of the pier point cloud intensity map.
[0122] The intensity map of the bridge pier point cloud and the optical photo after cavity removal are input into the LoFTR model based on deep learning to obtain a stereo pair consisting of the same-name points in the two images.
[0123] The USAC and MAGSAC algorithms are used to eliminate mismatches in the stereo pairs composed of the same-name points in the two images, and the point cloud intensity map of the bridge pier after the hole removal and the projection transformation relationship matrix of the optical photo are used for registration;
[0124] The color of the registered optical image is assigned to the point cloud intensity map of the bridge pier after the void is removed, and the point cloud is colored according to the corresponding relationship between the point cloud intensity map of the bridge pier after the void is removed and the point cloud.
[0125] Those skilled in the art should understand that the modules or steps of the present disclosure can be implemented by a general-purpose computer device, or alternatively, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. The present disclosure is not limited to any specific combination of hardware and software.
[0126] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
[0127] Although the above describes the specific implementation methods of the present disclosure in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present disclosure. Technical personnel in the relevant field should understand that on the basis of the technical solution of the present disclosure, various modifications or variations that can be made by those skilled in the art without creative work are still within the scope of protection of the present disclosure.
Claims
1. A method for automatic coloring of bridge pier point clouds based on deep learning and optical photographs, characterized in that: The following steps are involved: Generate the point cloud strength map of the bridge pier based on the rigid rotation and projection transformation of the Rodriguez equation; According to the pier point cloud intensity map, take optical photos of the pier and process the optical photos; According to the Hough probability line detection and neighboring pixel interpolation algorithm, holes are removed from the pier point cloud intensity map to enhance the line features of the pier point cloud intensity map. The point cloud intensity map of the bridge pier after the hole removal and the optical photo are input into the LoFTR model based on deep learning to obtain a stereo pair consisting of the same-name points in the two images. Specifically, the LoFTR model parameters trained on the outdoor MegaDepth dataset are loaded, and the point cloud intensity map of the bridge pier after the hole removal and the corresponding optical photo are input into the LoFTR model to obtain a stereo pair consisting of the same-name points in the two images and the confidence level; a confidence level threshold is set, and stereo pairs with confidence levels greater than the threshold are retained; The USAC and MAGSAC algorithms are used to eliminate mismatches in the stereo pair composed of the same-name points in the two images, and the point cloud intensity map of the bridge pier after the hole removal and the projection transformation relationship matrix of the optical photo are used for registration. Specifically, the USAC algorithm is used to remove outliers in the stereo pair; the MAGSAC algorithm is used to estimate the projection transformation matrix of the point cloud intensity map of the bridge pier after the hole removal and the optical photo through the stereo pair, and the optical photo and the point cloud intensity map of the bridge pier after the hole removal are registered; The color of the registered optical image is assigned to the point cloud intensity map of the bridge pier after the void is removed, and the point cloud is colored according to the corresponding relationship between the point cloud intensity map of the bridge pier after the void is removed and the point cloud.
2. According to claim 1, a method for automatic coloring of bridge pier point clouds based on deep learning and optical photographs is characterized in that: Based on the rigid rotation and projection transformation of the Rodriguez equation, the point cloud strength map of the bridge pier is generated, specifically: Crop the 3D laser point cloud to remove the noise outside the pier point cloud; Obtain the longest axis vector of the oriented bounding box of the bridge pier point cloud and use it as the axis direction of the bridge pier; According to the cross-sectional shape of the bridge pier, N projection plane equations of the point cloud are obtained and projected; For each point cloud projection result, use the Rodriguez equation to rigidly rotate the point cloud plane to be parallel to the XOY plane; The rotated point cloud plane is further rotated around the center until the area of the circumscribed quadrilateral is minimized to obtain the rotated point cloud result. Then the point cloud is rendered using the visualization function of the python-open3d library and saved as a point cloud intensity map of the bridge pier.
3. The method for automatic coloring of bridge pier point clouds based on deep learning and optical photographs according to claim 2, characterized in that: For a circular cross-section bridge pier, a unit vector perpendicular to the axis of the bridge pier is randomly assigned as u0. Then, a unit vector ui perpendicular to the axis of the bridge pier and having an angle of 2Π / N*i with u0 is obtained, 1≤i≤N. The N projection plane equations of the point cloud are obtained with ui as the normal vector. For bridge piers with other cross-section shapes, the RANSAC algorithm is used to fit the plane equations of the pier facade point cloud; the sum of the unitized plane normal vectors of two adjacent facades is used as the new normal vector to obtain a new plane equation, which is used as the N projection plane equations of the point cloud.
4. According to claim 1, the method for automatic coloring of bridge pier point clouds based on deep learning and optical photographs is characterized in that: According to the pier point cloud intensity map, optical photos of the pier are taken and processed as follows: According to the N bridge pier point cloud intensity maps, take N or N groups of bridge pier point cloud optical photos; The optical photos are cropped, spliced, and subjected to noise reduction processing.
5. According to claim 1, the method for automatic coloring of bridge pier point clouds based on deep learning and optical photographs is characterized in that: According to the Hough probability line detection and neighboring pixel interpolation algorithm, the holes in the pier point cloud intensity map are removed, specifically: Use the Hough probabilistic line detection algorithm to find the outer contour of the pier in the pier point cloud intensity map; In the pier point cloud intensity map, the holes in the pier point cloud are filled by the neighboring pixel interpolation algorithm.
6. According to claim 5, a method for automatic coloring of bridge pier point clouds based on deep learning and optical photographs is characterized in that: The LoFTR model first establishes dense pixel-by-pixel matching at a coarse granularity, and then improves the algorithm for fine-tuning the matching at a fine granularity; and the LoFTR model uses Transformer to obtain feature descriptors of two images. The global receptive field provided by Transformer enables images to produce dense matches in weak texture areas.
7. According to claim 1, the method for automatic coloring of bridge pier point clouds based on deep learning and optical photographs is characterized in that: The color of the registered optical image is assigned to the intensity map of the bridge pier point cloud after the void is removed. According to the corresponding relationship between the intensity map of the bridge pier point cloud after the void is removed and the point cloud, the point cloud is colored. Specifically, The color of the optical photo is assigned to the intensity map of the bridge pier point cloud after the void is removed, and then the intensity map of the bridge pier point cloud is used to color the point cloud through a one-to-one correspondence relationship; If the same point in the point cloud corresponds to different points in the pier point cloud intensity map, the corresponding point in the pier point cloud intensity map closest to the center of the map is selected to color the point.
8. An automatic coloring system for bridge pier point clouds based on deep learning and optical photos, characterized in that: include: The bridge pier point cloud strength map generation module generates the bridge pier point cloud strength map based on the rigid rotation and projection transformation of the Rodriguez equation; An optical photo processing module takes optical photos of the bridge piers according to the bridge pier point cloud intensity map and processes the optical photos; The hole removal module removes holes from the pier point cloud intensity map based on the Hough probability line detection and neighboring pixel interpolation algorithm, and enhances the line features of the pier point cloud intensity map; The stereo pair acquisition module inputs the point cloud intensity map of the bridge pier after the hole removal and the optical photo into the LoFTR model based on deep learning to obtain a stereo pair consisting of the same-name points in the two images. Specifically, the LoFTR model parameters trained on the outdoor MegaDepth dataset are loaded, and the point cloud intensity map of the bridge pier after the hole removal and the corresponding optical photo are input into the LoFTR model to obtain a stereo pair consisting of the same-name points in the two images and the confidence level. The confidence level threshold is set to retain the stereo pairs with a confidence level greater than the threshold. The registration module uses the USAC and MAGSAC algorithms to eliminate mismatches in the stereo pair composed of the same-name points in the two images, and registers them based on the projection transformation relationship matrix between the bridge pier point cloud intensity map after the holes are removed and the optical photo. Specifically, the USAC algorithm is used to remove outliers in the stereo pair; the MAGSAC algorithm is used to estimate the projection transformation matrix between the bridge pier point cloud intensity map after the holes are removed and the optical photo through the stereo pair, and the optical photo is registered with the bridge pier point cloud intensity map after the holes are removed. The coloring module assigns the color of the registered optical image to the intensity map of the bridge pier point cloud after the voids are removed, and colors the point cloud according to the correspondence between the intensity map of the bridge pier point cloud after the voids are removed and the point cloud.
Citation Information
Patent Citations
Mobile measurement point cloud coloring method and device
CN111724464A
Image local feature matching method and system
CN116468919A
Systems and Methods for Modeling Structures Using Point Clouds Derived from Stereoscopic Image Pairs
US20210174580A1
Calibrating system for colorizing point-clouds
US20220351415A1
