Introduction to the principle of Poisson reconstruction algorithm

insert image description here

This article comes from CSDN Point Yunxia, ​​the original link . Reptiles respect themselves and treat themselves as individuals.

1. Poisson reconstruction algorithm

  Poisson reconstruction is a grid 3D reconstruction algorithm based on octree and Poisson equation proposed by Kazhdan M in 2006. Its essence is an implicit function surface reconstruction algorithm, which uses a surface to distinguish the inside and outside in space, which is intuitively understood as the outside of the surface and the inside of the surface. Using 0 and 1 to represent the inner and outer surfaces can be simply understood as 1 if an element belongs to this set, that is, inside the surface, and if an element does not belong to this set, it is 0, that is, outside the surface. This relationship is the indicator function proposed by Kazhdan M. Using the indicator function, the gradient calculation can be realized for all effective indicator functions in the space. By solving this function to extract the isosurface, the process of obtaining the surface is to construct the Poisson equation and solve it. the process of.
  Before discussing Poisson reconstruction, the octree used in the algorithm is studied first. An octree means that if the tree is not empty, the child nodes of any node in the tree are either 0 or 8. It is a tree-like data structure used to represent a three-dimensional space. Any cube can be divided into at least eight equally divided small cubes, and each small cube can be represented by each node of the octree, and the combination of these eight byte points is its parent node table. As shown in Figure 1:
insert image description here

Figure 1 The division of the octree to the space area

  Use the octree to divide the scene point cloud data into spatial regions, put each point in a square space, and set a certain threshold. If the data points in the square exceed this threshold, divide the cube again until every The number of points contained in each small cube is less than or equal to this threshold, and each small cube is a leaf node, whose maximum depth is D, which is used to store the point cloud data of the target object.
  The point cloud data acquired by the experiment is stored in an octree structure, which greatly facilitates the storage and retrieval of data during the implementation of the algorithm.

2. The core idea and principle of Poisson reconstruction

(1) Core idea The
  core idea of ​​Poisson reconstruction is: to divide the object into geometric interior and geometric exterior, the normal vector of the point cloud data of the object can mark the interior and exterior, and by implicitly fitting the indicator function of the object, the The estimation of the surface of the object is to construct the surface by transforming the information of the discrete points on the surface of the object into a continuous surface function.
  Let an object be MMM , the surface of the object isδ M \delta Mδ M , its exponential functionχ M \chi_MhM为:
χ M ( x ) = { 0 , x ∉ M 1 , ∈ M (1) \chi_M(x)= \begin{cases} 0,\quad x\notin M\\ 1, \in M \end{cases} \tag{1} hM(x)={ 0,x/M1,M( 1 )
where the point cloud normal vector andχ M \chi_MhMThe relationship is shown in Figure 2:
insert image description here

Fig.2 Basic functional relationship of Poisson reconstruction

  Exponential function χ M \chi_MhMis a piecewise function, expressing q 0 q_0q0It has a value of 1 inside the surface and a value of 0 at points outside the surface. Obviously, if each point q 0 q_0q0χ M ( q 0 ) \chi_M(q_0)hM(q0) , the surface of the entire object can be known.
  If direct interpolation getsχ M ( q 0 ) \chi_M(q_0)hM(q0) is obviously impossible, becauseχ M \chi_MhMThere is no continuity, and direct interpolation between 0 and 1 is meaningless, so this algorithm cannot be used. The exponential function can be smoothed first with a smoothing filter function.
(2) Normal vector to gradient space
  First, use the smoothing function F ˉ \bar{F}Fˉ to smoothχ M \chi_MhM, for any point p ∈ δ M p\in\delta Mpδ M ,ifN ⃗ δ M ( p ) \vec{N}_{\delta M}(p)N M _( p ) is the normal vector of the surface pointing inward, specifyingF ( q ) F(q)F ( q ) is a smoothing filter,F ( q − p ) F(qp)F(qp ) meansFFF alongppThe displacement in the direction of p , because the indicator functionχ M \chi_MhMIt is not easy to derive, you can use χ M ∗ F ˉ \chi_M*\bar{F}hMFˉApproximately solve the reciprocal of the convolution of two functionsχ M \chi_MhM,即:
Δ ( χ M ∗ F ˉ ) ( q 0 ) = Δ ∣ q = q 0 ∫ MF ˉ ( q − p ) dp = ∫ δ MF ˉ ( q 0 − p ) N ⃗ δ M ( p ) dp (2) \Delta(\chi_M*\bar{F})(q_0)=\Delta|_{q=q_0}\int_M\bar{F}(qp)dp=\int_{\delta M}\bar{ F}(q_0-p)\vec{N}_{\delta M}(p)dp\tag{2}D ( xMFˉ)(q0)=Δq=q0MFˉ(qp)dp=M _Fˉ(q0p)N M _(p)dp( 2 )
Among them, * is convolution, here is smoothing filter. In this way, the solution from the normal vector of the point cloud data to the gradient space is completed.
(3) Gradient space to vector field
  Due to the discreteness of object surface points,N ⃗ \vec{N}N For each point qq on the surfaceq may not all be known, that is,N ⃗ δ M ( p ) \vec{N}_{\delta M}(p)N M _The distribution of ( p ) is unknown, and this problem can be solved using piecewise approximation, by observing thatP = ( pi , ni ) P=(p_i,n_i)P=(pi,ni) to approximate.
  The initial discrete sample point set is denoted asSSS s s s isSSA point in S ( s ∈ S ) (s\in S)(sS) s s s contains positional information( s . p ) (sp)( s . p ) and normal vector information( s . N ⃗ ) (s.\vec{N})(s.N )。 将δ M \delta Mδ M is divided into different surface areas according to spaceδ s \delta sδs , ands ∈ S s\in SsSδ s ⊂ δ M \delta s\subset\delta Msδ M . Equation (2) can be transformed into the sum of integrals, where each small integral can be approximated as a constant function, and can be used bys . p sps . The function corresponding to p and δ s \delta sThe integral of the area of ​​δs is replaced by the following formula:
Δ ( χ M ∗ F ˉ ) ( q 0 ) = ∑ s ∈ S ∫ δ s F ˉ N ⃗ δ M ( p ) dp ≈ ∑ s ∈ S ∣ δ s ∣ F ˉ ( q − s . p ) s . N ⃗ = V ⃗ ( q ) (3) \Delta(\chi_M*\bar{F})(q_0)=\sum_{s\in S}\int_{\delta s}\bar{F}\vec{N}_{\delta M}(p)dp\approx \sum_{s\in S}|\delta s|\bar{F}(qs.p)s.\ vec{N}=\vec{V}(q) \tag{3}D ( xMFˉ)(q0)=sSsFˉN M _(p)dpsSδsFˉ(qs.p)s.N =V (q)( 3 )
  Assuming that the sample points are evenly distributed, then∣ δ s ∣ |\delta s|δs is a constant and can be omitted. Through discrete approximation, the vector space V can be obtained from formula (3)⃗ \vec{V}V .
(4) Convert to Poisson equation
  vector space V ⃗ \vec{V}V And exponential function χ M \chi_MhMSatisfying the following formula is the final problem to be solved:
Δ χ ⃗ = V ⃗ (4) \Delta \vec{\chi}=\vec{V}\tag{4}Dh =V ( 4 )
where if we directly solveχ ⃗ \vec{\chi}h Need to solve the integral, the vector space V ⃗ \vec{V}V It is not necessarily an irrotational field, and it cannot be integrated in the general sense. Deriving both sides of the formula (4), the formula (5) is obtained:
Δ χ ⃗ = Δ ⋅ V ⃗ = Δ ⋅ Δ χ (5) \Delta \vec {\chi}=\Delta\cdot\vec{V}=\Delta\cdot\Delta {\chi}\tag{5}Dh =DV =DD x( 5 )
  Among them,Δ \DeltaΔ is the Laplacian operator,Δ ⋅ \Delta\cdotΔ is a divergence operator, the above formula is a Poisson equation,χ ⃗ \vec{\chi}h is the function to be solved, the above formula means that the divergence of the gradient is equal to the divergence of the vector field. The solution of the equation can be obtained by convolution of the basic solution of the Laplace equation with the function, and the indicator function can be found.

3. Poisson algorithm process

  The input of Poisson reconstruction is point cloud data with normal vector. In the previous chapter, the solution to the normal vector of point cloud data has been completed. The output of the algorithm is a triangular mesh model. The algorithm flow is shown in the following figure:
insert image description here

Figure 3 Poisson reconstruction process

  1. build octree ggg , store point cloud data, the depth of octree node is recorded as D, each nodeo ∈ go ∈ gog;
  2. set function space FFF为: F ( x , y , z ) = ( B ( x ) B ( y ) B ( z ) ) ∗ n F(x, y,z)=(B(x)B(y)B(z))^{*n} F(x,y,z)=(B(x)B(y)B(z))n , where∗ n *nn meansnnn convolutions, all nodesooo have a corresponding spatial functionFFF

Guess you like

Origin blog.csdn.net/qq_36686437/article/details/131765638