# 3D Model Identification Using Weighted Implicit Shape Representation and Panoramic View
## 3 3D Shape Normalization Using WISR  
3D shape normalization is a process of adjusting the orientation, location, and size of a given 3D model into a canonical coordinate frame. A 3D model is usually composed of a main body part and branch parts (e.g., arms and legs). To reduce the effect caused by the deformation or abscission of branch parts when determining the principal axes, we increase the weight of the main body part. The procedure of weight calculation requires three steps. The first step is automatically estimating the number of clusters based on rate distortion theory [15]. With the clustering method, we can distinguish the main body part and the branch parts. However, different 3D models have different shapes and topologies that lead to different main body and branch parts. Therefore, a method of automatically estimating the number of clusters is required. The second step is performing the k-means algorithm with the estimated number and calculating the distance among cluster centers. The third step is calculating the number of points inside each cluster sphere. Generally, the number of points inside a main body part is greater than that of a branch part. Thus the weight is obtained based on the number of points. First of all, \(N\) random points \(P=\{p_{i}|i=1,\ldots,N\}\) are generated inside the surface of a model. A measure of cluster dispersion called distortion \(d\) is defined as Equation (1). It is derived from Mahalanobis distance. \[d=\sum_{i=1}^{N}\bigl{(}p_{i}-c_{p_{i}}\bigr{)}^{\mathrm{T}}\Gamma^{-1}\bigl{(} p_{i}-c_{p_{i}}\bigr{)} \tag{1}\]  
where \(\Gamma\) is the covariance and \(c_{p_{i}}\) is the closest center to a given point \(p_{i}\). The cluster centers are obtained by using the k-means algorithm. We iteratively fit \(k\in\{1,K\}\) clusters to the points \(P\). Therefore, there are \(K\) distortions \(d_{k}\) corresponding to \(K\) clusters. Each \(d_{k}\) denotes cluster dispersion of \(k\) clusters. After evaluating the distortions with 1 to \(K\) partitions, the \(d_{k}\) is transformed as follows  
\[J_{k}=d_{k}^{-\frac{m}{2}}-d_{k-1}^{-\frac{m}{2}} \tag{2}\]  
where \(m\) is the dimension of the points, thus \(m\) is equal to 3. The \(-\frac{m}{2}\) is a transform power motivated by asymptotic reasoning. The number of clusters is set to be \(k^{\prime}=\operatorname*{argmax}_{k}\{J_{k}\}\). The \(k^{\prime}\) is the ideal number of clusters. Then the k-means algorithm is performed to partition the \(P\) into \(k^{\prime}\) clusters. The points near the boundaries of clusters interfere with the relation between the points and the main body and branch parts. Therefore, we only consider the points inside a sphere with a specific radius. First we compute a distance \(cd\) between two cluster centers as follows:  
\[cd_{a,b}=\sqrt{\left(c_{a}-c_{b}\right)^{2}},\ a,b=1,\ldots,k^{\prime} \tag{3}\]  
Then we can obtain \(C=k^{\prime}-1+k^{\prime}-2+,\ldots,+k^{\prime}-(k^{\prime}-1)\) distances. The radius is defined as \(r=\min\bigl{\{}cd_{a,b}\bigr{\}}/2\). The weight of each cluster is the number of nearest points within the radius from each center. The nearest points set of the \(j\)th cluster center \(c_{j}\) is defined as \(S_{j}=\left\{i\middle|\sqrt{\left(c_{j}-p_{i}\right)^{2}}\leq r\right\}\). The weight \(w_{j}\) of cluster \(j\) is the the number of the elements in the \(S_{j}\). The ISR is defined as \(f(p)=\min\{||p-q||\}\), which is the minimum Euclidean distance from \(p\) to vertices \(q\) on the surface of the model. The \(w_{j}\) is applied to the ISR of nearest points of cluster center \(j\) to produce WISR as follows  
\[f^{\prime}(p_{i})=\left\{ \begin{aligned} f(p_{i})\cdot w_{j},& \text{if }i\in S_{j}.\\ f(p_{i}),&\text{otherwise.}\end{aligned} \right. \tag{4}\]  
The points nearest to the cluster center inside a main body are much more than those inside a branch. Therefore, the weight of the main body will be increased, whereas that of the branch will be decreased.