Tag: The extraction algorithm specifies that the relational computes the HTML member model FFFFFF
The scope discussed in this paper does not include geometry reconstruction, texture reconstruction, but only three-dimensional measurement algorithm based on the existing three-dimensional triangular mesh model (the human triangular grid). In fact, the circumference measurement is a three-dimensional model with a specific plane intersection, and the intersection further analysis of the intersection of the specific closed part (if there are multiple closed parts) of the contour perimeter and area data, that is, to calculate the slice of the grid. GB/t 16160-2008 "clothing with human body measurement of the parts and methods" given the human body size characteristics and height of the proportion of data (hereinafter referred to as the characteristics of the proportion), to find a specific proportion and height of the point of the French plane and three-dimensional mesh slice can further obtain specific characteristics of the specific values.
1.1 Coordinate system correction of human triangle grid
Assuming that the z-axis in the coordinate system of the human triangle mesh is the direction vector of the midpoint of the human Horn and the center of the head, the coordinate system of the triangle mesh obtained by the handheld scanner depends on the orientation of the first scan, so that the z-axis of the grid has an error with the correct coordinate system.
The core method used in this paper is PCA (Principal Component analysis). For the face element adhesion problem of the arm and body, it can be circumvented by the scanning target opening arm, while the high and low shoulder of the target person standing and opening arm will influence the effect of PCA coordinate correction. The main part of the PCA algorithm is the arm part three-dimensional point, the removal of the arm part three-dimensional point two PCA algorithm can be. It can be selected by a specific proportional relationship, or by the distance from the three-dimensional point to the z-axis.
1.2 Triangular mesh slicing algorithm 1.2.1 triangulation algorithm based on sorting
The slicing algorithm based on triangular meshes can be divided into two categories. One is the triangular mesh slicing algorithm based on the half-data structure, assuming that half half of the structure is:
struct HE_edge{ HE_vert* from; HE_vert* to; HE_edge* pair; // oppositely oriented adjacent half-edge HE_edge* next; // next half-edge around the face ... // other members};
And at this time obtains the plane plane and the specified one-sided intersection of the beginning half of s, the result of the algorithm is a half-point sequence from s , then the algorithm can be described as a simple he_slice (s->pair,*), The loop-through recursion can be further optimized:
void HE_Slice(HE_edge* curr, std::vector<glm::vec3>& res){ if(curr->next == s || curr->next->next == s) return ; for(auto e: {e->next, e->next->next}) { if(is_intersect(e,plane)) { ... // calculate and store the intersection HE_Slice(e->pair, res); } }}
1.2.2 Triangle mesh slicing algorithm based on sorting
The slicing algorithm based on the half-edge data structure is efficient, but the maintenance of half-side data structure requires more memory support and the construction time _o (N*log (n)) _, only provides the local topology information can not support by height ratio to obtain a specific half. Both of these drawbacks can be resolved by sorting the polygons described below. Considering that the intersection of the human triangle mesh and the plane plane can be multiple closed parts (hand and torso, two feet), half of the structure can and can only get to the closed part of the given initial half, unable to obtain the number of closed parts of the intersection between the specified plane and the triangular mesh (the closed number of the next name). The algorithm framework is as follows:
1. 对共享顶点结构的三角网格进行排序2. 通过二分查找确定需要与平面求交的有序面元的最小子序列3. 遍历子序列,生成平面与三角形面元的边的交的集合,集合元素为{A,B,k},其中A,B为边的顶点索引,k为相交系数。4. 通过选择排序对3.生成的集合完成有序化,并得到闭合部分的划分。
The smallest geometric element that participates in the slicing algorithm is an edge, so the sorting of the triangular mesh should be equivalent to the ordering of the triangular polygon elements. The sorting algorithm is briefly described as follows:
// 1. 对共享顶点结构的三角网格进行排序void sortByVector(TriMesh *mesh, glm::vec3 x) { std::sort(mesh->f.begin(), mesh->f.end(), [=](glm::ivec3& e1, glm::ivec3& e2){ return glm::dot(mesh->v[e1[0]] - mesh->v[e2[0]], x) > 0; });}
In fact, the surface element that participates in the slicing algorithm is a sub-sequence of the sorted surface element sequence, when given the slice plane (point French plane, normal vector is Z axis) and the maximum projection distance _gap_ on the z axis, the sub-sequence extraction algorithm is as follows:
2. Determining the smallest ordered sub-sequence of a polygon that needs to be intersection with a plane by means of two-point lookupSTD::array<STD::Vector<glm::ivec3>::iterator,2> getsliceinterval (trimesh* mesh,glm::vec3 N,Float D,Float gap) {STD::array<std::vector<glm::ivec3>::iterator,2> result = { Span class= "hljs-built_in" >std::lower_bound (Mesh->f.begin (), Mesh->f.end (), d-gap, [=] (glm::ivec3& e1,< Span class= "Hljs-keyword" >float v) {return v < glm::d ot (Mesh->v[e1[0]", N); }), std::lower_bound (Mesh->f.begin (), Mesh->f.end (), d+gap, [=] (glm::ivec3& E1,float v) {return v < glm::d ot (Mesh->v[e1[0]], n); })}; if (Result[0] > Result[1]) std::swap (Result[0],result[1]); return result;}
To determine the bounds of a subsequence, the slicing algorithm requires very few polygons to be cross with a particular plane. The geometric calculation of intersection and intersection of surface element and plane is as follows:
BOOL Isfaceinersected (trimesh* mesh,GLM::IVEC3 F,GLM::VEC3 N,Float d) {int flags = ((GLM::d ot (mesh->v[f[0]], n) > D) + (GLM::d ot (mesh->v[f[1]], n) > D) + (GLM::d ot (mesh->v[f[2]], n) > D));return flags = =1 | | Flags = =2;}std::array<GLM::VEC3,2> getfaceintersection (trimesh* mesh,GLM::IVEC3 F,GLM::VEC3 N,Float d) {std::array<GLM::VEC3,2> result;int size =0;Dot (n, P1) + dot (n, t* (P1-P2)) = d//0 < T < 1ForInti:{0,1, 2}) {double numerator = d-GLM::d OT ( Mesh->v[f[i]], n); double denominator = GLM::d ot (Mesh->v[f[i==2?0:i+1]"-mesh->v[f[i]], n); if (ABS (denominator) > 1e-8) {numerator/= denominator; if (numerator >= 0 && numerator <= 1.0) {result[size++] = GLM::VEC3 (F[i],f[i==2?0:i+1],numerator); }}} return result;}
3. The resulting line segments are unordered and cannot satisfy subsequent operations, such as the number of closures, the smoothing of a particular closed part, the calculation of geometric features such as the perimeter area of a particular part, and the need to order the results of 3. Considering the actual grid size of the intersection of the size is often less than 10000, the algorithm design using the choice of sorting, the algorithm complexity of _o (N*log (N) _) _, briefly described as follows:
4. By selecting sort to 3. The resulting collection is ordered and the closed section is divided.STD::vector<STD::array<STD::vector<STD::Array<glm::vec3,2>>::iterator,2>> Sortcontours (STD::vector<STD::ARRAY<GLM::VEC3,2>>&& intersections) {STD::vector<STD::array<STD::vector<STD::array<glm::vec3,2>>::iterator,2>> intervals = {{Intersections.begin (), Intersections.begin ()}};ForAuto it = Intersections.begin (); It! = Intersections.end (); it++) {Auto Find_it =Std::find_if (Std::next (IT), Intersections.end (), [=] (STD::ARRAY<GLM::VEC3,2>& e) {Return (e[0][0] = = (*it) [0]:1] && e[0][1] = = (*it) [0]:0]) | | (e[0][0] = = (*it) [0][1] && e[0][1] = = (*it) [0][0]) | | (e[0]:0] = = (*it) [0][1] && e[0]:1] = = (*it) [0][0]) | | (e[1] [0] = = (*it) [1][1] && e[< Span class= "Hljs-number" >1][1] = = (*it) [1][ 0]); }); if (find_it! = Intersections.end ()) {std::swap (*std::next (IT), *find_it); }else{(*STD::p Rev (Intervals.end ())) [ 1] = std::next (IT); if (it! = STD::p Rev (Intersections.end ())) Intervals.push_ Back ({std::next (IT), std::next (IT)});} return intervals;}
To this,
Latest Vehicle Driving license template PSD editable layered file Download
Latest Vehicle Driving license template PSD editable layered file Download
Latest Vehicle Driving license template PSD editable layered file Download
Latest Vehicle Driving license template PSD editable layered file Download
Latest Vehicle Driving license template PSD editable layered file Download
Latest Vehicle Driving license template PSD editable layered file Download
Latest Vehicle Driving license template PSD editable layered file Download
Latest Vehicle Driving license template PSD editable layered file Download
Latest Vehicle Driving license template PSD editable layered file Download
Latest Vehicle Driving license template PSD editable layered file Download
Latest Vehicle Driving license template PSD editable layered file Download
An algorithm for human measurements measurement based on triangular grid sorting