Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Geometry processing

From Wikipedia, the free encyclopedia
Research topic in computational geometry
Polygon Mesh Processing by Mario Botsch et al. is a textbook on the topic of Geometry Processing.[1]

Geometry processing is an area of research that uses concepts fromapplied mathematics,computer science andengineering to design efficientalgorithms for the acquisition,reconstruction,analysis, manipulation, simulation and transmission of complex 3D models. As the name implies, many of the concepts, data structures, and algorithms are directly analogous tosignal processing andimage processing. For example, whereimage smoothing might convolve an intensity signal with a blur kernel formed using theLaplace operator,geometric smoothing might be achieved by convolving asurface geometry with a blur kernel formed using theLaplace-Beltrami operator.

Applications of geometry processing algorithms already cover a wide range of areas frommultimedia,entertainment and classicalcomputer-aided design, to biomedical computing,reverse engineering, andscientific computing.[1]

Geometry processing is a common research topic atSIGGRAPH, the premiercomputer graphics academic conference, and the main topic of the annualSymposium on Geometry Processing.

Geometry processing as a life cycle

[edit]
A mesh of a cactus showing the Gaussian Curvature at each vertex, using the angle defect method

Geometry processing involves working with ashape, usually in 2D or 3D, although the shape can live in a space of arbitrary dimensions. The processing of a shape involves three stages, which is known as its life cycle. At its "birth," a shape can be instantiated through one of three methods: amodel, amathematical representation, or ascan. After a shape is born, it can be analyzed and edited repeatedly in a cycle. This usually involves acquiring different measurements, such as the distances between the points of the shape, the smoothness of the shape, or itsEuler characteristic. Editing may involve denoising, deforming, or performingrigid transformations. At the final stage of the shape's "life," it is consumed. This can mean it is consumed by a viewer as a rendered asset in a game or movie, for instance. The end of a shape's life can also be defined by a decision about the shape, like whether or not it satisfies some criteria. Or it can even befabricated in the real world, through a method such as 3D printing or laser cutting.

Discrete Representation of a Shape

[edit]

Like any other shape, the shapes used in geometry processing have properties pertaining to theirgeometry andtopology. The geometry of a shape concerns the position of the shape'spoints in space,tangents,normals, andcurvature. It also includes the dimension in which the shape lives (ex.R2{\displaystyle R^{2}} orR3{\displaystyle R^{3}}). Thetopology of a shape is a collection of properties that do not change even after smooth transformations have been applied to the shape. It concerns dimensions such as the number ofholes andboundaries, as well as theorientability of the shape. One example of a non-orientable shape is theMobius strip.

In computers, everything must be discretized. Shapes in geometry processing are usually represented astriangle meshes, which can be seen as agraph. Each node in the graph is a vertex (usually inR3{\displaystyle R^{3}}), which has a position. This encodes the geometry of the shape. Directed edges connect these vertices into triangles, which by the right hand rule, then have a direction called the normal. Each triangle forms a face of the mesh. These are combinatoric in nature and encode the topology of the shape. In addition to triangles, a more general class ofpolygon meshes can also be used to represent a shape. More advanced representations likeprogressive meshes encode a coarse representation along with a sequence of transformations, which produce a fine or high resolution representation of the shape once applied. These meshes are useful in a variety of applications, including geomorphs, progressive transmission, mesh compression, and selective refinement.[2]

A mesh of the famous Stanford bunny. Shapes are usually represented as a mesh, a collection of polygons that delineate the contours of the shape.

Properties of a shape

[edit]

Euler Characteristic

[edit]

One particularly important property of a 3D shape is itsEuler characteristic, which can alternatively be defined in terms of itsgenus. The formula for this in the continuous sense isχ=2c2hb{\displaystyle \chi =2c-2h-b}, wherec{\displaystyle c} is the number of connected components,h{\displaystyle h} is number of holes (as in donut holes, seetorus), andb{\displaystyle b} is the number of connected components of the boundary of the surface. A concrete example of this is a mesh of apair of pants. There is one connected component, 0 holes, and 3 connected components of the boundary (the waist and two leg holes). So in this case, the Euler characteristic is -1. To bring this into the discrete world, the Euler characteristic of a mesh is computed in terms of its vertices, edges, and faces.χ=|V||E|+|F|{\displaystyle \chi =|V|-|E|+|F|}.

This image shows a mesh of a pair of pants, with Euler characteristic -1. This is explained by the equation to compute the characteristic: 2c - 2h - b. The mesh has 1 connected component, 0 topological holes, and 3 boundaries (the waist hole and each leg hole): 2 - 0 - 3 = -1.

Surface reconstruction

[edit]

Poisson reconstruction from surface points to mesh

[edit]
A triangle mesh is constructed out of apoint cloud. Sometimes shapes are initialized only as "point clouds," a collection of sampled points from the shape's surface. Often, these point clouds need to be converted to meshes.

Depending on how a shape is initialized or "birthed," the shape might exist only as a nebula of sampled points that represent its surface in space. To transform the surface points into a mesh, the Poisson reconstruction[3] strategy can be employed. This method states that theindicator function, a function that determines which points in space belong to the surface of the shape, can actually be computed from the sampled points. The key concept is that gradient of the indicator function is0 everywhere, except at the sampled points, where it is equal to the inward surface normal. More formally, suppose the collection of sampled points from the surface is denoted byS{\displaystyle S}, each point in the space bypi{\displaystyle p_{i}}, and the corresponding normal at that point byni{\displaystyle n_{i}}. Then the gradient of the indicator function is defined as:

g={ni,piS0,otherwise{\displaystyle \triangledown g={\begin{cases}{\textbf {n}}_{i},&\forall p_{i}\in S\\0,&{\text{otherwise}}\end{cases}}}

The task of reconstruction then becomes avariational problem. To find the indicator function of the surface, we must find a functionχ{\displaystyle \chi } such thatχV{\displaystyle \lVert \triangledown \chi -{\textbf {V}}\rVert } is minimized, whereV{\displaystyle {\textbf {V}}} is the vector field defined by the samples. As a variational problem, one can view the minimizerχ{\displaystyle \chi }as a solution ofPoisson's equation.[3] After obtaining a good approximation forχ{\displaystyle \chi } and a valueσ{\displaystyle \sigma } for which the points(x,y,z){\displaystyle (x,y,z)} withχ(x,y,z)=σ{\displaystyle \chi (x,y,z)=\sigma } lie on the surface to be reconstructed, themarching cubes algorithm can be used to construct atriangle mesh from the functionχ{\displaystyle \chi } , which can then be applied in subsequent computer graphics applications.

Registration

[edit]
Point to point registration
An animation depicting registration of a partial mesh onto a complete mesh, with piecewise constant approximation of the projection function
Point to plane registration
An animation depicting the same registration procedure as above, but with piecewise linear approximation of the projection function. Note that it converges much faster.

One common problem encountered in geometry processing is how to merge multiple views of a single object captured from different angles or positions. This problem is known asregistration. In registration, we wish to find an optimalrigid transformation that will align surfaceX{\displaystyle X} with surfaceY{\displaystyle Y}. More formally, ifPY(x){\displaystyle P_{Y}(x)} is the projection of a pointx from surfaceX{\displaystyle X} onto surfaceY{\displaystyle Y}, we want to find the optimal rotation matrixR{\displaystyle R} and translation vectort{\displaystyle t} that minimize the following objective function:

xX||Rx+tPY(x)||2dx{\displaystyle \int _{x\in X}||Rx+t-P_{Y}(x)||^{2}dx}

While rotations are non-linear in general, small rotations can be linearized as skew-symmetric matrices. Moreover, the distance functionxPY(x){\displaystyle x-P_{Y}(x)} is non-linear, but is amenable to linear approximations if the change inX{\displaystyle X} is small. An iterative solution such asIterative Closest Point (ICP) is therefore employed to solve for small transformations iteratively, instead of solving for the potentially large transformation in one go. In ICP,n random sample points fromX{\displaystyle X} are chosen and projected ontoY{\displaystyle Y}. In order to sample points uniformly at random across the surface of the triangle mesh, the random sampling is broken into two stages: uniformly sampling points within a triangle; and non-uniformly sampling triangles, such that each triangle's associated probability is proportional to its surface area.[4] Thereafter, the optimal transformation is calculated based on the difference between eachx{\displaystyle x} and its projection. In the following iteration, the projections are calculated based on the result of applying the previous transformation on the samples. The process is repeated until convergence.

Smoothing

[edit]

When shapes are defined or scanned, there may be accompanying noise, either to a signal acting upon the surface or to the actual surface geometry. Reducing noise on the former is known asdata denoising, while noise reduction on the latter is known assurface fairing. The task of geometric smoothing is analogous to signal noise reduction, and consequently employs similar approaches.

The pertinent Lagrangian to be minimized is derived by recording the conformity to the initial signalf¯{\displaystyle {\bar {f}}} and the smoothness of the resulting signal, which approximated by the magnitude of the gradient with a weightλ{\displaystyle \lambda }:

L(f)=Ωff¯2+λf2dx{\displaystyle {\mathcal {L}}(f)=\int _{\Omega }\|f-{\bar {f}}\|^{2}+\lambda \|\nabla f\|^{2}dx}.

Taking a variationδf{\displaystyle \delta f} onL{\displaystyle {\mathcal {L}}} emits the necessary condition

0=δL(f)=Ωδf(I+λ2)fδff¯dx{\displaystyle 0=\delta {\mathcal {L}}(f)=\int _{\Omega }\delta f(\mathbf {I} +\lambda \nabla ^{2})f-\delta f{\bar {f}}dx}.

By discretizing this onto piecewise-constant elements with our signal on the vertices we obtain

iMiδfif¯i=iMiδfij(I+λ2)fj=iδfij(M+λM2)fj,{\displaystyle {\begin{aligned}\sum _{i}M_{i}\delta f_{i}{\bar {f}}_{i}&=\sum _{i}M_{i}\delta f_{i}\sum _{j}(\mathbf {I} +\lambda \nabla ^{2})f_{j}=\sum _{i}\delta f_{i}\sum _{j}(M+\lambda M\nabla ^{2})f_{j},\end{aligned}}}

A noisy sphere being iteratively smoothed

where our choice of2{\displaystyle \nabla ^{2}} is chosen to beM1L{\displaystyle M^{-1}\mathbf {L} } for the cotangent LaplacianL{\displaystyle \mathbf {L} } and theM1{\displaystyle M^{-1}} term is to map the image of the Laplacian from areas to points. Because the variation is free, this results in a self-adjoint linear problem to solve with a parameterλ{\displaystyle \lambda }:f¯=(M+λL)f.{\displaystyle {\bar {f}}=(M+\lambda \mathbf {L} )f.} When working with triangle meshes one way to determine the values of the Laplacian matrixL{\displaystyle L} is through analyzing the geometry of connected triangles on the mesh.

Lij={12(cot(αij)+cot(βij))edge ij existsijLiji=j0otherwise{\displaystyle L_{ij}={\begin{cases}{\frac {1}{2}}(\cot(\alpha _{ij})+\cot(\beta _{ij}))&{\text{edge ij exists}}\\-\sum \limits _{i\neq j}L_{ij}&i=j\\0&{\text{otherwise}}\end{cases}}}

Whereαij{\displaystyle \alpha _{ij}} andβij{\displaystyle \beta _{ij}} are the angles opposite the edge(i,j){\displaystyle (i,j)}[5]Themass matrix M as an operator computes the local integral of a function's value and is often set for a mesh with m triangles as follows:

Mij={13t=1m{Area(t)if triangle t contains vertex i0otherwiseif i=j0otherwise{\displaystyle M_{ij}={\begin{cases}{\frac {1}{3}}\sum \limits _{t=1}^{m}{\begin{cases}Area(t)&{\text{if triangle t contains vertex i}}\\0&{\text{otherwise}}\end{cases}}&{\text{if i=j}}\\0&{\text{otherwise}}\end{cases}}}

Parameterization

[edit]

Occasionally, we need to flatten a 3D surface onto a flat plane. This process is known asparameterization. The goal is to find coordinatesu andv onto which we can map the surface so that distortions are minimized. In this manner, parameterization can be seen as an optimization problem. One of the major applications of mesh parameterization istexture mapping.

Mass springs method

[edit]
The Tutte Embedding shows non-smooth parameterizations on the side of the beetle.

One way to measure the distortion accrued in the mapping process is to measure how much the length of the edges on the 2D mapping differs from their lengths in the original 3D surface. In more formal terms, the objective function can be written as:

minUijE||uiuj||2{\displaystyle {\underset {U}{\text{min}}}\sum _{ij\in E}||u_{i}-u_{j}||^{2}}

WhereE{\displaystyle E} is the set of mesh edges andU{\displaystyle U} is the set of vertices. However, optimizing this objective function would result in a solution that maps all of the vertices to a single vertex in theuv-coordinates. Borrowing an idea from graph theory, we apply theTutte Mapping and restrict the boundary vertices of the mesh onto aunit circle or otherconvex polygon. Doing so prevents the vertices from collapsing into a single vertex when the mapping is applied. The non-boundary vertices are then positioned at thebarycentric interpolation of their neighbours. The Tutte Mapping, however, still suffers from severe distortions as it attempts to make the edge lengths equal, and hence does not correctly account for the triangle sizes on the actual surface mesh.

Least-squares conformal mappings

[edit]
A comparison of the Tutte Embedding and Least-Squares-Conformal-Mapping parameterization. Notice how the LSCM parameterization is smooth on the side of the beetle.

Another way to measure the distortion is to consider thevariations on theu andv coordinate functions. The wobbliness and distortion apparent in the mass springs methods are due to high variations in theu andv coordinate functions. With this approach, the objective function becomes theDirichlet energy onu andv:

minu,vS||u||2+||v||2dA{\displaystyle {\underset {u,v}{\text{min}}}\int _{S}||\nabla u||^{2}+||\nabla v||^{2}dA}

There are a few other things to consider. We would like to minimize the angle distortion topreserve orthogonality. That means we would likeu=v{\displaystyle \nabla u=\nabla v^{\perp }}. In addition, we would also like the mapping to have proportionally similar sized regions as the original. This results to setting the Jacobian of theu andv coordinate functions to 1.

[uxuyvxvy]=1{\displaystyle {\begin{bmatrix}{\dfrac {\partial u}{\partial x}}&{\dfrac {\partial u}{\partial y}}\\[1em]{\dfrac {\partial v}{\partial x}}&{\dfrac {\partial v}{\partial y}}\end{bmatrix}}=1}

Putting these requirements together, we can augment the Dirichlet energy so that our objective function becomes:[6][7]

minu,vS12||u||2+12||v||2uv{\displaystyle {\underset {u,v}{\text{min}}}\int _{S}{\frac {1}{2}}||\nabla u||^{2}+{\frac {1}{2}}||\nabla v||^{2}-\nabla u\cdot \nabla v^{\perp }}

To avoid the problem of having all the vertices mapped to a single point, we also require that the solution to the optimization problem must have a non-zero norm and that it is orthogonal to the trivial solution.

Deformation

[edit]
An example of as-rigid-as-possible deformation

Deformation is concerned with transforming some rest shape to a new shape. Typically, these transformations are continuous and do not alter the topology of the shape. Modern mesh-based shape deformation methods satisfy user deformation constraints at handles (selected vertices or regions on the mesh) and propagate these handle deformations to the rest of shape smoothly and without removing or distorting details. Some common forms of interactive deformations are point-based, skeleton-based, and cage-based.[8] In point-based deformation, a user can apply transformations to small set of points, called handles, on the shape. Skeleton-based deformation defines askeleton for the shape, which allows a user to move the bones and rotate the joints. Cage-based deformation requires a cage to be drawn around all or part of a shape so that, when the user manipulates points on the cage, the volume it encloses changes accordingly.

Point-based deformation

[edit]

Handles provide a sparse set of constraints for the deformation: as the user moves one point, the others must stay in place.

A rest surfaceS^{\displaystyle {\hat {S}}}immersed inR3{\displaystyle \mathbb {R} ^{3}} can be described with a mappingx^:ΩR3{\displaystyle {\hat {x}}:\Omega \rightarrow \mathbb {R} ^{3}}, whereΩ{\displaystyle \Omega } is a 2D parametric domain. The same can be done with another mappingx{\displaystyle x} for the transformed surfaceS{\displaystyle S}. Ideally, the transformed shape adds as little distortion as possible to the original. One way to model this distortion is in terms of displacementsd=xx^{\displaystyle d=x-{\hat {x}}} with a Laplacian-based energy.[9] Applying the Laplace operator to these mappings allows us to measure how the position of a point changes relative to its neighborhood, which keeps the handles smooth. Thus, the energy we would like to minimize can be written as:

mindΩ||Δd||2dA{\displaystyle \min _{\textbf {d}}\int _{\Omega }||\Delta {\textbf {d}}||^{2}dA}.

While this method is translation invariant, it is unable to account for rotations. The As-Rigid-As-Possible deformation scheme[10] applies a rigid transformationxi=Rxi^+t{\displaystyle x_{i}=R{\hat {x_{i}}}+t} to each handle i, whereRSO(3)R3{\displaystyle R\in SO(3)\subset \mathbb {R} ^{3}} is arotation matrix andtR3{\displaystyle t\in \mathbb {R} ^{3}} is a translation vector. Unfortunately, there's no way to know the rotations in advance, so instead we pick a “best” rotation that minimizes displacements. To achieve local rotation invariance, however, requires a functionR:ΩSO(3){\displaystyle {\textbf {R}}:\Omega \rightarrow SO(3)} which outputs the best rotation for every point on the surface. The resulting energy, then, must optimize over bothx{\displaystyle {\textbf {x}}} andR{\displaystyle {\textbf {R}}}:

minx,RSO(3)Ω||xRx^||2dA{\displaystyle \min _{{\textbf {x,R}}\in SO(3)}\int _{\Omega }||\nabla {\textbf {x}}-{\textbf {R}}\nabla {\hat {\textbf {x}}}||^{2}dA}

Note that the translation vector is not present in the final objective function because translations have constant gradient.

Inside-Outside Segmentation

[edit]

While seemingly trivial, in many cases, determining the inside from the outside of a triangle mesh is not an easy problem. In general, given a surfaceS{\displaystyle S} we pose this problem as determining a functionisInside(q){\displaystyle isInside(q)} which will return1{\displaystyle 1} if the pointq{\displaystyle q} is insideS{\displaystyle S}, and0{\displaystyle 0} otherwise.

In the simplest case, the shape is closed. In this case, to determine if a pointq{\displaystyle q} is inside or outside the surface, we can cast a rayr{\displaystyle r} in any direction from a query point, and count the number of timescountr{\displaystyle count_{r}} it passes through the surface. Ifq{\displaystyle q} was outsideS{\displaystyle S} then the ray must either not pass throughS{\displaystyle S} (in which casecountr=0{\displaystyle count_{r}=0}) or, each time it entersS{\displaystyle S} it must pass through twice, because S is bounded, so any ray entering it must exit. So ifq{\displaystyle q} is outside,countr{\displaystyle count_{r}} is even. Likewise ifq{\displaystyle q} is inside, the same logic applies to the previous case, but the ray must intersectS{\displaystyle S} one extra time for the first time it leavesS{\displaystyle S}. So:

isInsider(q)={1countr is odd0countr is even{\displaystyle isInside_{r}(q)=\left\{{\begin{array}{ll}1&count_{r}\ is\ odd\\0&count_{r}\ is\ even\\\end{array}}\right.}

Now, oftentimes we cannot guarantee that theS{\displaystyle S} is closed. Take the pair of pants example from the top of this article. This mesh clearly has a semantic inside-and-outside, despite there being holes at the waist and the legs.

Approximating inside-outside segmentation by shooting rays from a query point for varying number of rays

The naive attempt to solve this problem is to shoot many rays in random directions, and classifyq{\displaystyle q} as being insideif and only if most of the rays intersectedS{\displaystyle S} an odd number of times. To quantify this, let us say we castk{\displaystyle k} rays,r1,r2,,rk{\displaystyle r_{1},r_{2},\dots ,r_{k}}. We associate a numberrayTest(q)=1ki=1kisInsideri(q){\displaystyle rayTest(q)={\frac {1}{k}}\sum _{i=1}^{k}isInside_{r_{i}}(q)} which is the average value ofisInsider{\displaystyle isInside_{r}} from each ray. Therefore:

isInside(q)={1rayTest(q)0.50rayTest(q)<0.5{\displaystyle isInside(q)=\left\{{\begin{array}{ll}1&rayTest(q)\geq 0.5\\0&rayTest(q)<0.5\\\end{array}}\right.}

In the limit of shooting many, many rays, this method handles open meshes, however it in order to become accurate, far too many rays are required for this method to be computationally ideal. Instead, a more robust approach is the Generalized Winding Number.[11] Inspired by the 2Dwinding number, this approach uses thesolid angle atq{\displaystyle q} of each triangle in the mesh to determine ifq{\displaystyle q} is inside or outside. The value of the Generalized Winding Number atq{\displaystyle q},wn(q){\displaystyle wn(q)} is proportional to the sum of the solid angle contribution from each triangle in the mesh:

wn(q)=14πtFsolidAngle(t){\displaystyle wn(q)={\frac {1}{4\pi }}\sum _{t\in F}solidAngle(t)}

For a closed mesh,wn(q){\displaystyle wn(q)} is equivalent to the characteristic function for the volume represented byS{\displaystyle S}. Therefore, we say:

isInside(q)={1wn(q)0.50wn(q)<0.5{\displaystyle isInside(q)=\left\{{\begin{array}{ll}1&wn(q)\geq 0.5\\0&wn(q)<0.5\\\end{array}}\right.}

Becausewn(q){\displaystyle wn(q)} is aharmonic function, it degrades gracefully, meaning the inside-outside segmentation would not change much if we poked holes in a closed mesh. For this reason, the Generalized Winding Number handles open meshes robustly. The boundary between inside and outside smoothly passes over holes in the mesh. In fact, in the limit, the Generalized Winding Number is equivalent to the ray-casting method as the number of rays goes to infinity.

Applications

[edit]

See also

[edit]

References

[edit]
  1. ^abBotsch, Mario; Kobbelt, Leif; Pauly, Mark; Alliez, Pierre (2010).Polygon Mesh Processing.CRC Press.ISBN 9781568814261.
  2. ^Hugues Hoppe."Progressive Meshes"(PDF).
  3. ^ab"Poisson surface reconstruction".hhoppe.com. Retrieved2017-01-26.
  4. ^Szymon Rusinkiewicz, Marc Levoy."Efficient Variants of the ICP Algorithm"(PDF).
  5. ^"Chris Tralie : Laplacian Meshes".www.ctralie.com. Retrieved2017-03-16.
  6. ^Desbrun, Mathieu (2002)."Intrinsic Parameterizations of Surface Meshes"(PDF).Eurographics.21.
  7. ^Levy, Bruno (2002)."Least squares conformal maps for automatic texture atlas generation"(PDF).ACM Transactions on Graphics.21 (3):362–371.doi:10.1145/566654.566590. Archived fromthe original(PDF) on 2017-03-15. Retrieved2017-03-14.
  8. ^Jacobson, Alec; Baran, Ilya; Popović, Jovan;Sorkine, Olga (2011)."Bounded Biharmonic Weights for Real-Time Deformation"(PDF).ACM Transactions on Graphics.30 (4): 1.doi:10.1145/2010324.1964973.
  9. ^Marc, Alexa (2003). "Differential coordinates for local mesh morphing and deformation".The Visual Computer.19 (2):105–114.doi:10.1007/s00371-002-0180-0.S2CID 6847571.
  10. ^Sorkine, Olga; Alexa, Marc (2007)."As-Rigid-As-Possible Surface Modeling"(PDF).Proceedings of EUROGRAPHICS/ACM SIGGRAPH Symposium on Geometry Processing:109–116.
  11. ^Jacobson, Alec; Ladislav, Kavan;Sorkine-Hornung, Olga (2013)."Robust Inside-Outside Segmentation using Generalized Winding Numbers"(PDF).ACM Transactions on Graphics.32 (4): 1.doi:10.1145/2461912.2461916.S2CID 207202533.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Geometry_processing&oldid=1315318629"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp