A connected graph based shape descriptor for comparing 3 D CAD models

Xutang Zhang*, Tianguo Jin**, Xiaofeng Chen***, Wangmeng Zuo**** * School of Mechatronics Engineering, Harbin Institute of Technology, Harbin, 150001, China, E-mail: zxt@hit.edu.cn ** School of Mechatronics Engineering, Harbin Institute of Technology, Harbin, 150001, China, E-mail: jintg@hit.edu.cn *** School of Mechatronics Engineering, Harbin Institute of Technology, Harbin, 150001, China, E-mail: cxf@hit.edu.cn **** School of Computer Science and Technology, Harbin Institute of Technology, Harbin, 150001, China, E-mail: cswmzuo@gmial.com


Introduction
Local shape feature extraction and representation has been the focus of research interests in the field of computer vision and computer-aided design (CAD).Varieties of local image feature descriptors have been developed by detecting the gradients, edges and corner points, and have been successfully applied to a wide range of computer vision and image analysis tasks [1].Recently, with the increasing interests on reverse engineering and 3D model retrieval, local feature representation and recognition of three-dimensional shape has been received extensive attentions.
By far, a number of local feature representation approaches have been developed for 3D shape matching and retrieval.Bespalov et al. proposed a scale-space based approach for the recursive decomposition of the surface to form the surface characteristics tree of a 3D model [2].Gal and Cohen-Or used the rectangular approximation to represent the local curvature patches, calculated the geometric properties of these patches, and clustered these patches to produce the local salient shape features [3].Sundar et al. presented a method to generate skeleton graph by using the thinning algorithm, and successfully applied it to voxel description of any 3D models [4].Tung and Schmitt calculated the multiresolution Reeb graph from 3D shapes of the objects, and then introduced a topology similarity method to assess the similarity for 3D shapes [5].Recently, the Reeb graph has been further extended such that its nodes can be attached with a variety of geometric information to improve their describing ability [6].Using skeleton graph or extended Reeb graph as the shape descriptors of 3D models can reflect the local features of the shape to a certain extent, but both methods can not accurately represent and extract the local surface feature information.
In this paper, by taking both the local features and their connections into account, we propose a novel local shape feature representation method, geodesic connected graph, for 3D CAD model analysis.In our method, extended Gaussian image [7] is first used to divide the 3D model surfaces and to obtain basic feature areas on the model, then the geodesic curves are generated to connect some selected feature areas, and finally a connected graph descriptor of local features is generated based on the geodesic path.To utilize the connected graph descriptor for CAD model analysis, we further propose a subgraph matching method for the extraction, matching, and retrieval of the typical predefined local features.

Surface segmentation
Gaussian image is the mapping of surface normals of a 3D object onto the unit sphere (Gaussian sphere).Gaussian sphere is a unit sphere where any point on a 3D surface can be mapped onto one point on Gaussian sphere if the following conditions can be met, i.e. the two corresponding points have the same normal vector direction.For each point p in Gaussian sphere, we assign a value by accumulating the area of all the triangle-meshes of which the normal direction are the same with direction of the point p [6].
Two types of adjacent relationships between two triangle facets are defined as follows: (1) geometric adjacency: two triangle facets are geometric adjacent if they share the same edge; (2) gaussian adjacency: two triangle facets are Gaussian adjacent if the angle between the two normal vectors on Gaussian sphere of these two triangle facets is less than a threshold (e.g.30°).
We define the two adjacent triangle facets are connected.The connectivity between triangle facets is transitive, i.e., suppose e, f and g are triangle facets on the model, if e and f are connected, f and g are connected, then e and g are also connected.Based on the connectivity, we define the connected area A as the set of triangle facets where any two of them are connected.According to the types of adjacency relationship, the connected area A can also be categorized into two types: (1) geometric connected area: any two triangle facets in the set are connected by Geometric adjacency.
(2) gaussian connected area: any two triangle facets in the set are connected by Gaussian adjacency.
If the area A is both Geometric and Gaussian connective, it is a segmentation area of model surface, which is also called a basic feature area.For a basic feature area, four attributes are defined as follows: (1) The type of feature area: the basic feature area can be further classified into three types: plane, cylindrical surface, and free-form surface: (A) plane: the corresponding Gaussian connective area is a point; (B) cylindrical surface: the corresponding Gaussian connective area consists of several points which lie on one circle; (C) free-form surface: the corresponding Gaussian connective area consists of several points, which do not lie on one circle.
(2) The center of feature area is defined as a point http://dx.doi.org/10.5755/j01.mech.17.4.576 on a triangle facet of this feature area.It can be calculated as follows: Step 1: calculating the center q of Gaussian connective area corresponding to the feature area.There are three possible circumstances: if Gaussian connective area is one point on Gaussian sphere, then this point can be regarded as the center q; if Gaussian connective area is one circle on Gaussian sphere, then selecting one point on the circle randomly as the center q; if Gaussian connective area is circle surface on Gaussian sphere, then the center of this surface can be regarded as the center q.
Step 2: searching for the n triangle facets on the feature area corresponding to the center q, whose centers are m 1 , m 2 , …, m n , respectively.Thus, the center c of this feature area can be defined as (3) The visibility of feature areas.Starting from the center of feature area, a half-line is created along with the direction of the normal of triangle.If this half-line does not intersect with any other triangles, then this area is visible, otherwise, it is invisible.
(4) The connectivity between feature areas.Two feature areas are of connectivity if and only if there exist geometric adjacent relation between triangles of two features.

Geodesic connected graph based local feature descriptor
In differential geometry, geodesic line has a strict definition, i.e. a curve on a surface, whose geodesic curvature on each point is zero, is called a geodesic line.In engineering, geodesic line is intuitively regarded as the shortest path of connecting two points on the surface, and the length of this shortest path is called geodesic distance.The visible areas obtained by the analysis of normal vectors in Gaussian image are connected with geodesics along a certain direction.The normal vector in Gaussian image, which describes the normal vectors of triangle facets on a model surface, may correspond to one or several areas mainly distributed on a side of the model.Indexing with the normal vectors in Gaussian image, the corresponding areas are connected by geodesics, and then connected graph can be created via the geodesics paths to describe local features and their relations.Based on the normal vectors on Gaussian sphere, two concepts can be defined as follows: The aspect of a model: if there exists a normal vector n on the Gaussian Sphere, and the number M of its corresponding basic areas is not less than 1, then these regions corresponding to the vector n constitute an aspect of the model.The vector n is called the direction of this aspect of model.
The view direction of the aspect: if the direction of the aspect is n, then the opposite direction n is called the view direction of the aspect.
From the above definitions one can see that the areas included in the aspect of the model are visible along the view direction of the aspect.For example, for the model shown in Fig. 1, the areas 2, 4, 6 and 9 constitute an aspect of the model.The direction of this aspect is along the positive Y axis, the view direction is along the negative Y axis.A model may consist of a few aspects {A 1 , A 2 , …, A k }, and the number of areas that these aspects own are {N 1 , N 2 , …, N k }.Without loss of generality, we suppose N 1 > N 2 > … > N k .Thus, these aspects can be processed to extract local features by geodesics connection one by one according to the sequence sorted by the number of areas.In addition, for the hole, cylinder or the free-form areas which are geometric adjacent with the areas of the model, they should be handled together with the local feature extraction.Let the areas contained in an aspect, together with holes, cylinders and free surfaces that have geometric connection relationships with these areas form a set F = {f i }.The centers of elements in the set are connected with geodesics to form a graph according to distances among these centers.The detailed connection process can refer to [8].The graph produced by the method is defined as the geodesic connection graph (Gcg).Fig. 1 shows the geodesics and the Gcg for one aspect.The aspect contains main areas 2, 4, 6 and 9.

CAD models comparing method
In the proposed representation scheme, the model can be described as a set composed of Gcgs.The problem of comparing two models can be transformed into corresponding elements in the two sets.Once solve the corre-sponding problem, the model's feature matching also can be acquired.In the following, we first give the method of computing the similarity of two Gcgs and then present the matching process of two Gcg sets.
The similarity of two Gcgs can be evaluated by using graph matching technology.The VF2 algorithm pro-posed by Cordella et al [9] is used in our work.Different from other approaches, the VF2 explores a new data structure to store the node information, which reduces the searching space.Meanwhile, VF2 does not constrain the topology structure of subgraphs, and can also discover graph-subgraph isomorphism.Comparing with other subgraph matching algorithms, VF2 is superior in solving the subgraph matching problem of graphs [10].
Supposed we have two Gcg sets, G = {g 1 , g 2 , g 3 }, K = {k 1 , k 2 , k 3 , k 4 , k 5 }, the procedure of matching two set can be stated as following: Step 1: randomly select one Gcg, e.g., g 1 , from set G, and remove g 1 from the set G.
Step 2: compare g 1 with every Gcg in the set K, and assume that g 1 matches best with k 2 , then output the best matching pair < g 1 , k 2 > and remove k 2 from the set K.
Step 3: end the matching stage if the set G or the set K is empty, else go to Step 1.

Examples
To test the effectiveness of the proposed comparison methods, we take sevral CAD models as computation examples (note: these models are from Purdue's ESB library [11]).First, as shown in the Fig. 2, the model is divided into surfaces and the model's aspects represented by Gcgs are computed.Then, using subgraph matching techniques, we compare and the Gcg sets of the two models, and the results are shown in the Figs. 3 and 4. According to Gcg mathcing pair, we can verify the correspondence of the main aspects (omit some trivial Gcgs maching pairs) and compute the number of nodes of matching subgraphs betwwen two Gcgs.The number of nodes can be used to evalute the similiarity of two Gcgs which reflects similarity of two models.From the experiment, one can see that the comparison and matching results are consistent with human's intuition of judging similiarity between two models.Fig. 4 The main feature matching pairs betweent the 1st and 3rd model

Conclusions
In this paper, based on the triangle mesh of 3D CAD models, according to the characteristics of CAD models, i.e.CAD models mainly consist of planes and quadric surfaces, and functional features generally lie on a few surfaces, an extended Gaussian image and geodesics approach for local shape representation and extraction is proposed.This method describes the local shape features as a few geodesic graphs consisting of several feature areas.We also present the generation procedure of geodesic connected graph.Based on the geodesic connected graph and subgraph matching, CAD models can be compared.We conduct some experiments to comparing 3D models.The results show that the proposed method can obtain the similarity and the feature corresponding relation between two models.
Zhang XuTang, Jin Tianguo, Chen XiaoFeng, Zuo WangMeng A CONNECTED GRAPH BASED SHAPE DESCRIPTOR FOR COMPARING 3D CAD MODELS S u m m a r y A connected graph based shape descriptor, geodesic connected graph, is proposed for comparing 3D CAD models.The CAD model can be represented by several geodesic connected graphs where each graph describes one aspect of a model.The geodesic connected graph is constructed by analyzing the relation of model's segmented surfaces using the method of connecting geodesic line.Based on the geodesic connected graph, graph matching technique is adopted to compare 3D CAD models.In the proposed method, feature matching can be acquired which is important for local feature based CAD models comparing.Finally, we present a computation example to verify the effectiveness of the geodesic connected graph based comparison method.

Fig. 1
Fig. 1 Geodesics on the model and the geodesic connected graph

Fig. 2 3 Fig. 3
Fig. 2 The models for comparing in our experiments The aspects on the 1st model The aspects on the 2nd model Number of nodes of mathcing subgraph