Point cloud noise reduction method and device based on graph structure, equipment, medium and product
By selecting local patch blocks in the point cloud and building a Laplace matrix of graph structures, the point cloud is optimized and noise reduction is solved, and the geometric details loss caused by insufficient local information in the existing technology is solved, and high-quality point cloud noise reduction is achieved.
Patent Information
- Application Number
- CN202510248423.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2025-06-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, only local information is used to reduce the noise of point clouds, which can easily lead to the loss of geometric details and produce geometric distortion.
By obtaining the pending point cloud, sampling and nearest neighbor sampling are obtained to obtain the patch block, the point position matrix is determined based on the point positions in the patch block, and a Laplace matrix of graph structure is constructed, combining the point position matrix and the Laplace matrix to optimize the noise reduction point cloud.
While reducing the noise of the point cloud, retain geometric details information, avoid geometric distortion, and improve the quality of point cloud data.
Smart Images

Figure CN120219214A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and particularly to a method, device, equipment, medium and product for denoising point cloud based on a graph structure. Background Art
[0002] With the development of three-dimensional data acquisition technology, point cloud data has been widely used in many fields, such as computer vision, robot navigation, and virtual reality. However, due to the limitations of the acquisition device or the influence of environmental factors, the obtained point cloud data often contains noise, which will affect the subsequent data processing and analysis results. Therefore, it is necessary to denoise the point cloud data. Point cloud denoising aims to remove the random noise in the point cloud, so as to restore the original geometric surface, and effective point cloud denoising can improve the quality of the point cloud data.
[0003] In the prior art, median filtering is used to denoise the point cloud. However, median filtering is a local operation method, which only considers the local information within a fixed window, easily leads to the loss of geometric detail information, and causes geometric distortion. Summary of the Invention
[0004] The present invention provides a method, device, equipment, medium and product for denoising point cloud based on a graph structure, so as to solve the defect that only using local information to denoise the point cloud in the prior art easily leads to the loss of geometric detail information, and realize retaining the geometric detail information while denoising the point cloud.
[0005] The present invention provides a method for denoising point cloud based on a graph structure, including: Obtaining a point cloud to be processed, sampling the point cloud to be processed to obtain a plurality of sampling vertices, and performing neighbor sampling on the sampling vertices to obtain a patch corresponding to each sampling vertex; Based on the positions of the points in the patch, determining a point position matrix of the patch, where the point position matrix reflects the position relationship between the points in the patch; Obtaining the similarity between the points in the patch and the points in the neighborhood patch of the patch, constructing a graph structure based on the similarity, and obtaining the Laplacian matrix of the graph structure, where the edge in the graph structure is the corresponding edge between a first point and a second point, the first point is the point in the patch, the second point is the point in the neighborhood patch of the patch that has the greatest similarity with the first point, and the weight of the edge in the graph structure is the similarity between the corresponding first point and the second point; Optimizing the point cloud to be processed based on the point position matrix and the Laplacian matrix to obtain denoised point cloud data.
[0006] A point cloud denoising method based on a graph structure provided by the present invention, the sampling of the point cloud to be processed to obtain a plurality of sampling vertices includes: Randomly select a point in the point cloud to be processed as the sampling vertex; Select the point farthest from the latest selected sampling vertex in the point cloud to be processed as the new sampling vertex; Repeat the step of selecting the point farthest from the latest selected sampling vertex in the point cloud to be processed as the new sampling vertex until the number of sampling vertices reaches a preset quantity.
[0007] A point cloud denoising method based on a graph structure provided by the present invention, the determining of the point position matrix of the patch block based on the positions of the points in the patch block includes: Based on the average value of the coordinates of the points in the patch block in each dimension, obtain the block center coordinates; Based on the differences between the coordinates of the points in the patch block and the block center coordinates in each dimension, determine the point position matrix.
[0008] A point cloud denoising method based on a graph structure provided by the present invention, the obtaining of the similarity between the points in the patch block and the points in the neighboring patch blocks of the patch block includes: Obtain the vector distance between the feature vectors of the points in the patch block and the feature vectors of the points in the neighboring patch blocks of the patch block; Based on the vector distance, determine the similarity; Wherein, the feature vector of a point includes the coordinate value of the point and the normal direction of the point.
[0009] A point cloud denoising method based on a graph structure provided by the present invention, the optimizing of the point cloud to be processed based on the point position matrix and the Laplacian matrix to obtain the denoised point cloud data includes: Perform multiple rounds of iterative updates on the point cloud to be processed, and determine the denoised point cloud data based on the point cloud to be processed after the iteration ends; Wherein, the optimization process in each round of iterative update includes two optimizations; In the first optimization in each round of iterative update, fix the point position matrix, and optimize the point cloud to be processed based on the Laplacian matrix, and the optimization cost function reflects the difference between the point cloud to be processed and the original point cloud; In the second optimization in each round of iterative update, fix the point cloud to be processed after the first optimization, and optimize the point position matrix, and the optimization cost function reflects the similarity between the feature vectors of the points in the patch block and the distance between the points in the patch block.
[0010] A point cloud denoising method based on a graph structure provided by the present invention determines denoised point cloud data based on the point cloud to be processed after iteration ends, including: Performing median filtering on the point cloud to be processed after iteration ends to obtain denoised point cloud data.
[0011] The present invention also provides a point cloud denoising device based on a graph structure, including: A sampling module, configured to obtain a point cloud to be processed, sample the point cloud to be processed to obtain a plurality of sampling vertices, and perform neighbor sampling on the sampling vertices to obtain a patch block corresponding to each sampling vertex; A point position matrix obtaining module, configured to determine a point position matrix of the patch block based on the positions of the points in the patch block, and the point position matrix reflects the positional relationship between the points in the patch block; A graph structure establishing module, configured to obtain the similarity between the points in the patch block and the points in the neighborhood patch block of the patch block, construct a graph structure based on the similarity, and obtain the Laplacian matrix of the graph structure. An edge in the graph structure is the corresponding edge between a first point and a second point. The first point is a point in the patch block, and the second point is the point in the neighborhood patch block of the patch block that has the greatest similarity to the first point. The weight of the edge in the graph structure is the similarity between the corresponding first point and the second point; An optimization module, configured to optimize the point cloud to be processed based on the point position matrix and the Laplacian matrix to obtain denoised point cloud data.
[0012] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the method for denoising a point cloud based on a graph structure as described in any one of the above is implemented.
[0013] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method for denoising a point cloud based on a graph structure as described in any one of the above is implemented.
[0014] The present invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, the method for denoising a point cloud based on a graph structure as described in any one of the above is implemented.
[0015] The present invention provides a point cloud denoising method, device, equipment, medium and product based on a graph structure. The method includes: obtaining a point cloud to be processed, sampling the point cloud to be processed to obtain a plurality of sampled vertices, performing neighbor sampling on the sampled vertices to obtain a patch corresponding to each sampled vertex; determining a point position matrix of the patch based on the positions of the points in the patch, where the point position matrix reflects the positional relationship between the points in the patch; obtaining the similarity between the points in the patch and the points in the neighborhood patch of the patch, constructing a graph structure based on the similarity, and obtaining the Laplacian matrix of the graph structure. An edge in the graph structure is the corresponding edge between a first point and a second point. The first point is a point in the patch, and the second point is the point in the neighborhood patch of the patch that has the greatest similarity to the first point. The weight of the edge in the graph structure is the similarity between the corresponding first point and the second point; optimizing the point cloud to be processed based on the point position matrix and the Laplacian matrix to obtain denoised point cloud data.
[0016] In this way, by selecting multiple local patches in the point cloud to be processed and optimizing and denoising the point cloud to be processed based on the point position matrix reflecting the positional relationship between the points in the patch and the Laplacian matrix of the graph structure reflecting the similarity between the patches, the optimization of the point cloud to be processed by combining local information and global information is realized, so that geometric detail information is retained while the point cloud is denoised. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0018] Figure 1 is one of the flow diagrams of the point cloud denoising method based on the graph structure provided by the present invention.
[0019] Figure 2 is the second flow diagram of the point cloud denoising method based on the graph structure provided by the present invention.
[0020] Figure 3 is one of the effect diagrams of the point cloud denoising method based on the graph structure provided by the present invention.
[0021] Figure 4 is the second effect diagram of the point cloud denoising method based on the graph structure provided by the present invention.
[0022] Figure 5 is the third effect diagram of the point cloud denoising method based on the graph structure provided by the present invention.
[0023] Figure 6 It is the fourth schematic diagram of the effect of the point cloud denoising method based on the graph structure provided by the present invention.
[0024] Figure 7 It is a schematic structural diagram of the point cloud denoising device based on the graph structure provided by the present invention.
[0025] Figure 8 It is a schematic structural diagram of the electronic device provided by the present invention. Detailed implementation manners
[0026] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings in the present invention. Obviously, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art without making creative efforts based on the embodiments in the present invention belong to the scope of protection of the present invention.
[0027] The following combines Figures 1-6 to describe the point cloud denoising method based on the graph structure provided by the present invention. As Figure 1 shown, the point cloud denoising method based on the graph structure includes the steps of: S110. Obtain the point cloud to be processed, sample the point cloud to be processed to obtain a plurality of sampled vertices, and perform neighbor sampling on the sampled vertices to obtain a patch block corresponding to each sampled vertex; S120. Determine the point position matrix of the patch block based on the positions of the points in the patch block, and the point position matrix reflects the positional relationship between the points in the patch block; S130. Obtain the similarity between the points in the patch block and the points in the neighborhood patch block of the patch block, construct a graph structure based on the similarity, and obtain the Laplacian matrix of the graph structure. The edge in the graph structure is the corresponding edge between the first point and the second point. The first point is the point in the patch block, and the second point is the point in the neighborhood patch block of the patch block that has the greatest similarity with the first point. The weight of the edge in the graph structure is the similarity between the corresponding first point and the second point of the edge; S140. Optimize the point cloud to be processed based on the point position matrix and the Laplacian matrix to obtain the denoised point cloud data.
[0028] The point cloud denoising method based on the graph structure provided by the present invention optimizes and denoises the point cloud to be processed by selecting a plurality of local patch blocks in the point cloud to be processed and based on the point position matrix reflecting the positional relationship between the points in the patch block and the Laplacian matrix of the graph structure reflecting the similarity between the patch blocks, realizing the optimization of the point cloud to be processed by combining local information and global information, so as to retain geometric detail information while denoising the point cloud.
[0029] The point cloud to be processed is a point cloud model with noise and can be expressed as: , where is the three-dimensional coordinate of the observed point cloud, is the three-dimensional point cloud coordinate of the true one without any noise interference, is the standard deviation of the additive Gaussian white noise. As Figure 2 shown, after obtaining the point cloud data to be processed contaminated by impulse noise , downsample it to obtain M sampling vertices.
[0030] In a possible implementation, sampling the point cloud to be processed to obtain multiple sampling vertices can be achieved based on the farthest point sampling method. Specifically, sampling the point cloud to be processed to obtain multiple sampling vertices includes: Randomly select a point in the point cloud to be processed as a sampling vertex; Select the point farthest from the latest selected sampling vertex in the point cloud to be processed as a new sampling vertex; Repeat the step of selecting the point farthest from the latest selected sampling vertex in the point cloud to be processed as a new sampling vertex until the number of sampling vertices reaches the preset quantity.
[0031] Through the above steps of farthest point sampling, the sampling vertices obtained by sampling can better maintain the geometric shape of the point cloud. The preset quantity of sampling vertices is determined according to factors such as point cloud simplification requirements, accuracy requirements of the application scenario, complexity of the point cloud, computing resources, etc. If the preset quantity is too large, the simplification effect is not obvious and the meaning of downsampling is lost. If the preset quantity is too small, geometric details are lost, over-simplification occurs, and the key information of the original shape cannot be retained. Sampling can be performed from 10% to 50% of the point cloud to be processed and gradually tested until the point cloud composed of the sampling vertices after sampling can both maintain geometric features and not increase unnecessary computational burden.
[0032] After determining the sampling vertices, calculate the Euclidean distance between the sampling vertices and other surrounding points, and find the k points with the smallest distance from each sampling vertex as the neighbor points of the sampling vertex. The sampling vertex and the k neighbor points of the sampling vertex form a local patch , which is used to represent the local geometric structure of this area. Selecting a smaller k value can better capture local information but may be sensitive to noise. Selecting a larger k value can be more stable but may ignore local details. In applications, it is necessary to find a balance between retaining local geometric features and eliminating noise. Generally, test in the range from k = 10 to k = 30 and adjust according to the specific application scenario and noise level of the point cloud.
[0033] For each patch, the central coordinate can be calculated , which is convenient for tracking which patch each point belongs to. The center coordinates can be the geometric center (centroid), that is, the average value of the coordinates of all points within the patch. A selection matrix S is established to select which block a tracking point belongs to. For the set U of sampled vertices obtained by sampling, it can be expressed as: .
[0034] After obtaining the patches, based on the positions of the points in the patches, the point position matrix of the patches can be determined. The point position matrix reflects the positional relationship between the points in the patches, thereby reflecting the local information of this area of the patches. Determining the point position matrix of the patches based on the positions of the points in the patches includes: Obtaining the block center coordinates based on the average value of the coordinates of the points in the patches in each dimension; Determining the point position matrix based on the differences between the coordinates of the points in the patches and the block center coordinates in each dimension.
[0035] For each patch the points in , calculate the mean value on each coordinate axis , and the specific formula can be expressed as: ; In the above formula, , , respectively represent the coordinate values of the point on the x, y, and z coordinate axes.
[0036] According to the points in the patch and the mean value , the point position matrix can be constructed. First, construct the inverse matrix of the point position matrix. The element in the i-th row and j-th column of this inverse matrix reflects the difference between the positions of the points in the patch in the i-th dimension and the j-th dimension and the mean value , so as to reflect the relative position relationship information of the points in the patch.
[0037] Specifically, the element in the i-th row and j-th column of the inverse matrix of the point position matrix can be calculated by the following formula: ; In the above formula, represents the coordinate value of the point in the i-th dimension, represents the component of
[0038] The point position matrix (denoted as M) can reflect the local information of the patch block. Based on this point position matrix, a feature map structure can also be established. Specifically, by calculating the Mahalanobis matrix distance between the feature vectors of point i and point j, the weight between point i and point j of the patch block can be obtained, and the calculation formula is: ; ; where the feature vector of point i in the patch block can be expressed as where is the coordinate of the point, and is the normal vector of the point. According to the characteristics of the exponential function, it can be inferred that when is small (i.e., high similarity), will be close to 1, indicating connection. When is large, will be close to 0, indicating non-connection. In this way, the feature map of the patch block can be constructed for subsequent retrieval of information therein for calculation.
[0039] In the method provided by the present invention, the relationship information between patch blocks is further obtained by using the graph structure to achieve the extraction of global information. Specifically, the similarity between the points in the patch block and the points in the neighboring patch blocks of the patch block is obtained, and a graph structure is constructed based on the similarity, and the Laplacian matrix of the graph structure is obtained to represent the global information.
[0040] The neighboring patch blocks of the patch block are the w patch blocks closest to the patch block. Specifically, the Euclidean distance between the center points of the patch block and the center points of other patch blocks is calculated, and the w patch blocks with the smallest distance are selected as the neighboring patch blocks of the patch block.
[0041] Obtaining the similarity between the points in the patch block and the points in the neighboring patch blocks of the patch block includes: Obtaining the vector distance between the feature vectors of the points in the patch block and the feature vectors of the points in the neighboring patch blocks of the patch block; Determining the similarity based on the vector distance; where the feature vector of the point includes the coordinate value of the point and the normal direction of the point.
[0042] Calculate the similarity between the points in the patch block and the points in the neighboring patch blocks respectively, find the point with the highest similarity in the neighboring patch blocks, and establish a graph edge, which is called a pair of corresponding points. The above steps are performed on each point in the patch block in turn until all the graph edges are established.
[0043] The similarity can be calculated in various ways for measuring the similarity between feature vectors. In one possible implementation, the following formula can be used: ; In the above formula, represents the similarity between point i and point j, and represent the feature vectors of point i and point j respectively, represents the bandwidth parameter of the Gaussian kernel function, which is used to control the scale of the distance. By measuring the similarity between points through the above formula, more accurate results can be obtained.
[0044] Taking the similarity corresponding to the edge as the weight of the graph edge, a weight matrix of the graph structure can be obtained, and then the Laplacian matrix L of the graph structure can be calculated. This Laplacian matrix helps to measure the smoothness of the point cloud data.
[0045] The point position matrix and the Laplacian matrix of the graph structure can respectively reflect the local information and the global information of the point cloud. The method provided by the present invention combines the two to optimize and denoise the point cloud to be processed, can effectively fuse the local information and the global information, thereby removing noise while maintaining geometric details, and performs excellently when processing point cloud data with complex geometric shapes and high noise levels.
[0046] Optimizing the point cloud to be processed based on the point position matrix and the Laplacian matrix to obtain the denoised point cloud data specifically includes: Performing multiple rounds of iterative updates on the point cloud to be processed, and determining the denoised point cloud data based on the point cloud to be processed after the iteration ends; wherein, the optimization process in each round of iterative update includes two optimizations; In the first optimization in each round of iterative update, the point position matrix is fixed, and the point cloud to be processed is optimized based on the Laplacian matrix. The optimization cost function reflects the difference between the point cloud to be processed and the original point cloud; In the second optimization in each round of iterative update, the point cloud to be processed after the first optimization is fixed, and the point position matrix is optimized. The optimization cost function reflects the similarity between the feature vectors of the points in the patch block and the distance between the points in the patch block.
[0047] In each round of iterative update, as Figure 2 shown, the point cloud to be processed and the point position matrix are alternately optimized, and when optimizing one of them, the other is kept fixed, which helps to remove noise while maintaining geometric details.
[0048] In each round of iterative process, the first optimization is to fix the point position matrix M, optimize the point cloud data to be processed for denoising, and the cost function is , by using the selection matrix S, the cost function can be further transformed into: , where represents the original point cloud without noise interference, that is, the point cloud not affected by noise. is the regularization parameter used to balance the weights between the data fitting term and the regularization term. A larger emphasizes data fitting and is suitable for scenarios with a high signal-to-noise ratio; a smaller emphasizes the smoothness constraint more and is suitable for scenarios with severe noise or sparse observed data. The value of can be selected empirically or optimized adaptively through methods such as cross-validation. represents the trace of the matrix, that is, the sum of the diagonal elements of the matrix. The trace function is related to the Frobenius norm (F-norm) of the matrix, that is . Using this property, complex matrix operations can be simplified into the problem of summing diagonal elements. Based on the above cost function, the least squares alternating optimization multiplication is used to optimize the point cloud data to be processed , and the optimized point cloud data to be processed is obtained. The specific expression is: ; where represents the identity matrix of the same dimension as the previous term.
[0049] In the second optimization process of each iteration, fix the obtained above, and optimize the point position matrix M through the feature metric learning process. The optimization cost function at this time is expressed as: ; where represents the squared error between two points i and j, and the specific formula is expressed as: .
[0050] The optimization process of the point position matrix M is divided into two steps. The first step is to optimize the diagonal elements through the disk theorem, transform the optimization problem of the diagonal elements into a set of linear inequality constraints to ensure that the point position matrix M is positive definite, and use the proximal gradient algorithm to solve these constrained optimization problems. The second step is to optimize one row and one column of the point position matrix M in each iteration through the block coordinate descent algorithm until convergence. In this way, the optimized point position matrix is obtained.
[0051] After each iteration is received, it is judged whether the noise reduction effect on the point cloud data to be processed meets the requirements, that is, to observe whether the value of the cost function converges to the preset threshold. If it meets the requirements, the iteration ends; otherwise, the iteration continues.
[0052] The method provided by the present invention combines global optimization and alternating optimization. By constructing a patch block graph and utilizing graph signal processing technology, it not only considers the local information of the point cloud data but also effectively integrates the global information. This global optimization helps to find the optimal solution within the entire range of the point cloud data rather than just in a local area. Additionally, an alternating optimization method is adopted. First, the point cloud data is fixed, then the M matrix is optimized, and then the M matrix is fixed while the point cloud data is optimized. This alternating process helps to better approximate the true optimal solution as it can adjust one aspect of the model at each step while maintaining the stability of other aspects. Moreover, as can be seen from the previous description, throughout the process, the method provided by the present invention comprehensively considers the geometric structure, normal information, and neighborhood relationship of the point cloud data, and thus has good robustness to various types of noise. This stability helps to obtain satisfactory results in a variety of application scenarios.
[0053] In one possible implementation, the point cloud to be processed after the iteration ends can be directly used as the denoised point cloud data. In another possible implementation, determining the denoised point cloud data based on the point cloud to be processed after the iteration ends includes: Performing median filtering on the point cloud to be processed after the iteration ends to obtain the denoised point cloud data.
[0054] Applying median filtering to the point cloud after iterative optimization to further smooth the point cloud and eliminate the remaining noise, thereby improving the overall quality and denoising effect of the point cloud data and obtaining the denoised point cloud data.
[0055] The method provided by the present invention can first effectively remove noise while retaining important geometric features by integrating graph signal processing. Secondly, based on the globally optimized point cloud data, median filtering is further used to smooth the optimized data, enabling the algorithm to achieve a good balance between denoising performance and detail retention.
[0056] Experimental verification is carried out on the method provided by the present invention. In the experiment, the original point cloud is as Figure 3 shown. Assuming that the point cloud is contaminated by impulse noise as Figure 4 shown, the results obtained by using median filtering for denoising and using the method provided by the present invention for denoising are respectively as Figure 5 and Figure 6 shown. Figure 5 is the result of using median filtering for denoising. Figure 6This is the result of noise reduction using the method provided by the present invention. By calculating the peak signal-to-noise ratio of the two noise reduction methods, the peak signal-to-noise ratio using traditional median filtering is 29.005, while the peak signal-to-noise ratio after noise reduction using the method provided by the present invention is 38.5982. By comparison, it can be seen that the method provided by the present invention improves the robustness to impulse noise and better restores the geometric structure characteristics and edge features of the original data.
[0057] The following describes the point cloud noise reduction device based on the graph structure provided by the present invention. The point cloud noise reduction device based on the graph structure described below can be mutually corresponded and referred to the point cloud noise reduction method described above. As Figure 7 shown, the point cloud noise reduction device based on the graph structure provided by the present invention includes: A sampling module 710, configured to obtain a point cloud to be processed, sample the point cloud to be processed to obtain a plurality of sampling vertices, and perform neighbor sampling on the sampling vertices to obtain a patch corresponding to each sampling vertex; A point position matrix obtaining module 720, configured to determine a point position matrix of the patch based on the positions of the points in the patch, where the point position matrix reflects the position relationship between the points in the patch; A graph structure building module 730, configured to obtain the similarity between the points in the patch and the points in the neighborhood patch of the patch, construct a graph structure based on the similarity, and obtain the Laplacian matrix of the graph structure. The edge in the graph structure is the corresponding edge between the first point and the second point. The first point is a point in the patch, and the second point is the point in the neighborhood patch of the patch that has the greatest similarity to the first point. The weight of the edge in the graph structure is the similarity between the corresponding first point and the second point of the edge; An optimization module 740, configured to optimize the point cloud to be processed based on the point position matrix and the Laplacian matrix to obtain the noise-reduced point cloud data.
[0058] Figure 8 Illustrates a schematic diagram of the physical structure of an electronic device, such as Figure 8As shown in the figure, the electronic device may include: a processor 810, a communications interface 820, a memory 830, and a communication bus 840. Among them, the processor 810, the communications interface 820, and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call the logical instructions in the memory 830 to execute a point cloud denoising method based on a graph structure. The method includes: obtaining a point cloud to be processed, sampling the point cloud to be processed to obtain a plurality of sampled vertices, performing neighbor sampling on the sampled vertices to obtain a patch block corresponding to each sampled vertex; determining a point position matrix of the patch block based on the positions of the points in the patch block, where the point position matrix reflects the positional relationship between the points in the patch block; obtaining the similarity between the points in the patch block and the points in the neighboring patch blocks of the patch block, constructing a graph structure based on the similarity, and obtaining the Laplacian matrix of the graph structure. The edges in the graph structure are the corresponding edges between a first point and a second point. The first point is a point in the patch block, and the second point is the point in the neighboring patch block of the patch block that has the greatest similarity to the first point. The weight of the edge in the graph structure is the similarity between the corresponding first point and the second point; optimizing the point cloud to be processed based on the point position matrix and the Laplacian matrix to obtain denoised point cloud data.
[0059] In addition, when the logical instructions in the above-mentioned memory 830 are implemented in the form of software functional units and sold or used as independent products, they may be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs, Read-Only Memories), random access memories (RAMs, Random Access Memories), magnetic disks, or optical discs that can store program codes.
[0060] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the graph-structure-based point cloud denoising method provided by each of the above methods. The method includes: obtaining a point cloud to be processed, sampling the point cloud to be processed to obtain a plurality of sampled vertices, performing neighbor sampling on the sampled vertices to obtain a patch block corresponding to each sampled vertex; determining a point position matrix of the patch block based on the positions of the points in the patch block, where the point position matrix reflects the positional relationship between the points in the patch block; obtaining the similarity between the points in the patch block and the points in the neighborhood patch block of the patch block, constructing a graph structure based on the similarity, and obtaining the Laplacian matrix of the graph structure. The edge in the graph structure is the corresponding edge between a first point and a second point. The first point is a point in the patch block, and the second point is the point in the neighborhood patch block of the patch block that has the greatest similarity to the first point. The weight of the edge in the graph structure is the similarity between the corresponding first point and the second point; optimizing the point cloud to be processed based on the point position matrix and the Laplacian matrix to obtain denoised point cloud data.
[0061] In another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the graph-structure-based point cloud denoising method provided by each of the above methods. The method includes: obtaining a point cloud to be processed, sampling the point cloud to be processed to obtain a plurality of sampled vertices, performing neighbor sampling on the sampled vertices to obtain a patch block corresponding to each sampled vertex; determining a point position matrix of the patch block based on the positions of the points in the patch block, where the point position matrix reflects the positional relationship between the points in the patch block; obtaining the similarity between the points in the patch block and the points in the neighborhood patch block of the patch block, constructing a graph structure based on the similarity, and obtaining the Laplacian matrix of the graph structure. The edge in the graph structure is the corresponding edge between a first point and a second point. The first point is a point in the patch block, and the second point is the point in the neighborhood patch block of the patch block that has the greatest similarity to the first point. The weight of the edge in the graph structure is the similarity between the corresponding first point and the second point; optimizing the point cloud to be processed based on the point position matrix and the Laplacian matrix to obtain denoised point cloud data.
[0062] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative labor.
[0063] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0064] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features. And these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A point cloud denoising method based on graph structure, characterized in that: include: Acquire a point cloud to be processed, sample the point cloud to be processed to obtain a plurality of sampling vertices, perform neighbor sampling on the sampling vertices to obtain a patch block corresponding to each sampling vertex; Based on the positions of the points in the patch block, determining a point position matrix of the patch block, wherein the point position matrix reflects the positional relationship between the points in the patch block; Obtaining similarities between points in the patch block and points in a neighborhood patch block of the patch block, constructing a graph structure based on the similarities, and obtaining a Laplacian matrix of the graph structure, wherein an edge in the graph structure is an edge corresponding to a first point and a second point, the first point is a point in the patch block, the second point is a point in a neighborhood patch block of the patch block that has the greatest similarity to the first point, and the weight of the edge in the graph structure is the similarity between the first point and the second point corresponding to the edge; The point cloud to be processed is optimized based on the point position matrix and the Laplace matrix to obtain noise-reduced point cloud data.
2. The point cloud denoising method based on graph structure according to claim 1, characterized in that: The step of sampling the point cloud to be processed to obtain a plurality of sampling vertices includes: Randomly selecting a point in the point cloud to be processed as the sampling vertex; Selecting a point in the point cloud to be processed that is farthest from the most recently selected sampling vertex as a new sampling vertex; The step of selecting the point farthest from the most recently selected sampling vertex in the point cloud to be processed as the new sampling vertex is repeated until the number of the sampling vertices reaches a preset number.
3. The point cloud denoising method based on graph structure according to claim 1, characterized in that: The step of determining a point position matrix of the patch block based on the positions of the points in the patch block comprises: Obtaining block center coordinates based on the average values of coordinates of points in the patch block in each dimension; The point position matrix is determined based on the differences between the coordinate values of the points in the patch block and the coordinates of the block center in each dimension.
4. The point cloud denoising method based on graph structure according to claim 1, characterized in that: The obtaining of the similarity between the points in the patch block and the points in the neighboring patch blocks of the patch block includes: Obtaining a vector distance between a feature vector of a point in the patch block and a feature vector of a point in a neighboring patch block of the patch block; determining the similarity based on the vector distance; The feature vector of a point includes the coordinate value of the point and the normal direction of the point.
5. The point cloud denoising method based on graph structure according to claim 1, characterized in that: The point cloud to be processed is optimized based on the point position matrix and the Laplace matrix to obtain the denoised point cloud data, including: Perform multiple rounds of iterative updates on the point cloud to be processed, and determine the denoised point cloud data based on the point cloud to be processed after the iterations are completed; Among them, the optimization process in each round of iterative update includes two optimizations; In the first optimization in each round of iterative update, the point position matrix is fixed, and the to-be-processed point cloud is optimized based on the Laplace matrix, and the optimization cost function reflects the difference between the to-be-processed point cloud and the original point cloud; In each round of iterative updating, the point cloud to be processed after the first optimization is fixed in the second optimization, and the point position matrix is optimized. The optimization cost function reflects the similarity between the feature vectors of the points in the patch block and the distance between the points in the patch block.
6. The point cloud denoising method based on graph structure according to claim 5, characterized in that: The step of determining the denoised point cloud data based on the point cloud to be processed after the iteration includes: The point cloud to be processed after the iteration is completed is subjected to median filtering to obtain denoised point cloud data.
7. A point cloud denoising device based on a graph structure, characterized in that: include: A sampling module is used to obtain a point cloud to be processed, sample the point cloud to be processed to obtain a plurality of sampling vertices, perform neighbor sampling on the sampling vertices, and obtain a patch block corresponding to each sampling vertex; A point position matrix acquisition module, used to determine a point position matrix of the patch block based on the positions of the points in the patch block, wherein the point position matrix reflects the positional relationship between the points in the patch block; A graph structure building module, used to obtain the similarity between the point in the patch block and the point in the neighborhood patch block of the patch block, build a graph structure based on the similarity, and obtain the Laplacian matrix of the graph structure, the edge in the graph structure is the edge corresponding to the first point and the second point, the first point is the point in the patch block, the second point is the point in the neighborhood patch block of the patch block with the greatest similarity to the first point, and the weight of the edge in the graph structure is the similarity between the first point and the second point corresponding to the edge; The optimization module is used to optimize the point cloud to be processed based on the point position matrix and the Laplace matrix to obtain noise-reduced point cloud data.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the point cloud denoising method based on the graph structure as described in any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the point cloud denoising method based on a graph structure as claimed in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the point cloud denoising method based on a graph structure as claimed in any one of claims 1 to 6 is implemented.