• 沒有找到結果。

Skeleton Mesh Simplification

Skeleton Extraction using MSP Function

4.3 Skeleton Mesh Simplification

4.3.1 LOD framework

The skeleton mesh transformed from the original mesh maintains the same connectivity of the original mesh and is generally close to the skeleton except in some regions where the MSP slices have higher slice error. Based on this observation, we propose a LOD simplification scheme that reduces the skeleton mesh to a curve skeleton that resembles the global shape of skeleton mesh. Our LOD simplification is different from the traditional one. The proposed simplification aims to preserve the global shape of the skeleton mesh while the tradition one aims to preserve the local shape and feature of the mesh.

Our LOD simplification is a greedy approach. Edges are collapsed based on their simpli-fication cost. Two error metrics are proposed and their weighted sum is used to represent the simplification cost of each edge. At each LOD operation, the edge with lowest cost is selected and then first tested to see if it is ready to be a skeleton edge. If the edge has adjacent triangles, it is collapsed as usual. If the edge has no adjacent triangles, it is 1-D and generally a skeleton edge. However, in order to remove those 1-D edges that are the result of surface noise, such a 1-D edge needs to be tested using the proposed constraint to see if the edge is the result of surface noise. If so, the edge is collapsed. If not, we still push the edge back into the bottom of the edge queue for future consideration since conditions associated with the constraint my be updated by the collapsing of its adjacent edges.

When we pop a 1-D edge e from the edge queue, we will apply the same constraint test on it and collapse it if it is a branch of noise. If the conditions associated with the constraint of the end vertices of e won’t be changed or updated anymore, the edge must be a skeleton edge and we will put the edge into the list of skeleton edges. On the implementation, we will check the adjacent edges of the edge e whether they are all 1-D edge and its saturation are all larger than a user-specified threshold. If so, the conditions of its end vertices won’t be changed anymore and the edge must be a skeleton. If not, we will push the edge back to the edge queue. When

the edge queue is empty, we finish the computation of skeleton extraction. By the control of the error metrics and the constraint, we can preserve the global shape of the skeleton mesh and generate reasonably good skeletons after the LOD simplification. Figure 4.5 shows the pseudo code of the LOD simplification.

Figure 4.5: Pseudo code of LOD simplification

During the LOD simplification, for a vertex v, we record the set of all vertices that had been reduced to v. We call this set as the merging set SM(v) of v. Initially, the merging set of a vertex cintains only itself. After an edge e = (u, v) is collapsed to w, the merging set of w, SM(w), will be the union of the SM(u) and the SM(v). The merging set of a vertex w represents the vertices on the original mesh that have been finally reduced to w in the LOD simplification.

4.3.2 Error metrics

In order to preserve the global shape of the skeleton mesh, we propose two error metrics: the compactness metric Ecand the slice error metric Es.

Compactness metric The skeleton represents the global shape of the original mesh and a skeleton node stands for a part of surface area. We intend to utilize the MSP function and expect a skeleton node to represent a set of vertices that have similar volume information. We know that each vertex on the original mesh corresponds to one skeleton node and there exists a skeleton node inside each MSP slice. In the ideal case of the MSP computation, such as on the cylinder model, the points on the same MSP slice possess the same MSP slice, which means that the points have the same MSP values, the same slice normal, and zero distance between its corresponding skeleton points. So the points on the MSP slice should correspond to the same skeleton node.

In the reality, the points on a MSP slice generally don’t have the same MSP slice. Hence, there must exist some differences between the MSP slices for the points on the MSP slice.

However, the points on a MSP slice are generally expected to correspond to a same skeleton position. We design a metric that aims to merged the edges that have the similiar MSP values, similar MSP slice normal, and the small edge length distance. By using this three properties, we design the so called compactness metric, which is the product of three terms in the Equation 4.2.

For a edge e = (u, v), we use the max(MSP (u),MSP (v))

min(MSP (u),MSP (v)) to measure the similarity of the MSP values of the u and v. When the difference between the MSP values at the two nodes is large,

the possibility of the two nodes that correspond to the same skeleton node is lower and therefore the cost of simplifying the edge is larger. kekek

maxk measures the normalized distance between u and v. The larger distance it has, the lesser possibility that these two vertices correspond to the same skeleton node. We use arccos (Ns(u) · Ns(v)) to measure the difference between the slice normal, where Ns(u) is the slice normal of u. When the angle of the two MSP slices is larger, the MSP slices are more different and the two vertices are less likely to be correspond to the same skeleton node. So we use these three terms to define a error metric ,aiming to force edges that have lesser difference of MSP value, and slice normal, and smaller edge length between its two end vertices to be collapsed earlier.

To compute the three terms, we extend each end vertex to include all the vertices in its merging set. Because a vertex of the skeleton mesh might be merged before and the position of it might be also updated, we need to find a proper value to be the node’s information. Because the merged vertices of each vertex are all recorded in the merging set, we propose to use the averaged value of the all merged vertices in its merging set to be the value of the current vertex.

The MSP (u) is the weighting sum of the MSP values of the vertices in the merging set of u by the weighting of slice error. The Ns(u) is also the weighting-sum slice normal of the vertices in its merging set.

Slice Error metric As discussed in Section 3.2, we quantify the error of a MSP slice to measure how close its skeleton point is to the skeleton. Figure 4.6 shows the skeleton points derived from the MSP slices and their associated error coded in color ranging from blue to red for increasing error.

(a) Horse model (b) Dinopet model

(c) Dog model (d) Raptor model

Figure 4.6: Slice error distribution with color-coding.

In chapter 3, we have already defined the slice error Es(w) associated with a vertex w as Es(w) = P

p∈VM S(v)arccos

NS(w)·NS(p) kNS(w)kkNS(p)k

 ,

where VM S(v)is the set of all points on MSP slice M S(w) of w and NS(w) is the normal vector of the MSP slice of vertex w. The slice error metric Ms for an edge e = (u, v) is defined as the averaged slice error of node u and node v. We intend to collapse the edges that have larger slice error before edges with smaller slice error. The slice error of a vertex can be defined as the averaged slice error of the nodes in its merging set. Furthermore, the slice error metric Ms(e) of an edge e = (u, v) can be defined as the averaged slice error of the nodes in the union of the merging sets of u and v, as shown in the Equation 4.3.

Ms(e) = 1 Emax is the maximum slice error between the all vertices in the skeleton mesh, and Eminis the minimum slice error. T is the size of the SM(u) ∪ SM(v).

Total Cost The total cost function M is the weighting sum of the slice error metric and the compactness metric:

M (e) = Mc(e) + λ(1 − Ms(e)) (4.4)

We intend to let compactness metric dominate the whole simplification sequence due to its capability on the global shape preserving. So λ is usually set to 0.1.

4.3.3 LOD Constraint

In order to preserve the global shape of the skeleton mesh, we need to design a proper LOD constraint to maintain the topology information and delete the unwanted branches. During the simplification, if an edge has no adjacent triangles, it is a 1-D edge and the edge is generally a skeleton edge. Since the noise on the surface may result in 1-D edges that don’t capture any prominent features, we need to detect and remove such edges during the simplification. We call these edges as the branches of noise or branch in short.

We propose the saturation for 1-D edges to quantify the possibility that the edge is a skeleton edge, not a branch. We define the saturation SE(e) of the edge e = (u, v) as the ratio of the saturations of u and v.

SE(e) = min(Sat(u),Sat(v)) max(Sat(u),Sat(v)))

where Sat(u) and Sat(v) are defined as the surface areas on the original mesh covered by vertices in the merging set of u, SM(u), and vertices in SM(v) respectively.

We assume that a skeleton edge has a property that its two end vertices have similar surface area corresponds to them. Hence, for an edge, if it is 1-D and its saturation value SE is almost equal to 1.0, the edges is a skeleton edge and must be constrained and cannot be simplified.

Otherwise, the edge should be simplified. Even though the surface area corresponding to a skeleton node in the final skeleton is spatially connected. For the skeleton edges that capture small prominent features, such as the ear, the surface area of this feature is relatively much smaller than the head. Hence the saturation values of this kind of edges are small. But this kind of edges are normally considered as edges in the final skeleton. So the skeleton edge for small prominent feature can not be distinguished from the branches of noise by using saturation value alone.

But the MSP values of the two end nodes which is connected by the skeleton edge of small feature is much different. Besides, the MSP values of the two end nodes of a noise branch do not be that different. Therefore, we can use the MSP ratio to distinguish these two type edges and we add the MSP ratio term to compensate this weakness of keeping branches of small features, as shown the MSP term in the Equation 4.5. Through the term of the MSP ratio, it increases the value of the edge saturation and compensate the small value of the area ratio. Hence, we can use the edge saturation SE to detect noise branches and also keep the meaningful skeleton edges in the final skeleton during the LOD simplification.

SE(e) = max(MSP (u), MSP (v)) min(MSP (u), MSP (v)

2

· min(Sat(u), Sat(v))

max(Sat(u), Sat(v)) (4.5) where MSP (u) and MSP (v) are defined by the slice-error-weighting sum of the MSP values of the nodes in the merging set SM(u) and SM(v) respectively. Sat(na) is the saturation of skeleton node u, which is defined by the surface area enclosing by the merging set of v.

During the simplification, the edge e with lowest cost are popped from the queue. For each popped edge, we will test the edge to see if it is part of skeleton by the LOD constraint. If the edge had become 1-D skeleton edge and the edge saturation SE of edge e is larger than a threshold, the edge will be considered as the candidate of skeleton edge. If the saturation of the skeleton edge will not be changed anymore, this skeleton edge must be a skeleton edge and

we will push this edge into the list of skeleton edges. Otherwise, we will push the candidate skeleton edge back to the edge queue for future consideration. If the edge has not become 1-D edge or the edge saturation SE of a 1-D edge is below than a threshold, the edge needs to be collapsed. When the edge queue is empty, we finish the skeleton extraction.

4.3.4 Replacement of the skeleton vertex

When an edge is collapsed, two end vertices are merged to a new vertex. We intend to find a new position of the new vertex and merge the information of the original two end vertices. Hence, we propose to use the merged vertices in its merging set to find a proper position of the new position. But there exist different amounts of slice error in the merged vertices of its merging set. So we add the factor of slice error in the node replacement to update the new vertex to a better position.

When collapsing e = (u, v), a proper position where u merges to is the weighting sum of the vertex positions in the merging set of the u and v. Equation 4.6 defines the update position after the edge e = (u, v) collapsed.

U (e) = 1 and Es(w) is the normalized slice error of node w.

相關文件